qubobus - robotics-at-maryland/qubo GitHub Wiki
qubobus
qubobus is our in house serial protocol for communication between the tiva and the jetson. This document describes qubobus's operation in detail and should be read by any new members who'd like to become familiar with our embedded system.
You can find the source for qubobus in qubo/qubobus
. There are also symbolic links to this directory throughout our system to make includes easier (e.g. qubo/embedded/qubobus
and qubo/src/vl_qubo/drivers/qubobus
).
Messages
The basic unit of qubobus is the Message
. The full definition of Message
is found in qubo/qubobus/include/io.h
. Each Message
has a struct Message_Header header
, a struct Message_Footer footer
, a void *payload
, and a uint16_t payload_size
.
Message Headers
Each struct Message_Header
has four fields: uint16_t num_bytes
, uint8_t message_type
, uint8_t message_id
, and uint16_t sequence_number
.
uint16_t num_bytes
indicates the size of the message in bytes, including the whole header, footer, and payload.
uint8_t message_type
is one of eight message types. See Message Types or qubo/qubobus/include/message.h
for more on message types.
uint8_t message_id
is one of the many message ids defined throughout the qubobus headers. See Message IDs or qubo/qubobus/include
for more information.
uint16_t sequence_number
is used for tracking message ordering.
Message Footers
Each struct Message_Footer
has one field: uint16_t checksum
, which is a crc16 checksum of all the previous bytes in the message, not including itself.