|
OpenLcbCLib 1.0 Alpha
OpenSource C Library to create OpenLcb/Lcc Nodes
|
Orchestrates CAN frame transmission for all OpenLCB message types. More...
Go to the source code of this file.
Data Structures | |
| struct | interface_can_tx_statemachine_t |
| Dependency-injection interface for the CAN transmit state machine. More... | |
Functions | |
| void | CanTxStatemachine_initialize (const interface_can_tx_statemachine_t *interface_can_tx_statemachine) |
| Registers the dependency-injection interface for this module. | |
| bool | CanTxStatemachine_send_openlcb_message (openlcb_msg_t *openlcb_msg) |
| Converts and transmits an openlcb_msg_t as one or more CAN frames. | |
| bool | CanTxStatemachine_send_can_message (can_msg_t *can_msg) |
| Transmits a pre-built raw can_msg_t directly to the hardware. | |
Orchestrates CAN frame transmission for all OpenLCB message types.
Checks hardware buffer availability, selects the correct message-type handler, and manages multi-frame sequencing until the full payload is sent.
|
extern |
Registers the dependency-injection interface for this module.
| interface_can_tx_statemachine | Pointer to a populated interface_can_tx_statemachine_t. Must remain valid for the lifetime of the application. All 6 pointers must be non-NULL. |
Registers the dependency-injection interface for this module.
|
extern |
Converts and transmits an openlcb_msg_t as one or more CAN frames.
Returns false immediately if the hardware TX buffer is not empty. Determines message type (addressed / unaddressed / datagram / stream), then loops until the entire payload is transmitted as an atomic multi-frame sequence.
| openlcb_msg | OpenLCB message to transmit. Must not be NULL. |
Converts and transmits an openlcb_msg_t as one or more CAN frames.
Algorithm:
* @param openlcb_msg Message to transmit. *
|
extern |
Transmits a pre-built raw can_msg_t directly to the hardware.
No OpenLCB processing and no buffer-availability check — caller is responsible for ensuring the hardware is ready. Used primarily for CAN control frames (CID, RID, AMD) during alias allocation.
| can_msg | Fully-constructed CAN frame. Must not be NULL. |
Transmits a pre-built raw can_msg_t directly to the hardware.
Copyright (c) 2026 Jim Kueneman all rights reserved. See the License