Just my 2c worth -- you need to make sure that you can easily convert the incoming characters to message and determine if messages are valid before processing -- usually by using distinguishing start and end of message characters (such as ASCII STX and ETX) and by including a message length byte and some simple checksum (such as an XOR of the characters in the message). Also for shorter messages I would give a higher weight to ease of parsing, while for longer messages reducing the size of the message might be more important (for example a message which returns
"A=3,B=50,C=300" where A,B,or C is in the range 0-999 I would just as soon see "A=003,B=050,C=300" so I can get the values from the message by position rather than parsing the string for tokens. however
if the message returns 2000 values its might be better to leave off the leading 0's and parse the message.) Also, depending on what the device does their is sometimes a message to switch between polling for status vs asynchronous sending of messages from the device. I am not sure if this is the kind of info you are looking for or not? I have also included an attachment for the protocol to a cm11a X10 controller (not because I think it is a template to follow, but just because I needed to use it recently and had it laying around -- it may be harder to understand than its worth????)