For a deeper look into our Elektron API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
21 0 2 5

RSSL_DMT_MARKET_PRICE refresh/upfate message datasize field

In order to test our application we are using sink_driven_source reading generated XML messages based on those captured by rmdstestclient.

Can you advise on whether datasize field is required to be correct and if so how is it calculated? From the data captured I am unable to determine what this size relates to.

e.g.

<!-- rwfMajorVer="14" rwfMinorVer="0" -->
<updateMsg domainType="RSSL_DMT_MARKET_PRICE" streamId="5" containerType="RSSL_DT_FIELD_LIST" flags="0x18 (RSSL_UPMF_HAS_MSG_KEY|RSSL_UPMF_HAS_SEQ_NUM)" updateType="0" seqNum="5470" dataSize="8">
<key flags="0x7 (RSSL_MKF_HAS_SERVICE_ID|RSSL_MKF_HAS_NAME|RSSL_MKF_HAS_NAME_TYPE)" serviceId="467" name="EUR=" nameType="1"/>
<dataBody>
<fieldList flags="0x8 (RSSL_FLF_HAS_STANDARD_DATA)">
<fieldEntry fieldId="3293" dataType="RSSL_DT_REAL" data="-0.0062"/>
</fieldList>
</dataBody>
</updateMsg>

datasize = 8 and there are 7 characters in the data

In another message there datasize = 24 whereas there are 16 characters?

Can you advise how to populate the datasize field?
elektronrefinitiv-realtimeelektron-sdkdatasink-driven-source
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.

Hello @mike.ford

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?

If yes, please click the 'Accept' text next to the reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.

Thanks,

AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such. Thanks, AHS

Upvotes
Accepted
21 0 2 5

Sorry I have the answer from the Real64.h header file

Real64 values have up to 4 bytes of precision with a 63-bit mantissa (the value) and
a 5-bit value (the magnitude type) representing 22 exponent values and 9 fractional values.
Real64 has a range of -2^63*10^7 to (2^63-1)*10^7 with an accuracy of 19 to 20
decimal digits. Fewer bytes may be used if the full precision is not needed.






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
79.2k 251 52 74

@mike.ford

RSSL uses binary to represent the REAL data (RSSL_DT_REAL) so it uses 8 bytes to represent this field list.

<fieldList flags="0x8 (RSSL_FLF_HAS_STANDARD_DATA)">
 <fieldEntry fieldId="3293" dataType="RSSL_DT_REAL" data="-0.0062"/>
</fieldList> 

The binary looks like 08 00 01 0c dd 02 0a c2.

From the binary, 0c dd is fieldId (3292) and 0a c2 represents REAL (-0.0062).

The size of the payload depends on data types of field entries.

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
21 0 2 5

Thanks for quick response.
In running a test and logging to an file the XML data received by out application it looks like the dataSize field is populated by the process sink_driven_src rather than using the value from the XML data file for sink_driven_src.
I was concerned if this value was incorrect in the XML data file then either sink_driven_src or our application would not behave correctly but this doesn't seem to be the case.
As trying to calculate this value for each message qould be difficult we will set this value to 0 in the data XML file (to avoid confusion) for sink_driven_src and verify a reasonable value is populated in the XML received by our applicaition.

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
21 0 2 5

I am struggling to work out how 0ac2 hex represents -0.0062.
Can you explain the data representation of RSSL_DT_REAL (REAL64 in the dictionary) to we can understand the accuracy of the values coming in and therefore when representing them as a string how many significant figures should be printed without loosing accuracy.

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.

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.