PcanMessageDLC Property

CAN-CC/CAN-FD: The Data Length Code (DLC) of the message (0..15). CAN-XL: The Data Length Code (DLC) of the message (0..2047).

Definition

Namespace: Peak.Can.Basic
Assembly: PCANBasic.NET (in PCANBasic.NET.dll) Version: 5.1.0
C#
public ushort DLC { get; set; }

Property Value

UInt16

Remarks

The number of data bytes (Length) in the Data field is indicated by the Data Length Code. Its coding is different in CAN CC, CAN FD, and CAN XL. There is the following relationship between Data Length Code and the actual number of data bytes:

DLCData Length - CAN CCData Length - CAN FDData Length - CAN XL
≤ 8DLCDLCDLC +1
9812DLC +1
10816DLC +1
11820DLC +1
12824DLC +1
13832DLC +1
14848DLC +1
15864DLC +1
16..2047864DLC +1
≥ 20478642048

See Also