{{Quickfixn}} Setting non QuickFix fields

Grant Birchmeier gbirchmeier at connamara.com
Mon Oct 24 09:31:26 PDT 2016


Ha, I know exactly which counterparty are working on.  :)  I'm starting the
corresponding work on my client's app right now.  (Mine is QF/j, though.)

Try creating a new StringField object and passing that into SetField(),
e.g.   new StringField(9006,"0")  (You could use a BooleanField instead, I
guess, but it doesn't really matter.)

I think that will work.

More generally, though, I'm a big fan of regenerating the QF source and
building a custom QF library that will include all my custom classes and
correct repeating groups.

On Mon, Oct 24, 2016 at 10:46 AM, Rettenmier, Curt <
Curt.Rettenmier at avistacorp.com> wrote:

> 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:
>
> Any assistance would be appreciated.
>
>
>
> Thanks,
>
> *Curt Rettenmier*
>
> Software Developer
> Avista Corporation
> 509-495-8492
> curt.rettenmier at avistacorp.com
>
>
>
> _______________________________________________
> Quickfixn mailing list
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20161024/fa139fc1/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 7800 bytes
Desc: not available
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20161024/fa139fc1/attachment-0002.png>


More information about the Quickfixn mailing list