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

Dependency-injection interface for the CAN login state machine. More...

Data Fields

void(* state_init )(can_statemachine_info_t *can_statemachine_info)
 State 1 - init seed.
 
void(* state_generate_seed )(can_statemachine_info_t *can_statemachine_info)
 State 2 - LFSR new seed (conflict retry only).
 
void(* state_generate_alias )(can_statemachine_info_t *can_statemachine_info)
 State 3 - derive 12-bit alias.
 
void(* state_load_cid07 )(can_statemachine_info_t *can_statemachine_info)
 State 4 - CID7 frame.
 
void(* state_load_cid06 )(can_statemachine_info_t *can_statemachine_info)
 State 5 - CID6 frame.
 
void(* state_load_cid05 )(can_statemachine_info_t *can_statemachine_info)
 State 6 - CID5 frame.
 
void(* state_load_cid04 )(can_statemachine_info_t *can_statemachine_info)
 State 7 - CID4 frame + start 200 ms timer.
 
void(* state_wait_200ms )(can_statemachine_info_t *can_statemachine_info)
 State 8 - wait for timerticks > 2 (at least 300 ms; spec requires >= 200 ms).
 
void(* state_load_rid )(can_statemachine_info_t *can_statemachine_info)
 State 9 - RID frame.
 
void(* state_load_amd )(can_statemachine_info_t *can_statemachine_info)
 State 10 - AMD frame, mark permitted.
 

Detailed Description

Dependency-injection interface for the CAN login state machine.

Each field is a function pointer to one of the 10 state handlers. All pointers are REQUIRED (must not be NULL). Typical implementations are the CanLoginMessageHandler_state_* functions.

See also
CanLoginStateMachine_initialize
can_login_message_handler.h

Field Documentation

◆ state_init

void(* state_init) (can_statemachine_info_t *can_statemachine_info)

State 1 - init seed.

◆ state_generate_seed

void(* state_generate_seed) (can_statemachine_info_t *can_statemachine_info)

State 2 - LFSR new seed (conflict retry only).

◆ state_generate_alias

void(* state_generate_alias) (can_statemachine_info_t *can_statemachine_info)

State 3 - derive 12-bit alias.

◆ state_load_cid07

void(* state_load_cid07) (can_statemachine_info_t *can_statemachine_info)

State 4 - CID7 frame.

◆ state_load_cid06

void(* state_load_cid06) (can_statemachine_info_t *can_statemachine_info)

State 5 - CID6 frame.

◆ state_load_cid05

void(* state_load_cid05) (can_statemachine_info_t *can_statemachine_info)

State 6 - CID5 frame.

◆ state_load_cid04

void(* state_load_cid04) (can_statemachine_info_t *can_statemachine_info)

State 7 - CID4 frame + start 200 ms timer.

◆ state_wait_200ms

void(* state_wait_200ms) (can_statemachine_info_t *can_statemachine_info)

State 8 - wait for timerticks > 2 (at least 300 ms; spec requires >= 200 ms).

◆ state_load_rid

void(* state_load_rid) (can_statemachine_info_t *can_statemachine_info)

State 9 - RID frame.

◆ state_load_amd

void(* state_load_amd) (can_statemachine_info_t *can_statemachine_info)

State 10 - AMD frame, mark permitted.


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

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