The Message Frame structure is used by all messages sent with the Azande Protocol.


A message has following parts:

  • START and END character.
  • ID and SUB ID: Gives the message an unique identity
  • PAYLOAD: Holds data from sender.
  • CRC: Type 16-CCITT



Frame

Unescaped Frame

Byte#

0

1

2

3 .. N-3

N-2

N-1

N

Name

START

ID

SUB ID

PAYLOAD

CRC MSB

CRC LSB

END

Value

0xAA

[0..255]

[0..255]

Optional

CRC16-CITT

0xBB




Escaped Frame

Byte#

0

-

-

-

-

-

N

Name

START

-

-

-

-

-

END

Value

0xAA

Escaped area without any 0xAA or 0xBB

0xBB


More information about escaping.



ID and SUB ID

The 2 bytes ID and SUB ID gives the message an unique identity.


Payload

All but the VOID messages have payload, holding data for the receiver.


CRC


Bytes

Byte # 0 to N-3

Type

CRC16-CCITT

Seed

0xFFFF

Polynomial

x16 + x12 + x5 + 1



START and END characters

The START and END characters frames one message.


Name

Value

START

0xAA

END

0xBB