SafeAPI RBC 2oo2 Generic Application
IL/CTC route and train logic for the safeAPIRBC2oo2 reference RBC
Loading...
Searching...
No Matches
ab_ga_route_fsm.h
Go to the documentation of this file.
1
20
21#ifndef AB_GA_ROUTE_FSM_H
22#define AB_GA_ROUTE_FSM_H
23
24#include <stdbool.h>
25#include <stdint.h>
26
27#include "ab_ga_il_wire.h" /* ab_ga_il_route_cmd_t */
28#include "ga_interface.h" /* ab_gp_db_t + ab_gp_db_route_get/set_fsm_state() */
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
48
59
66 const ab_ga_il_route_cmd_t *cmd);
67
81ab_ga_route_fsm_result_t ab_ga_route_fsm_step(ab_gp_db_t *db, uint16_t route_id,
82 const ab_ga_il_route_cmd_t *cmd,
83 uint32_t cycle, const char *role_tag);
84
85#ifdef __cplusplus
86}
87#endif
88
89#endif /* AB_GA_ROUTE_FSM_H */
Dedicated IL <-> RBC message payloads and codec (wire kinds RBC_MSG_IL_ROUTE_CMD / RBC_MSG_IL_STATUS ...
ab_ga_route_fsm_result_t ab_ga_route_fsm_step(ab_gp_db_t *db, uint16_t route_id, const ab_ga_il_route_cmd_t *cmd, uint32_t cycle, const char *role_tag)
Applies cmd to the route's FSM: reads the current state via ab_gp_db_route_get_fsm_state(),...
ab_ga_route_fsm_result_t ab_ga_route_fsm_eval(ab_ga_route_state_t from, const ab_ga_il_route_cmd_t *cmd)
Computes the target state for (from, cmd), WITHOUT logging or touching any storage - pure,...
ab_ga_route_state_t
Per-route lifecycle state. Stored raw (uint32_t) on GP's route DB record - keep these values stable.
@ AB_GA_ROUTE_STATE_LOCKED
@ AB_GA_ROUTE_STATE_DEGRADED
@ AB_GA_ROUTE_STATE_NO_ROUTE
@ AB_GA_ROUTE_STATE_OS
@ AB_GA_ROUTE_STATE_SH
@ AB_GA_ROUTE_STATE_USED
@ AB_GA_ROUTE_STATE_FS
Decoded RBC_MSG_IL_ROUTE_CMD payload.
Result of applying one IL route command to a route's FSM.
ab_ga_route_state_t to
ab_ga_route_state_t from