2.2.2 _MESSAGE_HEADER

When a serial or modem link is used, any of the packets listed in the table in section 2.2.3 are modified by prefixing them with the _MESSAGE_HEADER header. Exceptions to this are the packets EnumQuery (section 2.2.4) and EnumResponse (section 2.2.5), which use _MESSAGE_HEADER in place of the first 32 bits of their payloads.

For example, the following figure illustrates the contents of the TRANS_USERDATA_DESTROY_PLAYER packet when prefixed with the _MESSAGE_HEADER header.

TRANS_USERDATA_DESTROY_PLAYER packet prefixed with the _MESSAGE_HEADER header

Figure 2: TRANS_USERDATA_DESTROY_PLAYER packet prefixed with the _MESSAGE_HEADER header


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

Signature

MessageType

wMessageSize

wMessageCRC

wHeaderCRC

Signature (1 byte): An 8-bit serial signature for the packet. This MUST be set to the value 0xCC.

MessageType (1 byte): An 8-bit token that indicates the message type. The high 4 bits MUST be set to one of the following values.

Value

Meaning

0x20

This message contains an enumeration response. See section 2.2.5.

0x40

This message contains a transport packet message following the header, and the low two bits MUST be ignored.

0x60

This message contains an enumeration query. See section 2.2.4.

The low two bits of the MessageType value in an enumeration query MUST be echoed in the low two bits of the enumeration response (a message with MessageType value of "0x20"). The sender MAY use any identifier value for the enumeration query. However, the sender SHOULD use this value to correlate queries with responses to calculate the round-trip time (RTT).

wMessageSize (2 bytes): A 16-bit integer that specifies the size, in bytes, of the message.

wMessageCRC (2 bytes): A 16-bit integer that provides the CRC, in bytes, for the message data, which is calculated using the standardized CRC-16-IBM algorithm.

wHeaderCRC (2 bytes): A 16-bit integer that provides the CRC, in bytes, for the message header, which is calculated using the standardized CRC-16-IBM algorithm.