OpenLcbCLib 1.0 Alpha
OpenSource C Library to create OpenLcb/Lcc Nodes
Loading...
Searching...
No Matches
interface_openlcb_login_state_machine_t Struct Reference

Callback interface for the login state machine. All pointers are REQUIRED unless noted. Internal function pointers are exposed for unit testing. More...

Data Fields

bool(* send_openlcb_msg )(openlcb_msg_t *outgoing_msg)
 Queue a message for transmission. Return false if buffer full (retried next tick). REQUIRED.
 
openlcb_node_t *(* openlcb_node_get_first )(uint8_t key)
 Return the first node in the pool (NULL if empty). key separates iteration contexts. REQUIRED.
 
openlcb_node_t *(* openlcb_node_get_next )(uint8_t key)
 Return the next node in the pool (NULL at end). REQUIRED.
 
void(* load_initialization_complete )(openlcb_login_statemachine_info_t *openlcb_statemachine_info)
 Build Initialization Complete message for the current node. REQUIRED.
 
void(* load_producer_events )(openlcb_login_statemachine_info_t *openlcb_statemachine_info)
 Build the next Producer Identified message; set enumerate flag if more remain. REQUIRED.
 
void(* load_consumer_events )(openlcb_login_statemachine_info_t *openlcb_statemachine_info)
 Build the next Consumer Identified message; set enumerate flag if more remain. REQUIRED.
 
void(* process_login_statemachine )(openlcb_login_statemachine_info_t *statemachine_info)
 Dispatches to the handler matching node->run_state.
 
bool(* handle_outgoing_openlcb_message )(void)
 Try to send the pending outgoing message; return true if one was pending.
 
bool(* handle_try_reenumerate )(void)
 Re-enter the state processor if the enumerate flag is set.
 
bool(* handle_try_enumerate_first_node )(void)
 Start enumeration from the first node if no current node is active.
 
bool(* handle_try_enumerate_next_node )(void)
 Advance to the next node that needs login processing.
 
bool(* on_login_complete )(openlcb_node_t *openlcb_node)
 Called after login completes, just before RUNSTATE_RUN. Optional (may be NULL).
 

Detailed Description

Callback interface for the login state machine. All pointers are REQUIRED unless noted. Internal function pointers are exposed for unit testing.

Field Documentation

◆ send_openlcb_msg

bool(* send_openlcb_msg) (openlcb_msg_t *outgoing_msg)

Queue a message for transmission. Return false if buffer full (retried next tick). REQUIRED.

◆ openlcb_node_get_first

openlcb_node_t *(* openlcb_node_get_first) (uint8_t key)

Return the first node in the pool (NULL if empty). key separates iteration contexts. REQUIRED.

◆ openlcb_node_get_next

openlcb_node_t *(* openlcb_node_get_next) (uint8_t key)

Return the next node in the pool (NULL at end). REQUIRED.

◆ load_initialization_complete

void(* load_initialization_complete) (openlcb_login_statemachine_info_t *openlcb_statemachine_info)

Build Initialization Complete message for the current node. REQUIRED.

◆ load_producer_events

void(* load_producer_events) (openlcb_login_statemachine_info_t *openlcb_statemachine_info)

Build the next Producer Identified message; set enumerate flag if more remain. REQUIRED.

◆ load_consumer_events

void(* load_consumer_events) (openlcb_login_statemachine_info_t *openlcb_statemachine_info)

Build the next Consumer Identified message; set enumerate flag if more remain. REQUIRED.

◆ process_login_statemachine

void(* process_login_statemachine) (openlcb_login_statemachine_info_t *statemachine_info)

Dispatches to the handler matching node->run_state.

◆ handle_outgoing_openlcb_message

bool(* handle_outgoing_openlcb_message) (void)

Try to send the pending outgoing message; return true if one was pending.

◆ handle_try_reenumerate

bool(* handle_try_reenumerate) (void)

Re-enter the state processor if the enumerate flag is set.

◆ handle_try_enumerate_first_node

bool(* handle_try_enumerate_first_node) (void)

Start enumeration from the first node if no current node is active.

◆ handle_try_enumerate_next_node

bool(* handle_try_enumerate_next_node) (void)

Advance to the next node that needs login processing.

◆ on_login_complete

bool(* on_login_complete) (openlcb_node_t *openlcb_node)

Called after login completes, just before RUNSTATE_RUN. Optional (may be NULL).


The documentation for this struct was generated from the following file:

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