Class CanId
Defined in File socket_can_id.hpp
Class Documentation
-
class CanId
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
Public Functions
-
CanId() = default
-
explicit CanId(const IdT raw_id, const uint64_t bus_time, const LengthT data_length = 0U)
Directly set id, blindly taking whatever bytes are given.
-
CanId(const IdT id, const uint64_t bus_time, FrameType type, StandardFrame_)
Sets ID
- Throws:
std::domain_error – if id would get truncated
-
CanId(const IdT id, const uint64_t bus_time, FrameType type, ExtendedFrame_)
Sets ID
- Throws:
std::domain_error – if id would get truncated
-
CanId &identifier(const IdT id)
Sets leading bits
- Throws:
std::domain_error – If id would get truncated, 11 bits for Standard, 29 bits for Extended
-
bool is_extended() const noexcept
Check if frame is extended.
-
FrameType frame_type() const
Check frame type
- Throws:
std::domain_error – If bits are in an inconsistent state
-
inline uint64_t get_bus_time()
-
CanId() = default