|
OpenLcbCLib 1.0 Alpha
OpenSource C Library to create OpenLcb/Lcc Nodes
|
Event Transport protocol implementation. More...
Event Transport protocol implementation.
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.
Handles producer/consumer identification, event reports, and learn/teach operations. Automatically responds to Identify Consumer and Identify Producer when the event is in the node's list. Dispatches to optional application callbacks for all received event notifications.
| void ProtocolEventTransport_initialize | ( | const interface_openlcb_protocol_event_transport_t * | interface_openlcb_protocol_event_transport | ) |
Initializes the Event Transport protocol layer.
Stores the callback interface. Call once at startup.
Algorithm:
Use cases:
* @param interface_openlcb_protocol_event_transport Pointer to callback interface structure *
| uint16_t ProtocolEventTransport_extract_consumer_event_status_mti | ( | openlcb_node_t * | openlcb_node, |
| uint16_t | event_index ) |
Extracts the appropriate MTI for consumer event status.
Returns the Consumer Identified MTI (Unknown/Set/Clear) for consumers.list[event_index].
Algorithm:
Use cases:
* @param openlcb_node Pointer to node containing consumer event list *
* @param event_index Index into the node's consumer event list *
| uint16_t ProtocolEventTransport_extract_producer_event_status_mti | ( | openlcb_node_t * | openlcb_node, |
| uint16_t | event_index ) |
Extracts the appropriate MTI for producer event status.
Returns the Producer Identified MTI (Unknown/Set/Clear) for producers.list[event_index].
Algorithm:
Use cases:
* @param openlcb_node Pointer to node containing producer event list *
* @param event_index Index into the node's producer event list *
| void ProtocolEventTransport_handle_consumer_identify | ( | openlcb_statemachine_info_t * | statemachine_info | ) |
Handles Consumer Identify message.
Responds with Consumer Identified if this node consumes the requested event.
Algorithm:
Use cases:
* @param statemachine_info Pointer to state machine context containing incoming message *
| void ProtocolEventTransport_handle_consumer_range_identified | ( | openlcb_statemachine_info_t * | statemachine_info | ) |
Handles Consumer Range Identified message.
Forwards Consumer Range Identified to the app callback. No automatic response.
Algorithm:
Use cases:
* @param statemachine_info Pointer to state machine context containing incoming message *
| void ProtocolEventTransport_handle_consumer_identified_unknown | ( | openlcb_statemachine_info_t * | statemachine_info | ) |
Handles Consumer Identified Unknown message.
Forwards Consumer Identified Unknown to the app callback. No automatic response.
Algorithm:
Use cases:
* @param statemachine_info Pointer to state machine context containing incoming message *
| void ProtocolEventTransport_handle_consumer_identified_set | ( | openlcb_statemachine_info_t * | statemachine_info | ) |
Handles Consumer Identified Set message.
Forwards Consumer Identified Set to the app callback. No automatic response.
Algorithm:
Use cases:
* @param statemachine_info Pointer to state machine context containing incoming message *
| void ProtocolEventTransport_handle_consumer_identified_clear | ( | openlcb_statemachine_info_t * | statemachine_info | ) |
Handles Consumer Identified Clear message.
Forwards Consumer Identified Clear to the app callback. No automatic response.
Algorithm:
Use cases:
* @param statemachine_info Pointer to state machine context containing incoming message *
| void ProtocolEventTransport_handle_consumer_identified_reserved | ( | openlcb_statemachine_info_t * | statemachine_info | ) |
Handles Consumer Identified Reserved message.
Forwards Consumer Identified Reserved to the app callback. No automatic response.
Algorithm:
Use cases:
* @param statemachine_info Pointer to state machine context containing incoming message *
| void ProtocolEventTransport_handle_producer_identify | ( | openlcb_statemachine_info_t * | statemachine_info | ) |
Handles Producer Identify message.
Responds with Producer Identified if this node produces the requested event.
Algorithm:
Use cases:
* @param statemachine_info Pointer to state machine context containing incoming message *
| void ProtocolEventTransport_handle_producer_range_identified | ( | openlcb_statemachine_info_t * | statemachine_info | ) |
Handles Producer Range Identified message.
Forwards Producer Range Identified to the app callback. No automatic response.
Algorithm:
Use cases:
* @param statemachine_info Pointer to state machine context containing incoming message *
| void ProtocolEventTransport_handle_producer_identified_unknown | ( | openlcb_statemachine_info_t * | statemachine_info | ) |
Handles Producer Identified Unknown message.
Forwards Producer Identified Unknown to the app callback. No automatic response.
Algorithm:
Use cases:
* @param statemachine_info Pointer to state machine context containing incoming message *
| void ProtocolEventTransport_handle_producer_identified_set | ( | openlcb_statemachine_info_t * | statemachine_info | ) |
Handles Producer Identified Set message.
Forwards Producer Identified Set to the app callback. No automatic response.
Algorithm:
Use cases:
* @param statemachine_info Pointer to state machine context containing incoming message *
| void ProtocolEventTransport_handle_producer_identified_clear | ( | openlcb_statemachine_info_t * | statemachine_info | ) |
Handles Producer Identified Clear message.
Forwards Producer Identified Clear to the app callback. No automatic response.
Algorithm:
Use cases:
* @param statemachine_info Pointer to state machine context containing incoming message *
| void ProtocolEventTransport_handle_producer_identified_reserved | ( | openlcb_statemachine_info_t * | statemachine_info | ) |
Handles Producer Identified Reserved message.
Forwards Producer Identified Reserved to the app callback. No automatic response.
Algorithm:
Use cases:
* @param statemachine_info Pointer to state machine context containing incoming message *
| void ProtocolEventTransport_handle_events_identify | ( | openlcb_statemachine_info_t * | statemachine_info | ) |
Handles global Identify Events message.
Enumerates all producer then consumer events, responding with Identified messages. Uses the enumerate flag for multi-message sequencing.
Algorithm:
Use cases:
* @param statemachine_info Pointer to state machine context containing incoming message *
| void ProtocolEventTransport_handle_events_identify_dest | ( | openlcb_statemachine_info_t * | statemachine_info | ) |
Handles Identify Events message with destination addressing.
Checks addressing then delegates to handle_events_identify for addressed variant.
Algorithm:
Use cases:
* @param statemachine_info Pointer to state machine context containing incoming message *
| void ProtocolEventTransport_handle_event_learn | ( | openlcb_statemachine_info_t * | statemachine_info | ) |
Handles Event Learn message.
Forwards Learn Event to the app callback. No automatic response.
Algorithm:
Use cases:
* @param statemachine_info Pointer to state machine context containing incoming message *
| void ProtocolEventTransport_handle_pc_event_report | ( | openlcb_statemachine_info_t * | statemachine_info | ) |
Handles Producer/Consumer Event Report message.
Forwards PC Event Report to the app callback. No automatic response.
Algorithm:
Use cases:
* @param statemachine_info Pointer to state machine context containing incoming message *
| void ProtocolEventTransport_handle_pc_event_report_with_payload | ( | openlcb_statemachine_info_t * | statemachine_info | ) |
Handles Producer/Consumer Event Report message with payload.
Forwards PC Event Report with payload to the app callback. No automatic response.
Algorithm:
Use cases:
* @param statemachine_info Pointer to state machine context containing incoming message *
Copyright (c) 2026 Jim Kueneman all rights reserved. See the License