question

Upvotes
Accepted
163 11 11 19

How can I calculate bytes received on a channel in a UPA application.

I want to record the number of update bytes received on a channel in my UPA application.

I think what I need to do is, for all RSSL_MC_REFRESH and RSSL_MC_UPDATE messages get the size of the data in the RsslUpdateMsg or RsslUpdateMsg message before I decode it.

I'm guessing that the size is either msgBase.encDataBody.length or msgBase.encMsgBuffer.length but I'm not sure which.

The descriptions of encDataBody and encMsgBuffer are a bit confusing as they say the buffers are populated by the user. But I'm guessing thats for message the app creates and that when a message is received by the app the contents of these buffers reflect what's been received from the ADS. Is that correct ?

elektronelektron-sdkrrteta-apielektron-transport-api
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 @andy.sciascia,

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

Hello @andy.sciascia,

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

Thanks,

-AHS

1 Answer

· Write an Answer
Upvotes
Accepted
32.2k 40 11 20

Hello @andy.sciascia,

Correct.

Both measurements should work the same to calculate the bytes received via refreshes and updates, as encoded data body gets encoded into a buffer.

I would go with encodedDataBody.length() as it's easier and is available to the parsing code quicker, but either should 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.

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.