Re: [Quickfix-developers] Just Starting...
Brought to you by:
orenmnero
From: Shane T. <str...@co...> - 2008-03-14 14:09:43
|
Alternatively, taken from the link you posted with the following C++ code: FIX::PossDupFlag possDupFlag; message.getHeader().getField( possDupFlag ); This is very similar to the C# translation: QuickFix.PossDupFlag possDupFlag; message.getHeader().getField( possDupFlag ); -- Shane Trotter Connamara Systems, LLC On 3/14/08, Shane Trotter <str...@co...> wrote: > Azmat, > > You should be getting fields the type safe way (taken from > http://quickfixengine.org/quickfix/doc/html/csharp/receiving_messages_3.html): > > QuickFix.PossDupFlag possDupe = > msg.getHeader().getField(QuickFix.PossDupFlag.FIELD); > > Note that you shouldn't instantiate with getField(new Type()) to get > any field, it just wastes allocations/cpu/memory. > > When you have the possDupe object, you can get its boolean value with > possDupe.getValue(); > > > -- > Shane Trotter > Connamara Systems, LLC > > > On 3/14/08, azmat <mr...@gm...> wrote: > > QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html > > QuickFIX Support: http://www.quickfixengine.org/services.html > > > > > > > > Well, I think that is where my problem is. I overrode the > > onMessage(ExecutionReport) function and this is what I'm thinking I should > > write in it. > > > > > > PossDupFlag pdf = execrpt.getHeader().getField(new PossDupFlag()); > > if (pdf != null) > > { > > return; > > } > > else > > { > > // process messages that do not have possdup flag set at all to the OMS > > } > > > > > > This is the error I am receiving: > > > > Error 2 Cannot implicitly convert type 'QuickFix.BooleanField' to > > 'QuickFix.PossDupFlag'. An explicit conversion exists (are you missing a > > cast?) > > > > I haven't worked with the getHeader() function and am not familiar with how > > I should get properties from it. I am using the QuickFix .NET wrapper (C#). > > > > thanks! > > azmat > > > > > > > > > > Oren Miller wrote: > > > > > > QuickFIX Documentation: > > > http://www.quickfixengine.org/quickfix/doc/html/index.html > > > QuickFIX Support: http://www.quickfixengine.org/services.html > > > > > > > > > > > Well if that's all you want to do then just don't pass the message > > > into your OMS when the flag is true. The DoNotSend > > > exception doesn't enter into it. In reality you should very > > > rarely encounter this situation because you will only ever see a PossDup > > > message if the engine has not seen the message before. Meaning it > > > came as a result of a resend request. But in this case all you have > > > to do is see that the value is true, then simply don't pass it along. > > > > > > --oren > > > > > > > > > > > > -- > > View this message in context: http://www.nabble.com/Just-Starting...-tp14811784p16048126.html > > > > Sent from the QuickFIX - Dev mailing list archive at Nabble.com. > > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Microsoft > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > _______________________________________________ > > Quickfix-developers mailing list > > Qui...@li... > > https://lists.sourceforge.net/lists/listinfo/quickfix-developers > > > |