[14bit] Packet Frame Start token
[0xB5, 0xAC] 14 bits used as token, 2 bits Packet Type field
[ 2bit] Packet Type
The packet type is the 2 lsb of the 2nd packet framing byte (0xAC)
0 : Response Packet
1 : Data Packet
2 : Data NACK Packet (no ack but still nacked on payload corruption) "Data Stream Packet"
3 : DATA FaF Packet, Fire and Forget, Gets no response and does not need stream synchronisation (Header SYNC field not used, SYNC not incremented)
Depending on the Packet Type the Packet can have 2 formats:
[ 8 bit] Sync : Previous Packet Sync + 1
[ 8 bit] Channel : The Service channel to send the packet to
[ 8 bit] Packet ID : Packet ID passed to Service running on Channel
[16 bit] Payload Length: Lengths of the optional Packet Payload
[ 8 bit] Header Checksum : CRC8 (poly : 0x31) of all Header bytes
optional
Packet Payload: Payload Length bytes of data
[16 bit] Payload Checksum: CRC16 CCIT (poly : 0x1021) checksum of the payload
[ 8 bit] Response Code
[ 8 bit] Sync ID : The Sync ID of the packet being responded to
[ 8 bit] Header Checksum : CRC8 (poly : 0x31) of all Header bytes