2.2.2 Frame Format, Data Frame

Data frames are messages that deliver user-specified data. The Data frames format specifies message boundaries and sequencing. Each message is identified by a messageid and each part of the message is identified by a sequence number. Each unique instance of a piece of a message is uniquely identified by a serial number. Message serial numbers help statistics-gathering mechanisms to differentiate between original instances of a message fragment and their retries.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

flags

messageid

sequence

serial

extended flags (optional)

NACK MASK (variable)

...

Data (variable)

...

flags (1 byte): A bitmask that contains values from the following table that are combined using the bitwise OR operation.

Note For a description of how these flags determine the frame type, see section 2.

Value

Meaning

0x80

(EXT or EXTENSION) Indicates that the extended flags field is present.

0x40

(BIG) Indicates that big frame formatted is used. This value MUST be 0 because the big frame format was never implemented.

0x20

(CMD or COMMAND) Indicates that this is a Data Frame. This bit MUST be set for Data Frames. If the EXT bit is also set, the packet MUST be ignored.

0x10

(STA or START) Indicates the start of a message that can span multiple protocol frames.

0x08

(EOM or END OF MESSAGE) Indicates the end of a message that can span multiple protocol frames.

0x04

(SAK or SEND ACKNOWLEDGE) Specifies a request for immediate acknowledgment (ACK) after this frame is received.

0x02

(ACK or ACKNOWLEDGE) Acknowledges receipt of some frames or the nonreceipt of frames if the extended flags are present. This bit MUST NOT be set for Data Frame messages.

0x01

(RLY or RELIABLE, ~UNRELIABLE) Indicates the message is reliable if set and unreliable if not set.

messageid (1 byte): A sequentially assigned value, starting at 1. The first message sent MUST be messageid 1. The second message sent is messageid 2, and so on. There MUST NOT be more than 24 outstanding messageid(s) on any link.

sequence (1 byte): The sequence number uniquely identifies the packet. It specifies the sequence space in which ACKs and NACKs are made.

serial (1 byte): For messages that do not span multiple packets and that set both the STA and EOM flags, the value of the serial field is the count of times this packet has been sent. If the value of serial is 0, this is the first instance of the packet. If the value of serial is 1, this is the first retry of this packet. For messages that span multiple packets, the value of serial begins at 0 for the first instance of the first packet in the message and is incremented for each additional packet in the message, as well as any retries of any of those packets.

extended flags (1 byte): This field is optional. It is present if the EXT bit is set in the flags field.<3>


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

COMMAND

nNACK

0

COMMAND (5 bits): MUST be 0.

nNACK (2 bits): The size, in bytes, of the NACK MASK.

Value

Meaning

0x00

There is no NACK MASK present.

0x01

There is 1 byte of NACK MASK present.

0x02

There are 2 bytes of NACK MASK present.

0x03

There are 3 bytes of NACK MASK present.

0 (1 bit): MUST be 0.

NACK MASK (variable): A NACK MASK is sent in any message header when packets expected to be in the message stream are not received. The mask of bits specifies which packets have not been received by the receiver.

Creation of the mask is based on the sequence number in the NACK packet, which identifies the first packet that was not received. The bits in the NACK MASK bitmask specify which other packets relative to that sequence number have also not been received. For example, if the sequence number is 7 and the NACK MASK is 0x03, then packets with sequence numbers 7, 8, and 9 have not been received at the receiving end of the link.

The size of the NACK MASK is specified in the nNACK bits of the extended flags field, if that field is present. When nNACK is greater than 0, there is a NACK MASK. When the extended flags field is not present, there is no NACK MASK field.

The NACK MASK field is optional.<4>

Data (variable): The higher-layer data payload. The length of this field MUST be inferred from the remaining size of the packet reported by the lower-level transport. The size is the total number of bytes in the packet minus the 4–8 bytes of previous Data frame fields.