|
OpenLcbCLib 1.0 Alpha
OpenSource C Library to create OpenLcb/Lcc Nodes
|
Dependency-injection interface for the CAN transmit state machine. More...
Data Fields | |
| bool(* | is_tx_buffer_empty )(void) |
| REQUIRED. Query hardware TX buffer availability. Typical: application CAN driver function. | |
| bool(* | handle_addressed_msg_frame )(openlcb_msg_t *openlcb_msg, can_msg_t *can_msg_worker, uint16_t *openlcb_start_index) |
| REQUIRED. Transmit one frame of an addressed OpenLCB message. Typical: CanTxMessageHandler_addressed_msg_frame. | |
| bool(* | handle_unaddressed_msg_frame )(openlcb_msg_t *openlcb_msg, can_msg_t *can_msg_worker, uint16_t *openlcb_start_index) |
| REQUIRED. Transmit one frame of an unaddressed OpenLCB message. Typical: CanTxMessageHandler_unaddressed_msg_frame. | |
| bool(* | handle_datagram_frame )(openlcb_msg_t *openlcb_msg, can_msg_t *can_msg_worker, uint16_t *openlcb_start_index) |
| REQUIRED. Transmit one frame of a datagram message. Typical: CanTxMessageHandler_datagram_frame. | |
| bool(* | handle_stream_frame )(openlcb_msg_t *openlcb_msg, can_msg_t *can_msg_worker, uint16_t *openlcb_start_index) |
| REQUIRED. Transmit one frame of a stream message (placeholder). Typical: CanTxMessageHandler_stream_frame. | |
| bool(* | handle_can_frame )(can_msg_t *can_msg) |
| REQUIRED. Transmit a pre-built raw CAN frame. Typical: CanTxMessageHandler_can_frame. | |
| listener_alias_entry_t *(* | listener_find_by_node_id )(node_id_t node_id) |
| OPTIONAL. Resolve a listener Node ID to its CAN alias. | |
Dependency-injection interface for the CAN transmit state machine.
The first 6 pointers are REQUIRED (must not be NULL). listener_find_by_node_id is OPTIONAL (NULL = feature not linked in).
| bool(* is_tx_buffer_empty) (void) |
REQUIRED. Query hardware TX buffer availability. Typical: application CAN driver function.
| bool(* handle_addressed_msg_frame) (openlcb_msg_t *openlcb_msg, can_msg_t *can_msg_worker, uint16_t *openlcb_start_index) |
REQUIRED. Transmit one frame of an addressed OpenLCB message. Typical: CanTxMessageHandler_addressed_msg_frame.
| bool(* handle_unaddressed_msg_frame) (openlcb_msg_t *openlcb_msg, can_msg_t *can_msg_worker, uint16_t *openlcb_start_index) |
REQUIRED. Transmit one frame of an unaddressed OpenLCB message. Typical: CanTxMessageHandler_unaddressed_msg_frame.
| bool(* handle_datagram_frame) (openlcb_msg_t *openlcb_msg, can_msg_t *can_msg_worker, uint16_t *openlcb_start_index) |
REQUIRED. Transmit one frame of a datagram message. Typical: CanTxMessageHandler_datagram_frame.
| bool(* handle_stream_frame) (openlcb_msg_t *openlcb_msg, can_msg_t *can_msg_worker, uint16_t *openlcb_start_index) |
REQUIRED. Transmit one frame of a stream message (placeholder). Typical: CanTxMessageHandler_stream_frame.
| bool(* handle_can_frame) (can_msg_t *can_msg) |
REQUIRED. Transmit a pre-built raw CAN frame. Typical: CanTxMessageHandler_can_frame.
| listener_alias_entry_t *(* listener_find_by_node_id) (node_id_t node_id) |
OPTIONAL. Resolve a listener Node ID to its CAN alias.
Called by the TX path when dest_alias == 0 and dest_id != 0 (forwarded consist commands). Returns a pointer to the listener table entry so the caller can read entry->alias. NULL pointer = feature not linked in; NULL return = node_id not found in table.
Copyright (c) 2026 Jim Kueneman all rights reserved. See the License