OpenLcbCLib 1.0 Alpha
OpenSource C Library to create OpenLcb/Lcc Nodes
Loading...
Searching...
No Matches
protocol_broadcast_time_handler.h
Go to the documentation of this file.
1
44#ifndef __OPENLCB_PROTOCOL_BROADCAST_TIME_HANDLER__
45#define __OPENLCB_PROTOCOL_BROADCAST_TIME_HANDLER__
46
47#include <stdbool.h>
48#include <stdint.h>
49
50#include "openlcb_types.h"
51
58 typedef struct {
59
61 void (*on_time_received)(openlcb_node_t *openlcb_node, broadcast_clock_state_t *clock_state);
63 void (*on_date_received)(openlcb_node_t *openlcb_node, broadcast_clock_state_t *clock_state);
65 void (*on_year_received)(openlcb_node_t *openlcb_node, broadcast_clock_state_t *clock_state);
67 void (*on_rate_received)(openlcb_node_t *openlcb_node, broadcast_clock_state_t *clock_state);
69 void (*on_clock_started)(openlcb_node_t *openlcb_node, broadcast_clock_state_t *clock_state);
71 void (*on_clock_stopped)(openlcb_node_t *openlcb_node, broadcast_clock_state_t *clock_state);
73 void (*on_date_rollover)(openlcb_node_t *openlcb_node, broadcast_clock_state_t *clock_state);
74
76
77#ifdef __cplusplus
78extern "C" {
79#endif
80
86 extern void ProtocolBroadcastTime_initialize(const interface_openlcb_protocol_broadcast_time_handler_t *interface_openlcb_protocol_broadcast_time_handler);
87
99
100#ifdef __cplusplus
101}
102#endif
103
104#endif /* __OPENLCB_PROTOCOL_BROADCAST_TIME_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 ProtocolBroadcastTime_handle_time_event(openlcb_statemachine_info_t *statemachine_info, event_id_t event_id)
Handles incoming broadcast time events.
Definition protocol_broadcast_time_handler.c:209
void ProtocolBroadcastTime_initialize(const interface_openlcb_protocol_broadcast_time_handler_t *interface_openlcb_protocol_broadcast_time_handler)
Initializes the Broadcast Time Protocol handler.
Definition protocol_broadcast_time_handler.c:61
Complete state for one Broadcast Time clock.
Definition openlcb_types.h:407
Application callbacks for broadcast time events.
Definition protocol_broadcast_time_handler.h:58
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