Public Types | Public Member Functions | Public Attributes | List of all members
can::Frame Struct Reference

#include <interface.h>

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

Public Types

using value_type = unsigned char
 

Public Member Functions

value_typec_array ()
 
const value_typec_array () const
 
 Frame ()
 
 Frame (const Header &h, unsigned char l=0)
 
bool isValid () const
 
- Public Member Functions inherited from can::Header
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

std::array< value_type, 8 > data
 array for 8 data bytes with bounds checking More...
 
unsigned char dlc
 len of data More...
 
- Public Attributes inherited from can::Header
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...
 

Additional Inherited Members

- Static Public Attributes inherited from can::Header
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

representation of a CAN frame

Definition at line 62 of file interface.h.

Member Typedef Documentation

◆ value_type

using can::Frame::value_type = unsigned char

Definition at line 63 of file interface.h.

Constructor & Destructor Documentation

◆ Frame() [1/2]

can::Frame::Frame ( )
inline

constructor with default parameters

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

Definition at line 78 of file interface.h.

◆ Frame() [2/2]

can::Frame::Frame ( const Header h,
unsigned char  l = 0 
)
inline

Definition at line 79 of file interface.h.

Member Function Documentation

◆ c_array() [1/2]

value_type* can::Frame::c_array ( )
inline

Definition at line 81 of file interface.h.

◆ c_array() [2/2]

const value_type* can::Frame::c_array ( ) const
inline

Definition at line 82 of file interface.h.

◆ isValid()

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

check if frame header and length are valid

Definition at line 68 of file interface.h.

Member Data Documentation

◆ data

std::array<value_type, 8> can::Frame::data

array for 8 data bytes with bounds checking

Definition at line 64 of file interface.h.

◆ dlc

unsigned char can::Frame::dlc

len of data

Definition at line 65 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