|
OpenLcbCLib 1.0 Alpha
OpenSource C Library to create OpenLcb/Lcc Nodes
|
Implementation of the CAN transmit state machine. More...
Functions | |
| void | CanTxStatemachine_initialize (const interface_can_tx_statemachine_t *interface_can_tx_statemachine) |
| Stores the dependency-injection interface pointer. | |
| bool | CanTxStatemachine_send_openlcb_message (openlcb_msg_t *openlcb_msg) |
| Transmits a complete OpenLCB message, blocking until all frames are sent. | |
| bool | CanTxStatemachine_send_can_message (can_msg_t *can_msg) |
| Transmits a pre-built raw can_msg_t via the hardware handler. | |
Implementation of the CAN transmit state machine.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Routes outgoing OpenLCB messages to the correct frame handler (addressed, unaddressed, datagram, or stream) and loops until the full payload is transmitted as an atomic multi-frame sequence. Also provides a pass-through path for pre-built raw CAN control frames.
| void CanTxStatemachine_initialize | ( | const interface_can_tx_statemachine_t * | interface_can_tx_statemachine | ) |
Stores the dependency-injection interface pointer.
Registers the dependency-injection interface for this module.
| bool CanTxStatemachine_send_openlcb_message | ( | openlcb_msg_t * | openlcb_msg | ) |
Transmits a complete OpenLCB message, blocking until all frames are sent.
Converts and transmits an openlcb_msg_t as one or more CAN frames.
Algorithm:
* @param openlcb_msg Message to transmit. *
Copyright (c) 2026 Jim Kueneman all rights reserved. See the License