Vortex Driver
API reference
Loading...
Searching...
No Matches
VortexCanFrame.hpp
Go to the documentation of this file.
1
8#pragma once
9
10#include <cstdint>
11
12namespace hf::vortex {
13
18 std::uint32_t id{0};
19 std::uint8_t dlc{0};
20 bool extended{false};
21 bool rtr{false};
22 std::uint8_t data[8]{};
23
25 void pad() noexcept {
26 for (std::uint8_t i = dlc; i < 8; ++i) data[i] = 0;
27 }
28};
29
30} // namespace hf::vortex
Definition VortexCanFrame.hpp:12
Classic CAN 2.0A frame (11-bit ID, RTR, up to 8 data bytes).
Definition VortexCanFrame.hpp:17
std::uint8_t dlc
Definition VortexCanFrame.hpp:19
void pad() noexcept
Zero-initialize data beyond DLC for debug consistency.
Definition VortexCanFrame.hpp:25
std::uint8_t data[8]
Definition VortexCanFrame.hpp:22
bool rtr
Definition VortexCanFrame.hpp:21
bool extended
Definition VortexCanFrame.hpp:20