{{Quickfixn}} Setting non QuickFix fields

Rettenmier, Curt Curt.Rettenmier at avistacorp.com
Mon Oct 24 08:46:35 PDT 2016


I have a custom tag field that needs to be set on the logon message and need some assistance. The QuickFix doc on the web site says:
For setting a field that isn't a property of a message, use setField:
order.SetField(new Account("18861112"));

But in this example Account is part of the QuickFix field map so it works. As far as I can tell there are no methods to handle non QuickFix fields.

My code is:
       public void ToAdmin(QuickFix.Message message, QuickFix.SessionID sessionID)
        {
            if (message.Header.GetField(Tags.MsgType) == MsgType.LOGON)
            {
                //Add Username and Password fields to logon message
                message.SetField(new Username(sICEUserID));
                message.SetField(new Password(sICEPassword));
                //10/21/2016 add strategy preference code to receive legacy security definition messages
                message.SetField(new StrategyPreference(0));
           }

Since QuickFix fields do not recognize the StrategyPreference as are the Username and Password I created a class called StrategyPreference but this does not work since the signatures for SetField are:
[cid:image001.png at 01D22DD3.1E416FC0]
Any assistance would be appreciated.

Thanks,
Curt Rettenmier
Software Developer
Avista Corporation
509-495-8492
curt.rettenmier at avistacorp.com<mailto:curt.rettenmier at avistacorp.com>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20161024/fc28981e/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 7800 bytes
Desc: image001.png
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20161024/fc28981e/attachment-0001.png>


More information about the Quickfixn mailing list