objectcomputing / mFAST

A FAST (FIX Adapted for STreaming) encoder/decoder
http://objectcomputing.github.io/mFAST
BSD 3-Clause "New" or "Revised" License
220 stars 114 forks source link

Possible error in fast_type_gen #29

Closed Alex2172 closed 10 years ago

Alex2172 commented 10 years ago

There is template from file FIX50SP2_ALL.xml (MOEX):

<template name="0" id="2008" xmlns="http://www.fixprotocol.org/ns/fast/td/1.1">
    <string name="MessageType" id="35"><constant value="0" /></string>
    <string name="BeginString" id="8"><constant value="FIXT.1.1"/></string>
    <string name="SenderCompID" id="49"><constant value="MOEX"/></string>
    <uInt32 name="MsgSeqNum" id="34"><increment/></uInt32>
    <uInt64 name="SendingTime" id="52"><copy/></uInt64>
</template>

fast_type_gen has created FIX50SP2_ALL.cpp with content: const static field_instruction* _0__subinstructions[] = { &_0BeginString_instruction, &_0MessageType_instruction, &_0SenderCompID_instruction, &_0MsgSeqNum_instruction, &_0__SendingTime_instruction, };

It leads to the bug: when we invoke get_MessageType(), we've got BeginString instead of MessageType

Is this a bug, or am I doing something wrong? Thank you (and sorry for my bad english).

Alex2172 commented 10 years ago

sorry, this problem already discussed in https://github.com/objectcomputing/mFAST/issues/26