ADTF_DEVICE_TOOLBOX  3.12.1 (ADTF 3.18.3)
tCANFDData

The CAN FD data structure is used by CAN FD MediaSamples. More...

Classes

struct  tData
 CAN FD message data structure. More...
 
struct  tMessageHeader
 CAN FD message header structure. More...
 
struct  tStatus
 CAN FD bus status structure. More...
 

Public Types

enum  eMessageTag { MT_Data = 0 , MT_Status = 1 }
 This enum specifies the different kinds of messages that may be contained in the union. More...
 
enum  eDataFlags {
  DF_NONE = 0 , DF_ERROR_FRAME = 1 , DF_REMOTE_FRAME = 2 , DF_TX_COMPLETED = 4 ,
  DF_EXTENDED_DATA_LENGTH = 8 , DF_CAN_FD_FORMAT_IDENTIFIER = DF_EXTENDED_DATA_LENGTH , DF_BAUD_RATE_SWITCH = 16 , DF_SET_CAN_FD_AND_BRS = DF_CAN_FD_FORMAT_IDENTIFIER | DF_BAUD_RATE_SWITCH ,
  DF_ERROR_STATE_INDICATOR = 32
}
 CAN FD message flags. More...
 
enum  eBusStatus { BS_OFFLINE = 1 , BS_ERROR_PASSIVE = 2 , BS_ERROR_WARNING = 4 , BS_ERROR_ACTIVE = 8 }
 CAN FD bus state flags. More...
 
enum  eMsgId { MSG_IDMASK_BASE = 0x000007FF , MSG_IDMASK_EXTENDED = 0x1FFFFFFF , MSG_EXTENDED_FLAG = 0x80000000 }
 CAN FD message id masks. More...
 

Public Attributes

tMessageHeader sHeader
 CAN FD message header structure.
 
union {
   tData   sData
 used when ui8Tag == MT_Data
 
   tStatus   sStatus
 used when ui8Tag == MT_Status
 
}; 
 

Detailed Description

The CAN FD data structure is used by CAN FD MediaSamples.

Definition at line 192 of file canfd_types.h.

Member Enumeration Documentation

◆ eBusStatus

enum eBusStatus

CAN FD bus state flags.

Enumerator
BS_OFFLINE 

Bus is offline.

BS_ERROR_PASSIVE 

One of the error counters has reached the error level.

BS_ERROR_WARNING 

One of the error counters has reached the warning level.

BS_ERROR_ACTIVE 

Bus is online.

Definition at line 223 of file canfd_types.h.

◆ eDataFlags

enum eDataFlags

CAN FD message flags.

Enumerator
DF_NONE 

Standard flags.

DF_ERROR_FRAME 

Indicates an error frame.

DF_REMOTE_FRAME 

Indicates a remote frame.

DF_TX_COMPLETED 

Notification for successful message transmission.

DF_EXTENDED_DATA_LENGTH 

Indicates FlexibleData-Rate (FDF Flexible Datarate Format Indicator)

DF_CAN_FD_FORMAT_IDENTIFIER 

same as Extended Data Length

DF_BAUD_RATE_SWITCH 

Indicates that the Message uses Flexible Datarate.

DF_SET_CAN_FD_AND_BRS 

Helper to Set Extended Data Length and Baud Rate Switch at once.

DF_ERROR_STATE_INDICATOR 

EDI Bit Indicates an Error-active state at the CAN FD Node

Definition at line 207 of file canfd_types.h.

◆ eMessageTag

This enum specifies the different kinds of messages that may be contained in the union.

Enumerator
MT_Data 

Data.

MT_Status 

Status.

Definition at line 198 of file canfd_types.h.

◆ eMsgId

enum eMsgId

CAN FD message id masks.

These masks should be used to check for extended or standard messages and to get the correct identifier from ui32Id in tData.

Enumerator
MSG_IDMASK_BASE 

Message IDs for base frame format use 11 bit identifiers.

MSG_IDMASK_EXTENDED 

Message IDs for extended frame format use 29 bit identifiers.

MSG_EXTENDED_FLAG 

Extended CAN FD messages are marked by bit 31.

Definition at line 235 of file canfd_types.h.