|
OpenLcbCLib 1.0 Alpha
OpenSource C Library to create OpenLcb/Lcc Nodes
|
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. | |
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.
| 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.
Copyright (c) 2026 Jim Kueneman all rights reserved. See the License