|
OpenLcbCLib 1.0 Alpha
OpenSource C Library to create OpenLcb/Lcc Nodes
|
State machine that decodes and routes incoming CAN frames. More...
Go to the source code of this file.
Data Structures | |
| struct | interface_can_rx_statemachine_t |
| Dependency-injection interface for the CAN receive state machine. More... | |
Functions | |
| void | CanRxStatemachine_initialize (const interface_can_rx_statemachine_t *interface_can_rx_statemachine) |
| Registers the dependency-injection interface for this module. | |
| void | CanRxStatemachine_incoming_can_driver_callback (can_msg_t *can_msg) |
| Primary entry point called by the hardware CAN driver on frame reception. | |
State machine that decodes and routes incoming CAN frames.
Identifies frame category (OpenLCB message vs CAN control frame), validates destination aliases, extracts framing bits, and dispatches to the appropriate handler in interface_can_rx_statemachine_t.
|
extern |
Registers the dependency-injection interface for this module.
| interface_can_rx_statemachine | Pointer to a populated interface_can_rx_statemachine_t. Must remain valid for the lifetime of the application. All REQUIRED pointers must be non-NULL. |
Registers the dependency-injection interface for this module.
|
extern |
Primary entry point called by the hardware CAN driver on frame reception.
Invokes the optional on_receive callback, then classifies the frame as an OpenLCB message or a CAN control frame and dispatches accordingly.
This function is typically called from an interrupt or receive thread and accesses shared resources (FIFOs, buffer lists). It must NOT be called while the main state machine has resources locked. Recommended approaches:
| can_msg | Pointer to the received CAN frame. Must not be NULL. Must remain valid until this function returns. |
Copyright (c) 2026 Jim Kueneman all rights reserved. See the License