Re: [Quickfix-developers] Custom Repeating Group Rejects when DataDict=N (C++)
Brought to you by:
orenmnero
From: <or...@qu...> - 2010-04-09 04:02:52
|
Make sure you update your data dictionary file with the same changes. --oren > -------- Original Message -------- > Subject: [Quickfix-developers] Custom Repeating Group Rejects when > DataDict=N (C++) > From: gtsafas <gt...@rb...> > Date: Thu, April 08, 2010 10:44 pm > To: qui...@li... > > > QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX Support: http://www.quickfixengine.org/services.html > > > I searched through the forums to figure out how to add a custom group. I am > mainly using my engine to catch Execution Reports. As I do not want to > reject any (I.E. Bad Values) I have opted to disable my DataDictionary. This > seems to be working fine for everything, except for a custom repeating > group. > > I modified my fix42/ExecutionReport.h to add the new group, In the > ExecutionReport.h I first defined my custom tags using the FIX namespace. > > ---Modified ExectionReport.h--- > > namespace FIX{ > USER_DEFINE_INT(NumCharges,8125); > USER_DEFINE_STRING(ChargeName,8126); > USER_DEFINE_STRING(ChargeType,8127); > USER_DEFINE_STRING(ChargeRate,8128); > USER_DEFINE_STRING(ChargeAmount,8129); > } > > Then inside FIX42 Namespace I added this after NoContraBrokers > > class GroupCharges: public FIX::Group{ > public: > GroupCharges() : > FIX::Group(8125,8126,FIX::message_order(8126,8127,8128,8129,0)) {} > FIELD_SET(*this, FIX::ChargeName); > FIELD_SET(*this, FIX::ChargeType); > FIELD_SET(*this, FIX::ChargeRate); > FIELD_SET(*this, FIX::ChargeAmount); > }; > > ---End ExecutionReport.h--- > > > Now inside my application I am attempting the following. > > > > ---Application.cpp--- > > //This is inside void Application::onMessage( const FIX42::ExecutionReport& > message, const FIX::SessionID& ) > > > FIX::NumCharges fNumCharges; > if (message.isSetField(fNumCharges)){ > message.getField(fNumCharges); > > > FIX42::ExecutionReport::GroupCharges group; > FIX::ChargeName fChargeName; > FIX::ChargeType fChargeType; > FIX::ChargeRate fChargeRate; > FIX::ChargeAmount fChargeAmount; > > > for (int i=0; i<fNumCharges.getValue();i++){ > > message.getGroup(i+1,group); > group.get(fChargeName); > group.get(fChargeType); > group.get(fChargeRate); > group.get(fChargeAmount); > > } > } > > ---End Application.cpp--- > > > > End result is, This rejects due to repeating tag in message. Can someone > point out what is wrong with my logic? > > > Appreciate it Very Much. Thank You > > -George > > > > -- > View this message in context: http://old.nabble.com/Custom-Repeating-Group-Rejects-when-DataDict%3DN-%28C%2B%2B%29-tp28187295p28187295.html > Sent from the QuickFIX - Dev mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers |