Structure Definitions
This section describes the structures defined for the callout DLL specification.
Structure Definitions
The following structures are available.
| Structure | Description |
|---|---|
| StElementCfg | Element configuration |
| StFrameCfg | Transmit/receive frame configuration |
| StPrePostData | Prefix/postfix information |
| StMsgConfig | Channel message configuration |
| StFrameInfo | Transmit/receive frame information |
| StCustomParamCfg | Callout custom parameter information |
StElementCfg
Members of the StElementCfg (element configuration) structure are shown below.
| Member | Type | Description |
|---|---|---|
| StartPos | DWORD | Start bit position of the element |
| EndPos | DWORD | End bit position of the element |
| Value | LPBYTE | Initial value of the element |
| ValueLength | DWORD | Element length (bits) (*1) |
| Align | DWORD | Bit alignment (*2) |
| Endianness | DWORD | Byte endianness (*2) |
*1: Determined automatically based on StartPos and EndPos.
*2: See the constant definitions for details.
StFrameCfg
Members of the StFrameCfg (transmit/receive frame configuration) structure are shown below.
| Member | Type | Description |
|---|---|---|
| SecMsgIdx | DWORD | Message index |
| PrePostLen | DWORD | Prefix/postfix length (bits) |
| ElCfgs | StElementCfg * | Array of prefix/postfix element configuration structures |
| ElementNum | DWORD | Number of elements in the array |
| IsSyncMsg | BOOL | Sync message enabled/disabled True = enabled, False = disabled |
| IsUseFv | BOOL | Whether FV is used (*1) |
| IsFvMaster | BOOL | FV master/slave True = master, False = slave |
| Reserve | BOOL | Reserved |
StPrePostData
Members of the StPrePostData (prefix/postfix information) structure are shown below.
| Member | Type | Description |
|---|---|---|
| Value | LPBYTE | Prefix/postfix value |
| Length | DWORD | Prefix/postfix length (bits) |
StMsgConfig
Members of the StMsgConfig (channel message configuration) structure are shown below.
| Member | Type | Description |
|---|---|---|
| MsgCfg | StFrameCfg * | Array of message information structures held by the channel |
| MsgNum | DWORD | Number of elements in the message information array |
StFrameInfo
Members of the StFrameInfo (transmit/receive frame information) structure are shown below.
| Member | Type | Description |
|---|---|---|
| AllPayLoad | LPBYTE | CAN/CAN FD message data |
| AllLength | DWORD | CAN/CAN FD message length (bits) |
| TruncPayLoad | LPBYTE | Extracted payload data |
| TruncPayLoadLength | DWORD | Extracted payload length (bits) |
| TruncFV | LPBYTE | Extracted FV data |
| TruncFVLength | DWORD | Extracted FV length (bits) |
| TruncMac | LPBYTE | Extracted MAC data |
| TruncMacLength | DWORD | Extracted MAC length (bits) |
| ID | - | CAN ID information |
| State | - | Frame monitoring information |
ID Structure
ID is a union of StdID (standard ID), ExtID (extended ID), and Type (status) structures, all defined as DWORD bit fields. Members are as follows.
| Structure | Member | Bits | Description |
|---|---|---|---|
| StdID | - | 18 | Unused |
| CANID | 11 | Standard CAN ID | |
| - | 3 | Unused | |
| ExtID | CANID | 29 | Extended CAN ID |
| - | 3 | Unused | |
| Type | - | 30 | Unused |
| RTR | 1 | Remote transmission request (RTR) (*1) | |
| IDE | 1 | CAN ID type (IDE) (*1) |
*1: See the constant definitions for value details.
State Structure
State is a DWORD bit-field structure with the following members.
| Member | Bits | Description |
|---|---|---|
| LogType | 6 | Frame protocol (*1) |
| Dir | 1 | Direction (*1) |
| Error | 1 | Error status (*2) |
*1: See the constant definitions for value details.
*2: Among the error-code constants, MPX_COUT_OK means no error and MPX_COUT_ERROR means an error occurred.
StCustomParamCfg
Members of the StCustomParamCfg (callout custom parameter information) structure are shown below.
| Member | Type | Description |
|---|---|---|
| UserType | DWORD | Callout custom parameter data type (*1) |
| Data | LPVOID | Callout custom parameter value |
| ByteLength | DWORD | Callout custom parameter length (bytes, max 256) (*2) |
| ItemName | DWORD | Callout custom parameter name |
*1: See the constant definitions for value details.
*2: Only applies when the data type is a string.