Woman, Life, Freedom |
OBD-II Emulator
Linux ODB-II Emulator public and protected interfaces documentation
|
CAN transmission packet frame. More...
#include <can_frame.h>
Public Member Functions | |
CanFrame (uint32_t id, bool extended, bool remote, const std::vector< uint8_t > &data) | |
Constructor. More... | |
uint32_t | GetId () const noexcept |
Get frame CAN ID. More... | |
bool | IsExtended () const noexcept |
Indicate whether the frame is extended or standard. More... | |
bool | IsRemote () const noexcept |
Indicate whether the frame is remote transmission request (RTR) or data. More... | |
size_t | GetDataLength () const noexcept |
Get frame data length (DLC) More... | |
const std::array< uint8_t, cDataLengthMax > & | GetData () const noexcept |
Get frame data. More... | |
Static Public Attributes | |
static const size_t | cDataLengthMax {8} |
Maximum CAN frame data length. | |
CAN transmission packet frame.
ObdEmulator::CanFrame::CanFrame | ( | uint32_t | id, |
bool | extended, | ||
bool | remote, | ||
const std::vector< uint8_t > & | data | ||
) |
Constructor.
id | CAN frame ID |
extended | Indicates whether the frame is extended or standard |
remote | Indicates whether the frame is remote transmission request (RTR) or data |
data | CAN packet containing data |
std::out_of_range | Throws if the ID is out of range |
|
noexcept |
Get frame data.
|
noexcept |
Get frame data length (DLC)
|
noexcept |
Get frame CAN ID.
|
noexcept |
Indicate whether the frame is extended or standard.
|
noexcept |
Indicate whether the frame is remote transmission request (RTR) or data.