#include <interface.h>
Public Types | |
using | value_type = unsigned char |
Public Member Functions | |
value_type * | c_array () |
const value_type * | c_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) |
representation of a CAN frame
Definition at line 62 of file interface.h.
using can::Frame::value_type = unsigned char |
Definition at line 63 of file interface.h.
|
inline |
constructor with default parameters
[in] | i | CAN id, defaults to 0 |
[in] | l | number of data bytes, defaults to 0 |
[in] | extended | uses 29 bit identifier, defaults to false |
[in] | rtr | is rtr frame, defaults to false |
Definition at line 78 of file interface.h.
|
inline |
Definition at line 79 of file interface.h.
|
inline |
Definition at line 81 of file interface.h.
|
inline |
Definition at line 82 of file interface.h.
|
inline |
check if frame header and length are valid
Definition at line 68 of file interface.h.
std::array<value_type, 8> can::Frame::data |
array for 8 data bytes with bounds checking
Definition at line 64 of file interface.h.
unsigned char can::Frame::dlc |
len of data
Definition at line 65 of file interface.h.