TPCANMsg

PCAN-Basic

PCAN-Basic Documentation
Home
PreviousUpNext
TPCANMsg

Defines a CAN message.

Syntax
typedef struct
{
    DWORD ID;
    TPCANMessageType  MSGTYPE;
    BYTE LEN;
    BYTE DATA[8];
} TPCANMsg;
TPCANMsg = record
    ID: Longword;
    MSGTYPE: TPCANMessageType;
    LEN: Byte;
    DATA: array[0..7] of Byte;
end;
public struct TPCANMsg
{
    public uint ID;
    [MarshalAs(UnmanagedType.U1)]
    public TPCANMessageType MSGTYPE;
    public byte LEN;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
    public byte[] DATA;
}
public value struct TPCANMsg
{
    UInt32 ID;
    [MarshalAs(UnmanagedType.U1)]
    TPCANMessageType MSGTYPE;
    Byte LEN;
    [MarshalAs(UnmanagedType::ByValArray, SizeConst = 8)]
    array<Byte>^ DATA;
}
Public Structure TPCANMsg
    Public ID As UInt32
    <MarshalAs(UnmanagedType.U1)> _
    Public MSGTYPE As TPCANMessageType
    Public LEN As Byte
    <MarshalAs(UnmanagedType.ByValArray, SizeConst := 8)> _
    Public DATA As Byte()
End Structure
from ctypes import *
class TPCANMsg (Structure):
    _fields_ = [ ("ID",  c_uint),
                 ("MSGTYPE",  TPCANMessageType),
                 ("LEN",  c_ubyte),
                 ("DATA", c_ubyte * 8) ]

The members of this structure are sequentially byte aligned.

Name 
Description 
ID 
11/29-bit message identifier. 
MSGTYPE 
Type of the message. Bit mask indicating the type of the message. Several message types can be combined. 
LEN 
Data Length Code of the message (0..8). 
DATA 
Data of the message (DATA[0]..DATA[7]). 

CAN_Read (class-method: Read

CAN_Write (class-method: Write

TPCANTimestamp 

Copyright © 2017. PEAK-System Technik GmbH. All rights reserved.
Send feedback to this documentation