TPCANMessageType

PCAN-Basic

PCAN-Basic Documentation
Home
PreviousUpNext
TPCANMessageType

Represents the type of a CAN message. According with the programming language, this type can be a group of defined values or an enumeration.

Syntax
#define TPCANMessageType BYTE

#define PCAN_MESSAGE_STANDARD 0x00
#define PCAN_MESSAGE_RTR 0x01
#define PCAN_MESSAGE_EXTENDED 0x02
#define PCAN_MESSAGE_FD 0x04
#define PCAN_MESSAGE_BRS 0x08
#define PCAN_MESSAGE_ESI 0x10
#define PCAN_MESSAGE_ERRFRAME 0x40
#define PCAN_MESSAGE_STATUS 0x80
{$Z1}
TPCANMessageType = (
    PCAN_MESSAGE_STANDARD = $00,
    PCAN_MESSAGE_RTR = $01,
    PCAN_MESSAGE_EXTENDED = $02,
    PCAN_MESSAGE_FD = $04,
    PCAN_MESSAGE_BRS = $08,
    PCAN_MESSAGE_ESI = $10,
    PCAN_MESSAGE_ERRFRAME = $40,
    PCAN_MESSAGE_STATUS = $80
);
[Flags]
public enum TPCANMessageType : byte
{
    PCAN_MESSAGE_STANDARD  = 0x00,
    PCAN_MESSAGE_RTR       = 0x01,
    PCAN_MESSAGE_EXTENDED  = 0x02,
    PCAN_MESSAGE_FD = 0x04,
    PCAN_MESSAGE_BRS = 0x08,
    PCAN_MESSAGE_ESI = 0x10,
    PCAN_MESSAGE_ERRFRAME = 0x40,
    PCAN_MESSAGE_STATUS    = 0x80,
}
[Flags]
public enum class TPCANMessageType : Byte
{
    PCAN_MESSAGE_STANDARD  = 0x00,
    PCAN_MESSAGE_RTR = 0x01,
    PCAN_MESSAGE_EXTENDED  = 0x02,
    PCAN_MESSAGE_FD = 0x04,
    PCAN_MESSAGE_BRS = 0x08,
    PCAN_MESSAGE_ESI = 0x10,
    PCAN_MESSAGE_ERRFRAME = 0x40,
    PCAN_MESSAGE_STATUS    = 0x80,
};
<Flags()> _
Public Enum TPCANMessageType As Byte
    PCAN_MESSAGE_STANDARD = &H0
    PCAN_MESSAGE_RTR = &H1
    PCAN_MESSAGE_EXTENDED = &H2
    PCAN_MESSAGE_FD = &H4
    PCAN_MESSAGE_BRS = &H8
    PCAN_MESSAGE_ESI = &H10
    PCAN_MESSAGE_ERRFRAME = &H40
    PCAN_MESSAGE_STATUS = &H80
End Enum
TPCANMessageType = c_ubyte

PCAN_MESSAGE_STANDARD = TPCANMessageType(0x00)
PCAN_MESSAGE_RTR = TPCANMessageType(0x01)
PCAN_MESSAGE_EXTENDED = TPCANMessageType(0x02)
PCAN_MESSAGE_FD = TPCANMessageType(0x04)
PCAN_MESSAGE_BRS = TPCANMessageType(0x08)
PCAN_MESSAGE_ESI = TPCANMessageType(0x10)
PCAN_MESSAGE_ERRFRAME = TPCANMessageType(0x40)
PCAN_MESSAGE_STATUS = TPCANMessageType(0x80)

Several message types can be combined (Bit mask). 

Note that messages with type PCAN_MESSAGE_FD, PCAN_MESSAGE_BRS, PCAN_MESSAGE_ESI, or a combination of them, can only be sent/received using the FD functions CAN_ReadFD and CAN_WriteFD (class-methods: ReadFD, WriteFD).

Name 
Value 
Description 
PCAN_MESSAGE_STANDARD 
The PCAN message is a CAN Standard Frame (11-bit identifier). 
PCAN_MESSAGE_RTR 
The PCAN message is a CAN Remote-Transfer-Request Frame. 
PCAN_MESSAGE_EXTENDED 
The PCAN message is a CAN Extended Frame (29-bit identifier). 
PCAN_MESSAGE_FD 
The PCAN message represents a FD frame in terms of CiA specifications. 
PCAN_MESSAGE_BRS 
The PCAN message represents a FD bit rate switch (CAN data at a higher bit rate). 
PCAN_MESSAGE_ESI 
16 
The PCAN message represents a FD error state indicator(CAN FD transmitter was error active). 
PCAN_MESSAGE_ERRFRAME 
64 
The PCAN message represents an error frame. See Error Frames for more information. 
PCAN_MESSAGE_STATUS 
128 
The PCAN message represents a PCAN status message. 

CAN_Read (class-method: Read

CAN_ReadFD (class-method: ReadFD

CAN_Write (class-method: Write

CAN_WriteFD (class-method: WriteFD

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