Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
"Standardized" (Fixed) Output Format...
#2
David,
The reason most [older] industrial protocols use the fixed message size was performance. The devices simply didn't have enough computing power to parse a protocol that uses "regular" grammar, let alone "context-free".
Modern android device (or frankly, even an Arduino) won't have any problems dealing with regular grammar so there is no point in sending all the extra unneeded stuff down the wire.

Parsing TouchDRO protocol is beyond trivial: you need to code a basic finite state machine with a small handful of states: "Reset", "Expecting Axis Label", "Expecting Sign or Digit", "Expecting Digit", "Expecting Digit or Terminator", "Terminator". When you reach the "Terminator" state, send the position to the UI thread.
Regards
Yuriy
Reply


Messages In This Thread
RE: "Standardized" (Fixed) Output Format... - by Yuriy - 02-15-2020, 07:00 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)