Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
CanMessageData Struct Reference

Thin wrapper around struct can_frame that will allow a dispatcher select the frames by CAN ID and mask as desired by the handlers. More...

#include <CanIf.hxx>

Inheritance diagram for CanMessageData:

Public Types

typedef uint32_t id_type
 This is the maskable identifier of the incoming CAN frames.
 

Public Member Functions

 CanMessageData ()
 Constructor.
 
id_type id ()
 
struct can_frame * mutable_frame ()
 
const struct can_frame & frame () const
 

Public Attributes

void * unused
 This will be aliased onto CanHubData::skipMember_.
 

Static Public Attributes

static const id_type STANDARD_FRAME_BIT = (1U << 30)
 This bit will be set in standard CAN frames when they get to the dispatcher.
 
static const uint32_t CAN_EXT_FRAME_FILTER = 0
 Filter to OR onto a can ID to tell the dispatcher to only consider extended can frames.
 
static const uint32_t CAN_EXT_FRAME_MASK = ~0x1FFFFFFFU
 Mask to OR onto a can mask to tell the dispatcher to only consider extended can frames.
 
static const uint32_t CAN_STD_FRAME_FILTER = STANDARD_FRAME_BIT
 Filter to OR onto a can ID to tell the dispatcher to only consider extended can frames.
 
static const uint32_t CAN_STD_FRAME_MASK = ~0x7FFU
 Mask to OR onto a can mask to tell the dispatcher to only consider extended can frames.
 

Detailed Description

Thin wrapper around struct can_frame that will allow a dispatcher select the frames by CAN ID and mask as desired by the handlers.

Definition at line 45 of file CanIf.hxx.

Member Typedef Documentation

◆ id_type

typedef uint32_t CanMessageData::id_type

This is the maskable identifier of the incoming CAN frames.

Definition at line 58 of file CanIf.hxx.

Constructor & Destructor Documentation

◆ CanMessageData()

CanMessageData::CanMessageData ( )
inline

Constructor.

Resets the inlined frame to an empty extended frame.

Definition at line 48 of file CanIf.hxx.

Member Function Documentation

◆ frame()

const struct can_frame & CanMessageData::frame ( ) const
inline
Returns
the embedded CAN frame.

Definition at line 99 of file CanIf.hxx.

◆ id()

id_type CanMessageData::id ( )
inline
Returns
the identifier for dispatching

Definition at line 80 of file CanIf.hxx.

◆ mutable_frame()

struct can_frame * CanMessageData::mutable_frame ( )
inline
Returns
a mutable pointer to the embedded CAN frame.

Definition at line 93 of file CanIf.hxx.

Member Data Documentation

◆ CAN_EXT_FRAME_FILTER

const uint32_t CanMessageData::CAN_EXT_FRAME_FILTER = 0
static

Filter to OR onto a can ID to tell the dispatcher to only consider extended can frames.

Definition at line 66 of file CanIf.hxx.

◆ CAN_EXT_FRAME_MASK

const uint32_t CanMessageData::CAN_EXT_FRAME_MASK = ~0x1FFFFFFFU
static

Mask to OR onto a can mask to tell the dispatcher to only consider extended can frames.

Definition at line 69 of file CanIf.hxx.

◆ CAN_STD_FRAME_FILTER

const uint32_t CanMessageData::CAN_STD_FRAME_FILTER = STANDARD_FRAME_BIT
static

Filter to OR onto a can ID to tell the dispatcher to only consider extended can frames.

Definition at line 73 of file CanIf.hxx.

◆ CAN_STD_FRAME_MASK

const uint32_t CanMessageData::CAN_STD_FRAME_MASK = ~0x7FFU
static

Mask to OR onto a can mask to tell the dispatcher to only consider extended can frames.

Definition at line 76 of file CanIf.hxx.

◆ STANDARD_FRAME_BIT

const id_type CanMessageData::STANDARD_FRAME_BIT = (1U << 30)
static

This bit will be set in standard CAN frames when they get to the dispatcher.

Definition at line 62 of file CanIf.hxx.

◆ unused

void* CanMessageData::unused

This will be aliased onto CanHubData::skipMember_.

It is needed to keep the two structures the same size for casting between them.

Definition at line 106 of file CanIf.hxx.


The documentation for this struct was generated from the following file: