question

Upvotes
Accepted
34 6 12 17

Rssltime nanosec

I am trying to populate the Rssltime structure upto nanosec and can see data correct inside debugger before encoding


(gdb) p value
$1 = {hour = 12 '\f', minute = 14 '\016', second = 7 '\a', millisecond = 966, microsecond = 111, nanosecond = 999}
(gdb)



(gdb) p fieldEntry
$2 = {fieldId = 14305, dataType = 10 '\n', encData = {length = 0, data = 0x0}}


and then I encode if ((ret = rsslEncodeFieldEntry(&encIter, &fieldEntry, &value)) == RSSL_RET_BUFFER_TOO_SMALL)


The ret is 0. Is there anything I am doing wrong? We can't see mirco or nano and ADS does not send us value

<fieldEntry fieldId="14305" dataType="RSSL_DT_TIME"/>

Image Received


If we connect to TREP FH directly we can see the hex value as for fid 14305


0C0E 0703 C618 6FE7


I hardcoded the time as 121407966111999 (hhmmssmmmmmmnnn)


The hex value is good through 966 (ie..millisec) and then wrong. Anything I am doing wrong?

trep
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
Accepted
80k 257 52 75

@vishal.anand

It could be a problem with rmdstestclient which doesn't support nanosecond fields.

I ran rmdstestclient from infra_tools0.0.6.L1 on my Windows machine. It showed the following data.

 <fieldEntry fieldId="14312" dataType="RSSL_DT_TIME" data=" 15:36:57:449"/>

14312 is a nanosecond field.

SRC_ES_NS  "SRC EGRESS TM NS"   14312  NULL        INTEGER            15  TIME             8

However, I ran testclient from an ADS package on a Linux machine and it showed the following data.

 <fieldEntry fieldId="14312" dataType="RSSL_DT_TIME" data="15:36:57:449:000:000"/>


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Yes with rmdstestclient I can see milliseconds.


My EMA client can decode till nanoseconds. I think I am good with the answer. Thanks for all the support.

Upvotes
34 6 12 17

Also just encoding till milliseconds work


<fieldEntry fieldId="14305" dataType="RSSL_DT_TIME" data=" 12:14:07:966"/>


but if I encode micro or nano or both it does not work

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
80k 257 52 75

@vishal.anand

I tested with the direct connection between an ETA interactive provider and an EMA Consumer.

I used the following code to encode the field entry.

    RsslTime value;
    value.hour = 12;
    value.minute = 14;
    value.second = 7;
    value.millisecond = 966;
    value.microsecond = 111;
    value.nanosecond = 999;


    rsslClearFieldEntry(&fEntry);
    dictionaryEntry = dictionary->entriesArray[14305];
    if (dictionaryEntry)
    {
        fEntry.fieldId = 14305;
        fEntry.dataType = dictionaryEntry->rwfType;
        if ((ret = rsslEncodeFieldEntry(&encodeIter, &fEntry, (void*)&value)) < RSSL_RET_SUCCESS)
        {
            printf("rsslEncodeFieldEntry() failed with return code: %d\n", ret);
            return ret;
        }
    }

The following is the data published by an ETA interactive provider.

<updateMsg domainType="RSSL_DMT_MARKET_PRICE" streamId="4" containerType="RSSL_DT_FIELD_LIST" flags="0x0" updateType="0 (RDM_UPD_EVENT_TYPE_UNSPECIFIED)" dataSize="50">
    <dataBody>
        <fieldList flags="0x8 (RSSL_FLF_HAS_STANDARD_DATA)">
            <fieldEntry fieldId="6" data="0C67"/>
            <fieldEntry fieldId="22" data="0C66"/>
            <fieldEntry fieldId="25" data="0C4F 52"/>
            <fieldEntry fieldId="32" data="0C00 9896 80"/>
            <fieldEntry fieldId="11" data="0C4F 5B"/>
            <fieldEntry fieldId="267" data="0A37 26"/>
            <fieldEntry fieldId="14305" data="0C0E 0703 C618 6FE7"/>
        </fieldList>
    </dataBody>
</updateMsg>

An EMA consumer displayed the following message.

UpdateMsg
    streamId="5"
    domain="MarketPrice Domain"
    updateTypeNum="0"
    name="IBM.N"
    serviceId="1"
    serviceName="DIRECT_FEED"
    Payload dataType="FieldList"
        FieldList
            FieldEntry fid="6" name="TRDPRC_1" dataType="Real" value="1.03"
            FieldEntry fid="22" name="BID" dataType="Real" value="1.02"
            FieldEntry fid="25" name="ASK" dataType="Real" value="203.06"
            FieldEntry fid="32" name="ACVOL_1" dataType="Real" value="100000.00"
            FieldEntry fid="11" name="NETCHNG_1" dataType="Real" value="203.15"
            FieldEntry fid="267" name="ASK_TIME" dataType="Time" value="10:55:38:000:000:000"
            FieldEntry fid="14305" name="EVENT_T_NS" dataType="Time" value="12:14:07:966:111:999"
        FieldListEnd


    PayloadEnd
UpdateMsgEnd

According to my test, the nanosecond field (EVENT_T_NS) works fine.

How did you get this message?

<fieldEntry fieldId="14305" dataType="RSSL_DT_TIME" data=" 12:14:07:966"/> 

You can also refer to the Coding For High Precision Time article for more information.


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

When I query direct I can see the same hex value as you

<fieldEntry fieldId="14305" data="0C0E 0703 C618 6FE7"/>


but when I query via ADS using rmdstestclient, I get the following without any value and a message that "Image Complete"

<fieldEntry fieldId="14305" dataType="RSSL_DT_TIME"/>


I got the following message when querying via ADS with rmdstestclient. However if I use EMA client and decode the data then I can see the timestamp correctly. Is there an issue with rmdstestlcient then?

How did you get this message?

  
                   
  1. <fieldEntry fieldId="14305" dataType="RSSL_DT_TIME" data=" 12:14:07:966"/> 

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.