I am working on a bit of a side project where I am trying to monitor the status of a radio, with the final goal of using it to log signal level against GPS location. The uses a proprietary serial protocol that sends and receives messages as basic text. The format of this is generally [ID][Size][Parameters][checksum] where ID is a single ASCII character to categorize the message, Size is the number of characters in the parameters field and is expressed in ASCII hex notation (2 characters), The parameters field is optional and depends on the type of message, checksum is 8 bit checksum of the ID, Size & Parameters fields.
I am thinking that i will need to detect the first character (ID) and then have some function to break up the remaining text and create an output message.
some examples of message id's are: e = error, p=progress report, v=version numbers, etc.
for instance, if i receive p0205C9 it is a progress report, 2 characters in the parameters field, 05 = receiver busy.
I am not sure how the best way is to split these messages up so that i can match it with the list of different functions/parameters.
Are there specific nodes that would be suited or should i do it all in a single function node? I am a complete novice with writing functions but can generally learn quickly from examples.
Any help would be greatly appreciated