Every product usually has its own proprietary protocol. Protocol is very often implemeted as a state machine, each byte has it's role and main purpose is to receive protocol packets and execute some commands.
These commands are very often too specific for each product, therefore is not possible to simply reuse protocol from another product and new protocol with new state machine must be developed.
Reusable procotol must contain more generic commands like:
turnLEDon (int ledNumber)
turnLEDoff (int ledNumber)
activateOutput (int outputNumber)
deactivateOutput (int outputNumber)
readConfiguration()
storeConfiguration()
readParameter (int paramNumber)
storeParameter (int paramNumber, int paramValue)
readFromExternalMemory (int address, int length)
storeToExternalMemory (int address, int length)
openPort (int portNumber)
writeToPort (and receive answer)
readFromPort (just receive data)
closePort
Such commands can be reused for more products. You actually don't need to reimplement whole protocol state machine, you just need few callback functions for calling diffent methods for opening port, activating output, turning LED on etc. Using of the same protocol means that you can also use the same debug tools (e.g. the same protocol analyzer).