question

Upvotes
Accepted
131 6 6 14

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.

1 Answer

Upvotes
Accepted
29k 33 11 15

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.