11 years, 6 months ago.

How do I calculate the number of bytes in a block-telegram?

I need to write a function that calculates the number of the received bytes of a block telegram.

Block telegram: (examples)

8 2 11 8 10 57 7e 2 0 0 0 0 0 10 1 2 0 fa 49 ae 0 aa

8 6 11 8 10 58 81 1 10 4 2 10 4 3 10 84 4 10 84 5 10 84 6 10 84 e5 12 3d 0 7 10 84 8 10 0 9 10 80 a 10 80 b 10 0 c 10 4 0 0 0 0 0 0 28 13 b 0 aa

The 2 and the 6 probably will used for it, but I don't know how.

Information: RS485.format(8,Serial::Forced1,1); 8 Data bits 4 security bits?!

I don't know if anyone can help me. :)

Be the first to answer this question.