|
Autoware.Auto
|
|
#include <socket_can_id.hpp>
Public Types | |
| using | IdT = uint32_t |
| using | LengthT = uint32_t |
Public Member Functions | |
| CanId ()=default | |
| CanId (const IdT raw_id, const LengthT data_length=0U) | |
| Directly set id, blindly taking whatever bytes are given. More... | |
| CanId (const IdT id, FrameType type, StandardFrame_) | |
| CanId (const IdT id, FrameType type, ExtendedFrame_) | |
| CanId & | standard () noexcept |
| Sets bit 31 to 0. More... | |
| CanId & | extended () noexcept |
| Sets bit 31 to 1. More... | |
| CanId & | error_frame () noexcept |
| Sets bit 29 to 1, and bit 30 to 0. More... | |
| CanId & | remote_frame () noexcept |
| Sets bit 29 to 0, and bit 30 to 1. More... | |
| CanId & | data_frame () noexcept |
| Clears bits 29 and 30 (sets to 0) More... | |
| CanId & | frame_type (const FrameType type) |
| Sets the type accordingly. More... | |
| CanId & | identifier (const IdT id) |
| IdT | identifier () const noexcept |
| Get just the can_id bits. More... | |
| IdT | get () const noexcept |
| Get the whole id value. More... | |
| bool8_t | is_extended () const noexcept |
| Check if frame is extended. More... | |
| FrameType | frame_type () const |
| LengthT | length () const noexcept |
| Get the length of the data; only nonzero on received data. More... | |
A wrapper around can_id_t to make it a little more C++-y WARNING: I'm assuming the 0th bit is the MSB aka the leftmost bit
| using autoware::drivers::socketcan::CanId::IdT = uint32_t |
| using autoware::drivers::socketcan::CanId::LengthT = uint32_t |
|
default |
|
explicit |
Directly set id, blindly taking whatever bytes are given.
| autoware::drivers::socketcan::CanId::CanId | ( | const IdT | id, |
| FrameType | type, | ||
| StandardFrame_ | |||
| ) |
Sets ID
| std::domain_error | if id would get truncated |
| autoware::drivers::socketcan::CanId::CanId | ( | const IdT | id, |
| FrameType | type, | ||
| ExtendedFrame_ | |||
| ) |
Sets ID
| std::domain_error | if id would get truncated |
|
noexcept |
Clears bits 29 and 30 (sets to 0)
|
noexcept |
Sets bit 29 to 1, and bit 30 to 0.
|
noexcept |
Sets bit 31 to 1.
| FrameType autoware::drivers::socketcan::CanId::frame_type | ( | ) | const |
Check frame type
| std::domain_error | If bits are in an inconsistent state |
Sets the type accordingly.
|
noexcept |
Get the whole id value.
|
noexcept |
Get just the can_id bits.
Sets leading bits
| std::domain_error | If id would get truncated, 11 bits for Standard, 29 bits for Extended |
|
noexcept |
Check if frame is extended.
|
noexcept |
Get the length of the data; only nonzero on received data.
|
noexcept |
Sets bit 29 to 0, and bit 30 to 1.
|
noexcept |
Sets bit 31 to 0.