Re: [Quickfix-developers] nested groups inside MassQuote message
Brought to you by:
orenmnero
From: Oren M. <or...@qu...> - 2004-08-18 17:53:48
|
Joy, I think you're client code should look more like this. It looks=20 like in your version you are adding an empty noQuoteEntriesGroup. =20 Also, you are adding the noQuoteEntriesGroup1 to your noQuoteSetsGroup=20= after having already added it to the massQuote. This means the group=20 will never make it into the actual message. FIX44::MassQuote Application::queryMassQuote44() { FIX44::MassQuote massQuote(FIX::QuoteID( "IDq" ) ); FIX44::MassQuote::NoQuoteSets noQuoteSetsGroup; FIX::TotNoQuoteEntries totNoQuoteEntries; FIX::NoQuoteEntries noQuoteEntries; noQuoteSetsGroup.set( FIX::QuoteSetID( "IDs" ) ); FIX44::MassQuote::NoQuoteSets::NoQuoteEntries noQuoteEntriesGroup1; noQuoteEntriesGroup.setField(FIX::QuoteEntryID( "IDe" ) ); noQuoteSetsGroup.addGroup( noQuoteEntriesGroup1 ); massQuote.addGroup( noQuoteSetsGroup1 ); queryHeader( massQuote.getHeader() ); return massQuote; } As for which number fields to set, you never need to set the field the=20= group is named after. So when you create a=20 FIX44::MassQuote::NoQuoteSets, you know that you don't have to set the=20= NoQuoteSets field. TotNoQuoteEntries is not one of those, so you must=20= set it yourself. --oren On Aug 18, 2004, at 8:10 AM, Joy Bannerjee wrote: > i am still having problem using inner (nested) groups. Here is a=20 > detailed discription of what i am doing. I am using quickfix-1.8.0=A0=20= > and FIX 44 version on windows platform. I have written the client and=20= > the server in c++. I am having problem handling MassQuote message=20 > since it has a group (NoQuoteEntries) nested within another group=20 > (NoQuoteSets). > I have the following questions: > =A0 > 1.=A0 Does the user enter values for fields like TotNoQuoteEntries and=20= > NoQuoteEntries? > =A0=A0=A0=A0=A0If not, =A0then on the client side are these fields to = be set with=20 > empty objects of TotNoQuoteEntries=A0and=A0=A0NoQuoteEntries? OR Are = these=20 > fields=A0not to be set at all? > =A0=A0=A0=A0 How does one handle these two fiels on the client side? = And=A0how=20 > does QuickFix generate values for these fields? > =A0=A0=A0 =A0It seems in my case "NoQuoteSets" is having no problem in=20= > generating the proper value even without the need to set it on the=20 > client side but but the same does not seem to be happening in case of=20= > TotNoQuoteEntries and NoQuoteEntries (i.e it does not get any value=20 > unless it is set on the client side ). Please have a look at the code=20= > provided below. > <snip> > =A0 > FIX44::MassQuote Application::queryMassQuote44() > { > =A0 > =A0 FIX44::MassQuote massQuote(FIX::QuoteID( "IDq" ) ); > =A0 FIX44::MassQuote::NoQuoteSets noQuoteSetsGroup; > =A0 > =A0 FIX::TotNoQuoteEntries totNoQuoteEntries; > =A0 FIX::NoQuoteEntries noQuoteEntries; > =A0 > =A0 noQuoteSetsGroup.set( FIX::QuoteSetID( "IDs" ) ); > =A0 massQuote.addGroup( noQuoteSetsGroup ); > =A0 > =A0 FIX44::MassQuote::NoQuoteSets::NoQuoteEntries = noQuoteEntriesGroup1; > =A0 noQuoteEntriesGroup.setField(FIX::QuoteEntryID( "IDe" ) ); > =A0 noQuoteSetsGroup.addGroup( noQuoteEntriesGroup1 ); > =A0 > =A0 queryHeader( massQuote.getHeader() ); > =A0 return massQuote; > =A0=A0 > } > Regards > Joy=A0 > =A0 > =A0 > =A0 > =A0 > =A0 > =A0 > =A0 > =A0 > =A0 |