question

Upvotes
Accepted
46 3 2 7

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 5.0 MiB each and 10.0 MiB total.

1 Answer

Upvotes
Accepted
23k 22 9 14

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 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea