TPCANMsgFD Structure
Defines a CAN message with flexible data rate.
The members of this structure are sequentially byte aligned.
Longer Data field with CAN FD messages:
| DLC | Data Bytes |
|---|
| 0 | 0 |
| 1 | 1 |
| 2 | 2 |
| 3 | 3 |
| 4 | 4 |
| 5 | 5 |
| 6 | 6 |
| 7 | 7 |
| 8 | 8 |
| 9 | 12 |
| 10 | 16 |
| 11 | 20 |
| 12 | 24 |
| 13 | 32 |
| 14 | 48 |
| 15 | 64 |
The TPCANMsgFD structure is intended for reading and writing standard CAN messages as well as CAN messages with flexible data rate on PCAN Channels initialized
for standard CAN-FD communication, this is, using the InitializeFD
method for initialization and the methods ReadFD and
WriteFD for data transmission.
For CAN communication using only the standard CAN 2.0 A/B, the TPCANMsg structure is to be used.
| DATA |
The data associated to the CAN message (DATA[0]..DATA[63]).
This array must be explicitly created, for instance:
TPCANMsgFD msgFd = new TPCANMsgFD() { DATA = new byte[64] };
Dim msgFd As New TPCANMsgFD() With {.DATA = New Byte(63) {}}
TPCANMsgFD^ msgFd = gcnew TPCANMsgFD();
msgFd->DATA = gcnew array<Byte>(64);
before a variable of this type can be used in any API function. |
| DLC |
The Data Length Code of the message (0..15).
|
| ID |
A 11/29-bit CAN message identifier.
|
| MSGTYPE |
The kind of CAN frame represented by this value.
|