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

 Header ()
 
 Header (unsigned int i, bool extended, bool rtr, bool error)
 
bool isValid () const
 
 operator const 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 13 of file interface.h.

Constructor & Destructor Documentation

can::Header::Header ( )
inline

Definition at line 35 of file interface.h.

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

Definition at line 38 of file interface.h.

Member Function Documentation

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

check if frame header is valid

Definition at line 24 of file interface.h.

can::Header::operator const unsigned int ( ) const
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 33 of file interface.h.

Member Data Documentation

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

Definition at line 15 of file interface.h.

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

Definition at line 17 of file interface.h.

unsigned int can::Header::id

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

Definition at line 19 of file interface.h.

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

Definition at line 14 of file interface.h.

unsigned int can::Header::is_error

marks an error frame (only used internally)

Definition at line 20 of file interface.h.

unsigned int can::Header::is_extended

frame uses 29 bit CAN identifier

Definition at line 22 of file interface.h.

unsigned int can::Header::is_rtr

frame is a remote transfer request

Definition at line 21 of file interface.h.

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

Definition at line 16 of file interface.h.


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


socketcan_interface
Author(s): Mathias Lüdtke
autogenerated on Sat May 4 2019 02:40:41