TPCANMsg Structure

Represents a PCAN message.

Definition

Namespace: Peak.Can.Basic.BackwardCompatibility
Assembly: PCANBasic.NET (in PCANBasic.NET.dll) Version: 5.1.0
C#
public struct TPCANMsg
Inheritance
Object    ValueType    TPCANMsg

Remarks

The members of this structure are sequentially byte aligned.

  Important

The TPCANMsg structure is intended for reading and writing standard CAN messages on PCAN Channels initialized for standard CAN 2.0 A/B communication, this is, using the Initialize method for initialization and the methods Read and Write for data transmission.

For CAN communication using flexible data rate, the TPCANMsgFD structure is to be used.

Methods

EqualsIndicates whether this instance and a specified object are equal.
(Inherited from ValueType)
GetHashCodeReturns the hash code for this instance.
(Inherited from ValueType)
GetTypeGets the Type of the current instance.
(Inherited from Object)
ToStringReturns the fully qualified type name of this instance.
(Inherited from ValueType)

Fields

DATA The data associated to the CAN message (DATA[0]..DATA[7]).

  Important

This array must be explicitly created, for instance:
C#
TPCANMsg msg = new TPCANMsg() { DATA = new byte[8] };
before a variable of this type can be used in any API function.
ID A 11/29-bit CAN message identifier.
LEN The Data Length Code of the message (0..8).
MSGTYPE The kind of CAN frame represented by this value.

See Also