tof_dataclasses

Module packets

Source
Expand description

Packets are a way to send data over the network.

Data gets serialized to a bytestream and then header and tail bytes are added to the front and end of the stream.

A TofPacket has the following layout HEAD : u16 = 0xAAAA TYPE : u8 = PacketType SIZE : u32 PAYLOAD : [u8;6-SIZE] TAIL : u16 = 0x5555

The total packet size is thus 13 + SIZE

Re-exports§

Modules§

Structs§