Vikram's question

70 views
Skip to first unread message

Dale Wilson

unread,
Apr 28, 2016, 8:35:34 AM4/28/16
to quickfa...@googlegroups.com
Hi Vikram

​To ask a new question on this list, please edit the subject line to reflect your question rather than replying to a previous question.  That will ensure that we notice this is a new question rather than an attempt to answer the old one.

The only information you have given us about your problem is "nothing seem to be working" Please tell us what you expect to see and what you are actually seeing that leads you to believe it did not work.

Dale​



On Thu, Apr 28, 2016 at 6:15 AM, vikram patil <vikrampra...@gmail.com> wrote:
      SnapshotChannelMessageInterpreter handler(std::cout);
        ExchangeGenericMessageBuilder builder(handler);

        QuickFAST::Codecs::NoHeaderAnalyzer noHeaderAnalizer_;
        Codecs::StreamingAssembler assembler(templateRegistry,
                noHeaderAnalizer_, builder, false);
        assembler.setReset(true);
        Communication::TCPReceiver receiver("IP","PORT");
        std::cout << "\n TCP connection connected or not : "
                << receiver.start(assembler) << std::endl;
        QuickFAST::Codecs::Encoder encoder(templateRegistry);
        //QuickFAST::template_id_t templateId = logOnTemplateID;
        QuickFAST::Messages::Message message(LOG_ON_EXPECTED_FIELDS);
        QuickFAST::Codecs::DataDestination encodingDestion;
        //messageType(compulsory)
        message.addField(MessageTypeFieldIdentity,
                Messages::FieldAscii::create(LOG_ON_MESSAGE_TYPE)); //log on message
        //sendingTime(compulsory)
        message.addField(SendingTimeFieldIdentity,
                Messages::FieldAscii::create("SendingTimeValue"));
        //HeartBtInt(compulsory)
        message.addField(HeartBtIntFieldIdentity,
                Messages::FieldUInt32::create(HeartBtIntervalValue));
        //User-name(compulsory)
        message.addField(UsernameFieldIdentity,
                Messages::FieldAscii::create("UsernameValue"));
        //Password(compulsory)
        message.addField(PasswordFieldIdentity,
                Messages::FieldAscii::create("PasswordValue"));
        encoder.encodeMessage(encodingDestion, LOG_ON_TEMPLATE_ID, message);
        printf("\n  snapshot log on message is encoded ");
        std::cout << "\n Sending Snapshot log on message: "
                << receiver.send(encodingDestion) << std::endl;
        receiver.run();


I wrote same skeleton with FastEncodedHeaderAnalyzer,MessagePerPacketAssembler but nothing seem to be working. Any problem in my work flow


--
Turn Observation into Data. Turn Data into Information. Turn Information into Knowledge. Turn Knowledge into Wisdom. Turn Wisdom into Beauty. Turn Beauty into Love .

vikram patil

unread,
Apr 28, 2016, 11:23:49 PM4/28/16
to quickfast_users
Sorry, Next time onwards I'll keep this in mind.

vikram patil

unread,
May 3, 2016, 5:38:09 AM5/3/16
to quickfast_users
HI Dale,
Kindly guide us on adding header on the FAST encoded message.


On Thursday, April 28, 2016 at 6:05:34 PM UTC+5:30, Dale Wilson wrote:

Dale Wilson

unread,
May 3, 2016, 7:48:17 AM5/3/16
to quickfa...@googlegroups.com
The TemplateID is a special field in FAST, but all the other fields of a FAST message are treated equally.  FAST does not "know" about the structure of a FIX message (beyond what the template tells it)

The fields in the FIX header and trailer on a FAST encoded message are handled just like any other fields -- define them in the template and provide values to the the encoder for those fields. There are, however, two fields that can cause problems:  message length in the header and checksum in the trailer.

These two fields are left over from encoding FIX messages as simple character strings.  They are not particularly meaningful for a FAST encoded message since the number of bytes and the actual contents of those bytes might vary, so it is possible that you and your counterparty can agree to ignore the contents of these fields.

If not, however,  you may have to produce a temporary FIX/text representation of the message so you can obtain values for these fields to use during the actual FAST encoding.  Unfortunately QuickFAST does not currently help with this.

Dale 

--
You received this message because you are subscribed to the Google Groups "quickfast_users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quickfast_use...@googlegroups.com.
To post to this group, send email to quickfa...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quickfast_users/4fd02a71-9882-4479-ae93-104323c960af%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

vikram patil

unread,
May 3, 2016, 8:30:08 AM5/3/16
to quickfast_users
Thanks for explanation. I got solution
message = std::string(1, static_cast<char>(message.size() | 0x80))
                + message;  //message is string representation of encoded data destination
        QuickFAST::Codecs::DataDestination sendingDataDestination;
        for (unsigned int i = 0; i < message.size(); i++) {
            sendingDataDestination.putByte(message.at(i));

Mounika Allagadda

unread,
May 4, 2016, 5:38:06 AM5/4/16
to quickfast_users
Hi Vikram,

Thanks for the aolution.
But can you please explain why you are doing or(|) operation with 0x80?
Is there any significance for that?

Thanks,
Mounika

vikram patil

unread,
May 4, 2016, 7:58:34 AM5/4/16
to quickfast_users
to make length one byte only.(solution actually I took from one of the question posted on this group).

Mounika Allagadda

unread,
May 5, 2016, 12:58:26 AM5/5/16
to quickfast_users
Thanks Vikram.
It worked for me.

-Mounika
Reply all
Reply to author
Forward
0 new messages