Without an ending delimiter, how do you know, in a stream of data like ‘1’, ‘2’, ‘7’, 4’, ‘1’, ‘5’, ‘8’, ‘1’, ‘2’, which characters go together to form a number?
Can you tell in a stream like ‘<’, ‘1’, ‘2’, ‘7’, ‘>’, ‘<’, 4’, ‘1’, ‘>’, ‘<’, ‘5’, ‘8’, ‘>’, ‘<’, ‘1’, ‘2’, ‘>’?
Unless you can be assured that the three characters following the = will always be sent, and that there will always be three characters, yes, it is a bad assumption.
What’s so difficult about making the sender send <X=300> or <X=30> or <X=5>?
20 000 user can connect and send information. Maybe I will resign to ask the guy that do the flash programing padd the number with 0 to always have good calculation.
controling an antenna Rotor over internet. On a website that permit to share radio and control it over internet.
I finaly found a "great" solution. (as the user will send X=XXX)
I test to see if I have a number from 0 to 9 on byte 5 if yes I do calculation for 3 digit. If not I test if I have a number from 0 to 9 on byte 4, if yes I do calculation with only two digit, and at last I use only the byte 3 to only say that the number is from 0 to 9