{{Quickfixn}} Custom Dictionaries - how can I make them active?

alancloughley at hotmail.com alancloughley at hotmail.com
Thu Feb 4 10:21:42 PST 2021


Got it working, not sure what I did but the generate.rb re-ran and all is good!!

 

Thanks for the support Grant, fantastic stuff!

 

From: alancloughley at hotmail.com <alancloughley at hotmail.com> 
Sent: 04 February 2021 17:20
To: 'Mailing list for QuickFIX/n' <quickfixn at lists.quickfixn.com>
Subject: RE: {{Quickfixn}} Custom Dictionaries - how can I make them active?

 

Thanks Grant, that’s what I guessed it could be. Last problem…hopefully…when I change the xml and re-run the ruby generate.rb script the console window just opens and closes, doesn’t appear to be doing anything. First time I ran it I could see it working and listing the xml’s it was working through. Do I need to delete a previous file/database somewhere before I can re-run the generate.rb?

 

From: Quickfixn <quickfixn-bounces at lists.quickfixn.com <mailto:quickfixn-bounces at lists.quickfixn.com> > On Behalf Of Grant Birchmeier
Sent: 04 February 2021 17:03
To: Mailing list for QuickFIX/n <quickfixn at lists.quickfixn.com <mailto:quickfixn at lists.quickfixn.com> >
Subject: Re: {{Quickfixn}} Custom Dictionaries - how can I make them active?

 

Hi Alan.  The file-size filter caught your other message, I'm gonna kill it because we don't need to send that screenshot to everybody.

 

I do see the issue.  In your DD, the OrdType=3 description can't be turned into a C# constant.  I assume it looks like this:

 

<value enum="3" description="STOP / STOP_LIMIT" />

 

Go into your DD and change that to something like:

 

<value enum="3" description="STOP_OR_STOP_LIMIT" />

 

(I'll have to note that in the new generator that I'm writing.  It should just blindly plug these strings into code without some validation/correction first.)

 

Give that a shot.

 

On Thu, Feb 4, 2021 at 9:58 AM Grant Birchmeier <gbirchmeier at connamara.com <mailto:gbirchmeier at connamara.com> > wrote:

Your questions are perfectly rational and understandable.  This is something that often trips new users up.

 

Think of message reception as being in 2 phases:

1) receiving the message and validating it against the configured DD xml file, and creating a generic Message object

2) the engine passing that generic Message object to your app code, where MessageCracker or your own logic may convert it to specific FIX message classes/fields

 

In (1), the engine uses your configured DD to read and validate the message, and create a generic Message object.  If the message had DD-validation errors, like missing required fields, it would be rejected like you'd expect.

 

In (2), now you have a generic Message object.  Say your DD defined a "FooTradeReport" with 35="FTR".  If you received such a message, then msg.Header.GetString(35) would indeed return "FTR".  All the generic field/group accessors (e.g. GetField(), GetGroup(), GetDateTime(), etc) will return fields and groups in the message according to your DD.

 

But "crack()" won't work, because there's no "FooTradeReport" message class.  That's what you really want, right?  With proper named-field accessors?  But nobody wrote any C# source for that class, so it doesn't exist.

 

But you can generate it!  All the message classes and fields in fix44.dll (and the others) are generated from the default DD xml files.  And you can do it too!  Only... you have to use Ruby.  (This is a long-standing speedbump on the project.  I am literally this week working on a C#-implemented code-generator, but it's not ready yet.)

 

This email is getting long, so I'll stop being wordy and just hit you with the steps:

1) install Ruby (2.5 or later)

2) run "gem install nokogiri" to install this Ruby xml library

3) get the QF/n source from github

4) overwrite spec/fix/FIX44.xml with your DD

5) run "ruby generator\generate.rb"

6) Open QuickFIXn.sln and build

7) Get your new dlls from Messages/FIX44/bin

 

Depending on your DD's changes, some UnitTests and Examples might break because they are expecting the "vanilla" FIX44 classes.  Don't worry about it.  You don't need those anyway.

 

Please let me know if you have questions.

 

 

On Thu, Feb 4, 2021 at 8:38 AM <alancloughley at hotmail.com <mailto:alancloughley at hotmail.com> > wrote:

Hi,

 

I’m getting to grips with building my own QF app however I am having some problems when it comes to using XML Dictionaries.

 

My broker provides a custom dictionary in xml format, this is required because it contains message types that are not standard. In my QFapp’s cfg file I point it towards the brokers xml dictionary however my app seems to still just be using the standard Fix44 xml, I cannot reference any of the custom message types listed in the brokers xml filw. I noticed that along with the standard FIX44 xml file, there is also a fix44.dll file that gets referenced in my app. So, in order to use my brokers xml dictionary is there a step I need to take to turn the brokers xml file into into a dll file first? If that is the case, how do I build the dictionary dll file? Also, just for my better understanding of the whole process, currently I reference the standard fix44.dll in my app, however in my cfg file, I reference the brokers xml dictionary, I am just wandering what is actually happening if my cfg file is pointing towards an xml dictionary that doesn’t appear to be in use by the app?

 

Thanks

 

Al

_______________________________________________
Quickfixn mailing list
Quickfixn at lists.quickfixn.com <mailto:Quickfixn at lists.quickfixn.com> 
http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com




 

-- 

Grant Birchmeier

Connamara Systems, LLC

Made-To-Measure Trading Solutions.

Exactly what you need. No more. No less.

http://connamara.com




 

-- 

Grant Birchmeier

Connamara Systems, LLC

Made-To-Measure Trading Solutions.

Exactly what you need. No more. No less.

http://connamara.com


This email, along with any attachments, is confidential. If you believe you received this message in error, please contact the sender immediately and delete all copies of the message. Thank you from Connamara Systems, LLC.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20210204/ecc81341/attachment.htm>


More information about the Quickfixn mailing list