Re: [Quickfix-developers] application messages
Brought to you by:
orenmnero
From: Doug a. M. G. <dou...@gm...> - 2011-05-20 02:36:22
|
I found a few more references: http://old.nabble.com/Adding-Custom-Message-to-Fix42.xml-and-handling-in-application-td22242307.html http://old.nabble.com/Custom-Messages-Classes-Tutorial-td13495584.html I haven't worked through it yet, but this looks like a good start. If I read it right, then it sounds like I need to add these messages to quickfix instead of to my application and rebuild quickfix. Does that sound right? Doug On Thu, May 19, 2011 at 10:05 PM, Doug and Marcia Green <dou...@gm...> wrote: > I'm still trying to learn FIX and quickfix. If my broker has custom > application messages, do I subclass the Message class. I found this > previous message > * http://permalink.gmane.org/gmane.comp.finance.quickfix.devel/4467 > > I'm developing in C++ and what I have so far is throwing a validation > error in Message::extractField looking for an = sign in the message. > I'm trying to send this message, not receive it, and I was expecting > the class to build the formatted message for me. I'm not sure what > I'm missing. > > I've written this class: > > namespace FIXCQG > { > class AccountDataRequest : public FIX::Message > { > public: > AccountDataRequest() : Message(MsgType()) {} > AccountDataRequest(const FIX::Message& m) : Message(m) {} > ~AccountDataRequest() {} > static FIX::MsgType MsgType() { return FIX::MsgType("UAR"); } > > FIELD_SET(*this, FIX::Account); > FIELD_SET(*this, FIX::SubscriptionRequestType); > FIELD_SET(*this, FIX::AcctReqID); > }; > } > > I've changed the XML file as follows (psuedo diff syntax, I added the > lines with +) > > <messages> > + <message name='AccountDataRequest' msgcat='app' msgtype='uar'> > + <field name='Account' required='N' /> > + <field name='SubscriptionRequestType' required='N' /> > + <field name='AcctReqID' required='Y' /> > + </message> > </messages> > <fields> > + <field number='20003' name='AcctReqID' type='STRING' /> > </fields> > > Thanks, Doug > |