OpenLcbCLib 1.0 Alpha
OpenSource C Library to create OpenLcb/Lcc Nodes
Loading...
Searching...
No Matches
protocol_train_search_handler.h
Go to the documentation of this file.
1
46#ifndef __OPENLCB_PROTOCOL_TRAIN_SEARCH_HANDLER__
47#define __OPENLCB_PROTOCOL_TRAIN_SEARCH_HANDLER__
48
49#include <stdbool.h>
50#include <stdint.h>
51
52#include "openlcb_types.h"
53
60 typedef struct {
61
63 void (*on_search_matched)(openlcb_node_t *openlcb_node, uint16_t search_address, uint8_t flags);
64
66 openlcb_node_t* (*on_search_no_match)(uint16_t search_address, uint8_t flags);
67
69
70#ifdef __cplusplus
71extern "C" {
72#endif
73
80
92
103 openlcb_statemachine_info_t *statemachine_info,
104 event_id_t event_id);
105
106#ifdef __cplusplus
107}
108#endif
109
110#endif /* __OPENLCB_PROTOCOL_TRAIN_SEARCH_HANDLER__ */
Core type definitions, structures, and configuration constants for the OpenLCB library.
uint64_t event_id_t
64-bit Event ID.
Definition openlcb_types.h:340
void ProtocolTrainSearch_initialize(const interface_protocol_train_search_handler_t *interface)
Initializes the Train Search Protocol handler.
Definition protocol_train_search_handler.c:95
void ProtocolTrainSearch_handle_search_no_match(openlcb_statemachine_info_t *statemachine_info, event_id_t event_id)
Handles the no-match case after full train search enumeration.
Definition protocol_train_search_handler.c:465
void ProtocolTrainSearch_handle_search_event(openlcb_statemachine_info_t *statemachine_info, event_id_t event_id)
Handles incoming train search events.
Definition protocol_train_search_handler.c:391
Application callbacks for train search events.
Definition protocol_train_search_handler.h:60
OpenLCB virtual node.
Definition openlcb_types.h:679
Complete context passed to protocol handler functions.
Definition openlcb_types.h:743

Copyright (c) 2026 Jim Kueneman all rights reserved. See the License