|
OpenLcbCLib 1.0 Alpha
OpenSource C Library to create OpenLcb/Lcc Nodes
|
Event Transport protocol handler. More...
Go to the source code of this file.
Data Structures | |
| struct | interface_openlcb_protocol_event_transport_t |
| Application callbacks for event transport notifications. All optional (NULL = ignored). More... | |
Functions | |
| void | ProtocolEventTransport_initialize (const interface_openlcb_protocol_event_transport_t *interface_openlcb_protocol_event_transport) |
| Stores the callback interface. Call once at startup. | |
| void | ProtocolEventTransport_handle_consumer_identify (openlcb_statemachine_info_t *statemachine_info) |
| Responds with Consumer Identified if this node consumes the requested event. | |
| void | ProtocolEventTransport_handle_consumer_range_identified (openlcb_statemachine_info_t *statemachine_info) |
| Forwards Consumer Range Identified to the app callback. No automatic response. | |
| void | ProtocolEventTransport_handle_consumer_identified_unknown (openlcb_statemachine_info_t *statemachine_info) |
| Forwards Consumer Identified Unknown to the app callback. No automatic response. | |
| void | ProtocolEventTransport_handle_consumer_identified_set (openlcb_statemachine_info_t *statemachine_info) |
| Forwards Consumer Identified Set to the app callback. No automatic response. | |
| void | ProtocolEventTransport_handle_consumer_identified_clear (openlcb_statemachine_info_t *statemachine_info) |
| Forwards Consumer Identified Clear to the app callback. No automatic response. | |
| void | ProtocolEventTransport_handle_consumer_identified_reserved (openlcb_statemachine_info_t *statemachine_info) |
| Forwards Consumer Identified Reserved to the app callback. No automatic response. | |
| void | ProtocolEventTransport_handle_producer_identify (openlcb_statemachine_info_t *statemachine_info) |
| Responds with Producer Identified if this node produces the requested event. | |
| void | ProtocolEventTransport_handle_producer_range_identified (openlcb_statemachine_info_t *statemachine_info) |
| Forwards Producer Range Identified to the app callback. No automatic response. | |
| void | ProtocolEventTransport_handle_producer_identified_unknown (openlcb_statemachine_info_t *statemachine_info) |
| Forwards Producer Identified Unknown to the app callback. No automatic response. | |
| void | ProtocolEventTransport_handle_producer_identified_set (openlcb_statemachine_info_t *statemachine_info) |
| Forwards Producer Identified Set to the app callback. No automatic response. | |
| void | ProtocolEventTransport_handle_producer_identified_clear (openlcb_statemachine_info_t *statemachine_info) |
| Forwards Producer Identified Clear to the app callback. No automatic response. | |
| void | ProtocolEventTransport_handle_producer_identified_reserved (openlcb_statemachine_info_t *statemachine_info) |
| Forwards Producer Identified Reserved to the app callback. No automatic response. | |
| void | ProtocolEventTransport_handle_events_identify_dest (openlcb_statemachine_info_t *statemachine_info) |
| Checks addressing then delegates to handle_events_identify for addressed variant. | |
| void | ProtocolEventTransport_handle_events_identify (openlcb_statemachine_info_t *statemachine_info) |
| Enumerates all producer then consumer events, responding with Identified messages. Uses the enumerate flag for multi-message sequencing. | |
| void | ProtocolEventTransport_handle_event_learn (openlcb_statemachine_info_t *statemachine_info) |
| Forwards Learn Event to the app callback. No automatic response. | |
| void | ProtocolEventTransport_handle_pc_event_report (openlcb_statemachine_info_t *statemachine_info) |
| Forwards PC Event Report to the app callback. No automatic response. | |
| void | ProtocolEventTransport_handle_pc_event_report_with_payload (openlcb_statemachine_info_t *statemachine_info) |
| Forwards PC Event Report with payload to the app callback. No automatic response. | |
| uint16_t | ProtocolEventTransport_extract_consumer_event_status_mti (openlcb_node_t *openlcb_node, uint16_t event_index) |
| Returns the Consumer Identified MTI (Unknown/Set/Clear) for consumers.list[event_index]. | |
| uint16_t | ProtocolEventTransport_extract_producer_event_status_mti (openlcb_node_t *openlcb_node, uint16_t event_index) |
| Returns the Producer Identified MTI (Unknown/Set/Clear) for producers.list[event_index]. | |
Event Transport protocol handler.
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. All application callbacks are optional (NULL callbacks are safely ignored). Automatically responds to Identify Consumer and Identify Producer requests when the event is in the node's list.
|
extern |
Stores the callback interface. Call once at startup.
| interface_openlcb_protocol_event_transport | Pointer to interface_openlcb_protocol_event_transport_t (must remain valid for application lifetime). |
Stores the callback interface. Call once at startup.
Algorithm:
Use cases:
* @param interface_openlcb_protocol_event_transport Pointer to callback interface structure *
|
extern |
Responds with Consumer Identified if this node consumes the requested event.
No response if the event is not in this node's consumer list.
| statemachine_info | Pointer to openlcb_statemachine_info_t context. |
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 *
|
extern |
Forwards Consumer Range Identified to the app callback. No automatic response.
| statemachine_info | Pointer to openlcb_statemachine_info_t context. |
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 *
|
extern |
Forwards Consumer Identified Unknown to the app callback. No automatic response.
| statemachine_info | Pointer to openlcb_statemachine_info_t context. |
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 *
|
extern |
Forwards Consumer Identified Set to the app callback. No automatic response.
| statemachine_info | Pointer to openlcb_statemachine_info_t context. |
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 *
|
extern |
Forwards Consumer Identified Clear to the app callback. No automatic response.
| statemachine_info | Pointer to openlcb_statemachine_info_t context. |
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 *
|
extern |
Forwards Consumer Identified Reserved to the app callback. No automatic response.
| statemachine_info | Pointer to openlcb_statemachine_info_t context. |
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 *
|
extern |
Responds with Producer Identified if this node produces the requested event.
No response if the event is not in this node's producer list.
| statemachine_info | Pointer to openlcb_statemachine_info_t context. |
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 *
|
extern |
Forwards Producer Range Identified to the app callback. No automatic response.
| statemachine_info | Pointer to openlcb_statemachine_info_t context. |
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 *
|
extern |
Forwards Producer Identified Unknown to the app callback. No automatic response.
| statemachine_info | Pointer to openlcb_statemachine_info_t context. |
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 *
|
extern |
Forwards Producer Identified Set to the app callback. No automatic response.
| statemachine_info | Pointer to openlcb_statemachine_info_t context. |
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 *
|
extern |
Forwards Producer Identified Clear to the app callback. No automatic response.
| statemachine_info | Pointer to openlcb_statemachine_info_t context. |
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 *
|
extern |
Forwards Producer Identified Reserved to the app callback. No automatic response.
| statemachine_info | Pointer to openlcb_statemachine_info_t context. |
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 *
|
extern |
Checks addressing then delegates to handle_events_identify for addressed variant.
| statemachine_info | Pointer to openlcb_statemachine_info_t context. |
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 *
|
extern |
Enumerates all producer then consumer events, responding with Identified messages. Uses the enumerate flag for multi-message sequencing.
| statemachine_info | Pointer to openlcb_statemachine_info_t context. |
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 *
|
extern |
Forwards Learn Event to the app callback. No automatic response.
| statemachine_info | Pointer to openlcb_statemachine_info_t context. |
Forwards Learn Event to the app callback. No automatic response.
Algorithm:
Use cases:
* @param statemachine_info Pointer to state machine context containing incoming message *
|
extern |
Forwards PC Event Report to the app callback. No automatic response.
| statemachine_info | Pointer to openlcb_statemachine_info_t context. |
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 *
|
extern |
Forwards PC Event Report with payload to the app callback. No automatic response.
| statemachine_info | Pointer to openlcb_statemachine_info_t context. |
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 *
|
extern |
Returns the Consumer Identified MTI (Unknown/Set/Clear) for consumers.list[event_index].
| openlcb_node | Pointer to openlcb_node_t with the consumer list. |
| event_index | Index into consumers.list. |
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 *
|
extern |
Returns the Producer Identified MTI (Unknown/Set/Clear) for producers.list[event_index].
| openlcb_node | Pointer to openlcb_node_t with the producer list. |
| event_index | Index into producers.list. |
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 *
Copyright (c) 2026 Jim Kueneman all rights reserved. See the License