Packetizer - PalouseRobosub/SUBLIBinal GitHub Wiki

Packetizer

SUBLIBinal offers a unique way of sending information along different communication protocols in a packetized format. This is so that data interpretation can be streamlined if a device is initialized in the middle of a packet. If this were to occur, programs could get confused by reading the last half of one packet and the first half of the next as a full packet. The packetizer wraps information in a bundle to ensure that information is maintained. The packetizer documentation has been broken up into three subsections: enumerations, structures, and available functions. Please select one of the links below to be redirected to the appropriate documentation.

Packetizer Implementation:

To view examples of the Packetizer being implemented with the SUBLIBinal library, please refer to the Packetizer Example.


What is the Packetizer?

The packetizer is a higher level communication scheme implemented within SUBLIBinal. The packetizer functions by sending two extra pieces of information along with the data. These two pieces of information are a control byte and a size byte. The control byte is a way of informing the recipient that this is the beginning of a packet. The size byte tells the recipient how much data will be following it in the packet. This scheme allows for the verification of data and the correct retrieval of data over an asynchronous protocol. Currently, the packetizer is only implemented for sending and receiving with UART.

Note: Future development aims to bring the packetizer to both I2C and SPI.