Re: [Quickfix-developers] Question about Fields.h
Brought to you by:
orenmnero
From: Oren M. <or...@qu...> - 2004-08-19 11:19:12
|
Well, you don't have to go through all this, although some people do it this way. This is the documentation that covers this topic: http://www.quickfixengine.org/quickfix/doc/html/user_defined.html. Remember, that the data dictionary used for generation does not necessarily have to be the exact same one used for validation. If you do plan on using the code generation, then you must always generate off of the newest spec. Field definitions can change in later versions, but they tend to be backwards compatible or they get a name change. A MultipleValueString can certainly accommodate any value you would put in a char. When you validate on FIX.4.2, as long as you provide a DataDictionary, this field will be pre-validated for you to ensure it is a char. So you can be safely assume that you will be getting a string of length 1. Now if you really want a char field for FIX.4.2, there is nothing to stop you from adding multiple fields with the same tag. So you can add the line <field number="292" name="CorporateAction42", type="CHAR"> , and you can start using that for 4.2 if you like, but really using the newer one is fine as long as you don't add multiple values. Besides, the reason they made it a MultipleValueString is likely because people were sticking more than one in there anyway, so you should check with your counter-party if they allow this on their FIX.4.2 sessions. --oren On Aug 19, 2004, at 3:08 AM, Paul Watkins wrote: > Hi, > > I am running into some incompatibilities between FIX versions and > would appreciate some recommendations on a workaround. > > One of the FIX engines we are connecting to is version 4.2, but has > some user-defined fields. I have added those fields to the end of > FIX44.xml and re-generated Fields.h, Values.h and FieldNumbers.h > because that seems to be where it is done. > > However, this results in incorrect field definitions for some of the > 4.2 messages. For example in 4.4, CorporateAction is a > MultipleValueString, but in 4.2 it is a char. > > If I try to generate the Fields.h etc files from a modified 4.2 spec > then of course none of the 4.4 message definitions compile and I can't > support any 4.4 connections. > > Is there a way that I can support this 4.2 FIX version with correct > Field definitions, and also maintain compatibility with 4.4 systems, > or am I going to need to generate different Fields.h versions for > different FIX versions which is a little messy. > > Any suggestions? > > Thanks, > Paul Watkins > > > NOTICE > The information contained in this email is confidential. If you are > not the intended recipient, you must not disclose or use the > information in this email in any way. If you received it in error, > please tell us immediately by return email and delete the document. We > do not guarantee the integrity of any e-mails or attached files and > are not responsible for any changes made to them by any other person. > |