|
SafeAPI RBC 2oo2 Generic Application
IL/CTC route and train logic for the safeAPIRBC2oo2 reference RBC
|
See ab_ga_route_fsm.h. More...
#include "ab_ga_route_fsm.h"#include "safeapi/oal/log/sapi_log.h"#include "safeapi/utils/string/sapi_string.h"Go to the source code of this file.
Functions | |
| static ab_ga_route_state_t | status_to_state (rbc_il_route_status_t status) |
| static bool | state_is_stub (ab_ga_route_state_t s) |
| 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, for tests and for ab_ga_route_fsm_step() itself. | |
| static const char * | state_name (ab_ga_route_state_t s) |
| static void | log_step (uint32_t cycle, const char *role_tag, uint16_t route_id, const ab_ga_route_fsm_result_t *r) |
| 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(), computes the target (ab_ga_route_fsm_eval), logs the transition at INFO (STUB targets logged as "not implemented yet"), and writes the target back via ab_gp_db_route_set_fsm_state(). | |
See ab_ga_route_fsm.h.
Definition in file ab_ga_route_fsm.c.
| 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, for tests and for ab_ga_route_fsm_step() itself.
Definition at line 30 of file ab_ga_route_fsm.c.
| 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(), computes the target (ab_ga_route_fsm_eval), logs the transition at INFO (STUB targets logged as "not implemented yet"), and writes the target back via ab_gp_db_route_set_fsm_state().
| [in] | db | GP route DB handle (ga_interface.h). |
| [in] | route_id | Route the command concerns (must already be tracked). |
| [in] | cmd | Decoded, already-validated IL route command. |
| [in] | cycle | Cyclic-executive count, for the log line. |
| [in] | role_tag | Role string for the log line. |
Definition at line 123 of file ab_ga_route_fsm.c.
|
static |
Definition at line 81 of file ab_ga_route_fsm.c.
|
static |
Definition at line 25 of file ab_ga_route_fsm.c.
|
static |
Definition at line 66 of file ab_ga_route_fsm.c.
|
static |
Definition at line 11 of file ab_ga_route_fsm.c.