Re: [Quickfix-users] Suggested documentation change
Brought to you by:
orenmnero
From: Oren M. <or...@qu...> - 2004-12-09 04:28:25
|
The key here is actually not to create your own log on message. QuickFIX handles all admin messages and it is rarely necessary to create and send your own. Instead, what you should do is modify the session created logon messag in transit. This can be done in the toAdmin callback. If you pass admin messages to the cracker, you can override the logon callback and add the necessary fields there. --oren On Dec 7, 2004, at 8:10 PM, James Wiggs wrote: > QuickFIX Documentation: > http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX FAQ: > http://www.quickfixengine.org/wikifix/index.php?QuickFixFAQ > QuickFIX Support: http://www.quickfixengine.org/services.html > > > Hello Eckhart, > > On Tue, 2004-12-07 at 19:32, Eckhart Richter wrote: >> Dear Jim, >> >> might I be so bold as to ask you for advice on a similar matter? I >> utilize >> the VB.NET implementation of QuickFix and am stuck with a similar >> problem as >> the one described: the vendor defines two additional fields in their >> logon >> message - I added the two fields to the message via the SetField >> function, >> but the actual message gets reformatted to the standard logon message >> after >> calling the SendToTarget function. I have added the 2 new fields to >> the XML >> document, both <messages> and the <fields> section of the XML >> document. >> However, I still cannot successfully send a logon message - to the >> best of >> your knowledge, is there another portion of the document or code that >> must >> be altered? >> >> Thank you kindly, >> >> Eckhart Richter > > Delighted to help if I can. It's the best way to repay all the > help I've received from other folks on the list. It appears that > there are two things you have to do to make this work. NOTE: any > of the more knowledgable folks on the list should please feel free > to butt in and correct me if I'm providing bad information! That > said, it sounds like you've already done the first thing which is > editing the XML dictionary to add the new field definition in the > <fields> section, and to add entries for that field into the > <message> definition for the logon message. > > You also need to define the new field type in your VB.NET code. > I have never coded in VB.NET, only in C++, but this is how it is > done in C++. You add the following into the headers included by > your sources: > > #include "quickfix/Field.h" > > namespace FIX > { > USER_DEFINE_CHAR(VendorTagOne, 9721); > USER_DEFINE_FLOAT(VendorTagTwo, 9723); > } > > From that point forward, you can instantiate field objects for > these just like any of the standard fields and they will behave > the same as any other CHAR or FLOAT field types. The online docs > for QuickFIX contain the following example code for VB.NET, which > I assume does much the same thing: > > > Imports QuickFix.StringField > Imports QuickFix.DoubleField > > Public Class MyStringField : Inherits StringField > Public Sub New() > MyBase.New(6123) > End Sub > > Public Sub New(Dim data As String) > MyBase.New(6123, data) > End Sub > End Class > > Public Class MyPriceField : Inherits DoubleField > Public Sub New() > MyBase(8756) > End Sub > > Public Sub New(Dim data As Double) > MyBase(8756, data) > End Sub > End Class > > My guess is that once you have done this, you should be able to > use MyStringField and MyPriceField just as you would any standard > string and price-type field, and the engine will properly tag them > as 6123 and 8756 for transmission. I hope this helps! > > best, > Jim > >> -----Original Message----- >> From: qui...@li... >> [mailto:qui...@li...]On Behalf Of James >> Wiggs >> Sent: Monday, December 06, 2004 10:40 PM >> To: Qui...@li... >> Subject: [Quickfix-users] Suggested documentation change >> >> >> QuickFIX Documentation: >> http://www.quickfixengine.org/quickfix/doc/html/index.html >> QuickFIX FAQ: >> http://www.quickfixengine.org/wikifix/index.php?QuickFixFAQ >> QuickFIX Support: http://www.quickfixengine.org/services.html >> >> >> Folks, >> >> Just a quick suggestion for a change to the documentation. >> I'm coding a new FIX connection to a vendor that defines some >> non-standard fields in its messages. The QuickFIX documents >> describe how to define new fields in your C++ codes but they >> never mention that you also need to edit your XML dictionary >> to reflect the new fields. I suppose this should have been >> obvious, but I pulled my hair out over it for half an hour or >> so before figuring it out. It might be worthwhile to add a >> note to that effect in the section on "User Defined Fields." >> >> best, >> Jim Wiggs >> >> >> >> ------------------------------------------------------- >> SF email is sponsored by - The IT Product Guide >> Read honest & candid reviews on hundreds of IT Products from real >> users. >> Discover which products truly live up to the hype. Start reading now. >> http://productguide.itmanagersjournal.com/ >> _______________________________________________ >> Quickfix-users mailing list >> Qui...@li... >> https://lists.sourceforge.net/lists/listinfo/quickfix-users >> >> > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real > users. > Discover which products truly live up to the hype. Start reading now. > http://productguide.itmanagersjournal.com/ > _______________________________________________ > Quickfix-users mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-users > |