DLN_MSG_HEADER
The message header is the first field of each message, sent from a host to a device or vice versa. It is used to identify and route the message correctly.
The DLN_MSG_HEADER structure is used to describe a message (command, response or event).
Syntax
- C/C++
-
typedef struct { uint16_t size; uint16_t msgId; uint16_t echoCounter; HDLN handle; } __PACKED_ATTR DLN_MSG_HEADER;
Members:
- size
- Defines the size of the message.
- msgId
- The message ID, defining the message.
- echoCounter
- If case of a command/response pair the echo counter is used to establish a one-one link between them. In case the message is an event, this is a free-running counter. It shows the number of events sent by the device. The counter is reset when its value reaches 0xFFFF (65536).
- handle
- A handle to the DLN-series adapter. In case of an event, it contains the handle of the device, that generated the event. For a command, the handle is defined by a user in order to route it to a specific device. The HDLN_ALL_DEVICES constant can be used to send the command to all devices.
2006-2012