OpenLcbCLib 1.0 Alpha
OpenSource C Library to create OpenLcb/Lcc Nodes
Loading...
Searching...
No Matches
protocol_message_network.h
Go to the documentation of this file.
1
40#ifndef __OPENLCB_PROTOCOL_MESSAGE_NETWORK__
41#define __OPENLCB_PROTOCOL_MESSAGE_NETWORK__
42
43#include <stdbool.h>
44#include <stdint.h>
45
46#include "openlcb_types.h"
47
49typedef struct {
50
58 void (*on_optional_interaction_rejected)(openlcb_node_t *openlcb_node, node_id_t source_node_id, uint16_t error_code, uint16_t rejected_mti);
59
67 void (*on_terminate_due_to_error)(openlcb_node_t *openlcb_node, node_id_t source_node_id, uint16_t error_code, uint16_t rejected_mti);
68
70
71#ifdef __cplusplus
72extern "C" {
73#endif /* __cplusplus */
74
80 extern void ProtocolMessageNetwork_initialize(const interface_openlcb_protocol_message_network_t *interface_openlcb_protocol_message_network);
81
88
95
102
109
116
123
130
142
154
155#ifdef __cplusplus
156}
157#endif /* __cplusplus */
158
159
160#endif /* __OPENLCB_PROTOCOL_MESSAGE_NETWORK__ */
Core type definitions, structures, and configuration constants for the OpenLCB library.
uint64_t node_id_t
48-bit Node ID stored in a 64-bit type (upper 16 bits unused).
Definition openlcb_types.h:359
void ProtocolMessageNetwork_handle_verify_node_id_global(openlcb_statemachine_info_t *statemachine_info)
Handle global Verify Node ID — replies if payload matches or is empty.
Definition protocol_message_network.c:201
void ProtocolMessageNetwork_handle_optional_interaction_rejected(openlcb_statemachine_info_t *statemachine_info)
Handle Optional Interaction Rejected. No automatic response.
Definition protocol_message_network.c:249
void ProtocolMessageNetwork_handle_protocol_support_inquiry(openlcb_statemachine_info_t *statemachine_info)
Handle Protocol Support Inquiry — replies with this node’s PSI flags.
Definition protocol_message_network.c:165
void ProtocolMessageNetwork_handle_protocol_support_reply(openlcb_statemachine_info_t *statemachine_info)
Handle Protocol Support Reply. No automatic response.
Definition protocol_message_network.c:194
void ProtocolMessageNetwork_handle_verified_node_id(openlcb_statemachine_info_t *statemachine_info)
Handle Verified Node ID — checks for duplicate Node ID.
Definition protocol_message_network.c:231
void ProtocolMessageNetwork_initialize(const interface_openlcb_protocol_message_network_t *interface_openlcb_protocol_message_network)
Stores the callback interface. Call once at startup.
Definition protocol_message_network.c:61
void ProtocolMessageNetwork_handle_verify_node_id_addressed(openlcb_statemachine_info_t *statemachine_info)
Handle addressed Verify Node ID — always replies.
Definition protocol_message_network.c:224
void ProtocolMessageNetwork_handle_initialization_complete_simple(openlcb_statemachine_info_t *statemachine_info)
Handle Initialization Complete Simple. No automatic response.
Definition protocol_message_network.c:145
void ProtocolMessageNetwork_handle_terminate_due_to_error(openlcb_statemachine_info_t *statemachine_info)
Handle Terminate Due To Error. No automatic response.
Definition protocol_message_network.c:286
void ProtocolMessageNetwork_handle_initialization_complete(openlcb_statemachine_info_t *statemachine_info)
Handle Initialization Complete (full node). No automatic response.
Definition protocol_message_network.c:130
Callback interface for message network protocol notifications.
Definition protocol_message_network.h:49
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