Hello,
I am again looking for advice on implementing additional functionality to a protocol.
I'm using Orbcomm Protocol where besides the basic stuff like position, id, speed etc there is another package like raw payloads which contains additional information, user behavior, sensors, commands to server part and many other things. In total there are over 30 types of payloads.
Each additional packet is decoded differently, depending on the mask the same bit or bytes have different meaning.
What I can't determine for myself is how to organize the code.
Should it be functional or should it be OOP, should each payload be a class or should it be one general class with different decoding functions?
Thanks in advance!
Different functions. Just check some existing protocols for example.
Hello,
I am again looking for advice on implementing additional functionality to a protocol.
I'm using Orbcomm Protocol where besides the basic stuff like position, id, speed etc there is another package like raw payloads which contains additional information, user behavior, sensors, commands to server part and many other things. In total there are over 30 types of payloads.
Each additional packet is decoded differently, depending on the mask the same bit or bytes have different meaning.
What I can't determine for myself is how to organize the code.
Should it be functional or should it be OOP, should each payload be a class or should it be one general class with different decoding functions?
Thanks in advance!