|
HardFOC Core
API reference
|
Namespaces | |
| namespace | anonymous_namespace{PipePort.cpp} |
| namespace | frame_flag |
Bits of CanFrame::flags. | |
| namespace | record |
Classes | |
| struct | CanFrame |
One CAN or CAN FD frame; len is a byte count, never a DLC code. More... | |
| class | CoPortBinding |
| One ICanPort attached to one CO driver port slot. More... | |
| class | EspTwaiPort |
| class | ICanPort |
| One CAN transport binding. More... | |
| class | LinuxSocketCanPort |
| class | PipeHub |
| The bus: forwards datagrams between participants. More... | |
| class | PipePort |
| ICanPort over a PipeHub. More... | |
| struct | PortCaps |
| What a port binding can carry. More... | |
| struct | PortStatus |
| Error counters and statistics of one port. More... | |
Typedefs | |
| using | RxSink = bool(*)(void *ctx, const CanFrame &frame) |
| RX sink; may run in ISR context (copy and return). Returns false if it could not take the frame. | |
| using | TxDoneSink = void(*)(void *ctx) |
| TX-done sink: the port has room again; may run in ISR context. | |
Enumerations | |
| enum class | TxResult : uint8_t { Ok = 0 , QueueFull , BusOff , NotAllowed } |
Result of a non-blocking ICanPort::Send. More... | |
| enum class | BusState : uint8_t { Stopped = 0 , ErrorActive , ErrorWarning , ErrorPassive , BusOff } |
| Controller error state. More... | |
Functions | |
| constexpr bool | IsExactFdLength (uint8_t len) noexcept |
Is len an exact FD payload size (0..8, 12, 16, 20, 24, 32, 48, 64)? | |
| constexpr bool | IsWellFormed (const CanFrame &f) noexcept |
| Structurally valid frame (flags, id range, length for the frame kind)? | |
| void | ToC (const CanFrame &in, hf_co_frame_t &out) noexcept |
| Copy between the C++ and C frame types (identical layout). | |
| void | FromC (const hf_co_frame_t &in, CanFrame &out) noexcept |
Variables | |
| constexpr uint8_t | kClassicMaxLen = 8U |
| Largest classic CAN payload in bytes. | |
| constexpr uint8_t | kFdMaxLen = 64U |
| Largest CAN FD payload in bytes. | |
| constexpr uint32_t | kMaxStdId = 0x7FFU |
| Largest 11-bit identifier. | |
| constexpr uint32_t | kMaxExtId = 0x1FFFFFFFU |
| Largest 29-bit identifier. | |
| using hf::can::RxSink = typedef bool (*)(void* ctx, const CanFrame& frame) |
RX sink; may run in ISR context (copy and return). Returns false if it could not take the frame.
| using hf::can::TxDoneSink = typedef void (*)(void* ctx) |
TX-done sink: the port has room again; may run in ISR context.
|
strong |
|
strong |
Result of a non-blocking ICanPort::Send.
| Enumerator | |
|---|---|
| Ok | |
| QueueFull | |
| BusOff | |
| NotAllowed | |
|
inlinenoexcept |
|
constexprnoexcept |
Is len an exact FD payload size (0..8, 12, 16, 20, 24, 32, 48, 64)?
|
constexprnoexcept |
Structurally valid frame (flags, id range, length for the frame kind)?
|
inlinenoexcept |
Copy between the C++ and C frame types (identical layout).
|
inlineconstexpr |
Largest classic CAN payload in bytes.
|
inlineconstexpr |
Largest CAN FD payload in bytes.
|
inlineconstexpr |
Largest 29-bit identifier.
|
inlineconstexpr |
Largest 11-bit identifier.