Class Frame
Defined in File frame.hpp
Class Documentation
-
class Frame
Class for a frame of the CAN bus protocol, see https://en.wikipedia.org/wiki/CAN_bus This class replaces the Linux SocketCAN frame struct in order to be more portable.
Public Functions
-
constexpr Frame(std::uint32_t const can_id, std::array<std::uint8_t, 8> const &data) noexcept
-
Frame() = delete
Class constructor.
- Parameters:
can_id – [in] The CAN id of the message
data – [in] The data to be transmitted to the CAN node
-
constexpr std::uint32_t getId() const noexcept
Getter for the frame CAN id.
- Returns:
The destination frame id of the CAN frame
-
constexpr std::array<std::uint8_t, 8> const &getData() const noexcept
Getter for data to be transmitted to CAN node.
- Returns:
The data to be transmitted to the CAN node
-
constexpr Frame(std::uint32_t const can_id, std::array<std::uint8_t, 8> const &data) noexcept