
DCN Next Generation Open Interface Release 2.4 General
en | 12
Bosch Communications Systems | 2007 February | SRS_INF | Du010933
3. MESSAGE FORMAT
The communication used between the remote controller and the CCU is based on messages.
This chapter describes the format of the message and the different message types used to
transport data between the remote controller and the CCU.
3.1 Conventions
In the sections and chapters below several structures are defined. To prevent problems these
structures are defined using standard data types, which have defined sizes and usage. The
following data types will be used:
BOOLEAN : a 1 byte unsigned value with the range 0...1 (FALSE and TRUE).
CHAR : a 1 byte type representing ASCII characters. Strings are represented as an
array of CHAR and are terminated with a zero (‘\0’) character.
BYTE : a 1 byte unsigned value with the range 0...255.
SBYTE : a 1 byte signed value with the range -128...127.
WORD : a 2 byte unsigned value with the range 0...65535.
SWORD : a 2 byte signed value with the range -32768...32767.
DWORD : a 4 byte unsigned value with the range 0...(2
32
-1).
SDWORD : a 4 bytes signed value with the range -(2
31
)...(2
31
-1).
Note that all number representation in the data are presented in little-endian
3
format.
3.2 Serial line message layout
The message format has the following layout:
Type Length Data
Defined as a structure definition:
typedef struct
{
BYTE byType; // Message Type
WORD wLength; // Message Length
BYTE byData []; // Message Data
} T_MESSAGE;
where:
byType Defines the “message-type”. Currently the following types are
defined for communication with the CCU:
• MDSM_REMOTEPROCEDURE_REQ
• MDSM_REMOTEPROCEDURE_RSP
• MDSM_NOTIFY
wLength Defines the actual length of the data present in the array
following. Only this amount of data of the ‘byData’ array is
transmitted. (limit = 5000, see §4.1.2.4)
byData [] Data array holding the “message data” as transmitted along
with the message-type. This data represents a structure which
format is explained below together with the different message-
types.
3
Little endian is a storage mechanism where the least significant byte is stored on the lowest address, followed
by the more significant bytes. E.g. a WORD is represented in memory as two consecutive bytes where the LSB is
stored on the lowest address and the MSB on the next address.
Komentáře k této Příručce