A message consists of a header and a body. Currently the Sym3 header is fixed and defined as below.
In Project Explorer, right-click on Messages > New.
Name | Name of the message. The name will be used in script to create a new message (eg. CreateMessage("MyMessage"); ) |
Type ID | ID of the message. The pair ID / Input must be unique. For instance there can be only one input message of type ID 80, but there can be one input and one output message with the same type ID. |
Data Type | The data type defining the message body structure |
Script Handler | the script function called when the message is received (input message only) |
Input | True for incoming messages, False for outgoing messages. |
All messages have the same header structure:
Name | Type | Description |
MessageID | Byte | Integer value that identifies the message type |
DeviceID | Byte | Integer value that identifies the device that sent or is to receive message |
LocationID | Word | Integer value that identifies specific equipment |
DeviceRef | Word | Integer value that is sent by the device for its own internal use, should be copied back to the device in any response message |
MessageLength | Word | The total length of the message. It means: MessageLength = Header length (8 bytes) + Body length |
The structure of the message body is defined by its data type.
To create, send and receive message, See "Message Methods"