Public Member Functions | Public Attributes | Static Public Attributes | List of all members
can::Header Struct Reference

#include <interface.h>

Inheritance diagram for can::Header:
Inheritance graph
[legend]

Public Member Functions

unsigned int fullid () const
 
 Header ()
 
 Header (unsigned int i, bool extended, bool rtr, bool error)
 
bool isValid () const
 
unsigned int key () const
 
 operator unsigned int () const
 

Public Attributes

unsigned int id:29
 CAN ID (11 or 29 bits valid, depending on is_extended member. More...
 
unsigned int is_error:1
 marks an error frame (only used internally) More...
 
unsigned int is_extended:1
 frame uses 29 bit CAN identifier More...
 
unsigned int is_rtr:1
 frame is a remote transfer request More...
 

Static Public Attributes

static const unsigned int ERROR_MASK = (1u << 29)
 
static const unsigned int EXTENDED_MASK = (1u << 31)
 
static const unsigned int ID_MASK = (1u << 29)-1
 
static const unsigned int RTR_MASK = (1u << 30)
 

Detailed Description

Header for CAN id an meta data

Definition at line 17 of file interface.h.

Constructor & Destructor Documentation

◆ Header() [1/2]

can::Header::Header ( )
inline

constructor with default parameters

Parameters
[in]iCAN id, defaults to 0
[in]extendeduses 29 bit identifier, defaults to false
[in]rtris rtr frame, defaults to false

Definition at line 41 of file interface.h.

◆ Header() [2/2]

can::Header::Header ( unsigned int  i,
bool  extended,
bool  rtr,
bool  error 
)
inline

Definition at line 44 of file interface.h.

Member Function Documentation

◆ fullid()

unsigned int can::Header::fullid ( ) const
inline

Definition at line 31 of file interface.h.

◆ isValid()

bool can::Header::isValid ( ) const
inline

check if frame header is valid

Definition at line 28 of file interface.h.

◆ key()

unsigned int can::Header::key ( ) const
inline

Definition at line 32 of file interface.h.

◆ operator unsigned int()

can::Header::operator unsigned int ( ) const
inlineexplicit

Definition at line 33 of file interface.h.

Member Data Documentation

◆ ERROR_MASK

const unsigned int can::Header::ERROR_MASK = (1u << 29)
static

Definition at line 19 of file interface.h.

◆ EXTENDED_MASK

const unsigned int can::Header::EXTENDED_MASK = (1u << 31)
static

Definition at line 21 of file interface.h.

◆ id

unsigned int can::Header::id

CAN ID (11 or 29 bits valid, depending on is_extended member.

Definition at line 23 of file interface.h.

◆ ID_MASK

const unsigned int can::Header::ID_MASK = (1u << 29)-1
static

Definition at line 18 of file interface.h.

◆ is_error

unsigned int can::Header::is_error

marks an error frame (only used internally)

Definition at line 24 of file interface.h.

◆ is_extended

unsigned int can::Header::is_extended

frame uses 29 bit CAN identifier

Definition at line 26 of file interface.h.

◆ is_rtr

unsigned int can::Header::is_rtr

frame is a remote transfer request

Definition at line 25 of file interface.h.

◆ RTR_MASK

const unsigned int can::Header::RTR_MASK = (1u << 30)
static

Definition at line 20 of file interface.h.


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


socketcan_interface
Author(s): Mathias Lüdtke
autogenerated on Wed Mar 2 2022 00:52:25