TPCANMsgXL Structure
Defines a CAN message with Extended Data-Field Length an XL bit rate.
The members of this structure are sequentially byte aligned.
Relationship between DLC and data length in CAN XL messages:
The length of data bytes contained in a CAN message is given by the DATA LENGTH CODE field (DLC).
The coding of the DLC within XL messages is different. The relationship between DLC and data bytes length is as follows:
Bytes length is equals to DLC + 1. In this manner, the minimum length of data that can be sent within a CAN XL frame is 1
(DLC equals to 0 plus 1), and the maximum is 2048 (DLC equals 2047 plus 1).
The TPCANMsgXL structure is intended for reading and writing standard CAN messages, CAN messages with flexible data rate, as well as CAN Messages
with extended data-field length on PCAN Channels initialized for standard CAN-XL communication, this is, using the
InitializeXL method for initialization and the methods
ReadXL and
WriteXL for data transmission.
For CAN communication using only the standard CAN 2.0 A/B, the TPCANMsg structure is to be used.
For CAN communication using only the flexible data rate, CAN FD, the TPCANMsgFD structure is to be used.
| AF |
The Acceptance Field, SDU - specific high - layer ID.
|
| DATA |
The data associated to the CAN message (DATA[0]..DATA[2047]).
This array must be explicitly created, for instance:
TPCANMsgXL msgXl = new TPCANMsgXL() { DATA = new byte[PCANBasic.MAX_LENGTH_DATA_XL] };
Dim msgXl As New TPCANMsgXL() With {.DATA = New Byte(PCANBasic.MAX_LENGTH_DATA_XL - 1) {}}
TPCANMsgXL^ msgXl = gcnew TPCANMsgXL();
msgXl->DATA = gcnew array<Byte>(PCANBasic::MAX_LENGTH_DATA_XL);
before a variable of this type can be used in any API function. |
| DLC |
The Data Length Code of the message (0..2047).
|
| MSGTYPE |
The kind of CAN frame represented by this value.
|
| PID |
CAN-XL: The priority ID (physical layer - 0..0x7FF).
CAN-CC/CAN-FD: A 11/29-bit CAN message identifier.
|
| RRS |
The Remote Request Substitution flag (0..1).
|
| SDT |
The Service Data unit(SDU) protocol Type.
|
| SEC |
TheSimple Extended Content flag (0..1).
|
| VCID |
The virtual CAN network ID.
|