|
RTE RBC 2oo2 Reference Application 0.1.0 build 0006685
SIL 4 2oo2 Dual-Site Fault-Tolerant ERTMS Radio Block Centre Reference Architecture
|
See ab_gp_train_data_fsm.h for this table's design rationale. More...
#include "ab_gp_train_data_fsm.h"#include "rte/oal/log/rte_log.h"#include "rte/utils/string/rte_string.h"Go to the source code of this file.
Data Structures | |
| struct | [struct].s_transitions |
| The full transition set as { from, event, to } triples - every (state, event) pair NOT listed here has no outcome (the event does nothing from that state; not an error). More... | |
Macros | |
| #define | AB_GP_TRAIN_DATA_FSM_TRANSITION_COUNT (sizeof(s_transitions) / sizeof(s_transitions[0])) |
Functions | |
| bool | ab_gp_train_data_fsm_can_handle (ab_gp_train_data_state_t from, ab_gp_event_t event, ab_gp_train_data_state_t *out_to) |
| Read-only lookup, no side effect. | |
| static const char * | state_name (ab_gp_train_data_state_t state) |
| static void | log_event (const ab_gp_ertms_train_context_t *ctx, ab_gp_event_t event, bool handled, ab_gp_train_data_state_t to) |
| bool | ab_gp_train_data_fsm_handle_event (ab_gp_ertms_train_context_t *ctx, ab_gp_event_t event) |
Applies event to ctx->train_data.state, and keeps ctx->train_data.valid in sync (true iff the new state is AB_GP_TRAIN_DATA_VALIDATED). | |
Variables | |
| static const struct | s_transitions [] |
See ab_gp_train_data_fsm.h for this table's design rationale.
Definition in file ab_gp_train_data_fsm.c.
| #define AB_GP_TRAIN_DATA_FSM_TRANSITION_COUNT (sizeof(s_transitions) / sizeof(s_transitions[0])) |
Definition at line 49 of file ab_gp_train_data_fsm.c.
| bool ab_gp_train_data_fsm_can_handle | ( | ab_gp_train_data_state_t | from, |
| ab_gp_event_t | event, | ||
| ab_gp_train_data_state_t * | out_to ) |
Read-only lookup, no side effect.
| [in] | from | Current train-data state. |
| [in] | event | Event to evaluate. |
| [out] | out_to | Receives the resulting state on success; untouched otherwise. May be NULL. |
Definition at line 52 of file ab_gp_train_data_fsm.c.
|
static |
Short fixed names for the debug log line only.
Definition at line 72 of file ab_gp_train_data_fsm.c.
|
static |
Debug line for every handled/not-handled call - same posture as ab_gp_session_fsm.c's log_event().
Definition at line 86 of file ab_gp_train_data_fsm.c.
| bool ab_gp_train_data_fsm_handle_event | ( | ab_gp_ertms_train_context_t * | ctx, |
| ab_gp_event_t | event ) |
Applies event to ctx->train_data.state, and keeps ctx->train_data.valid in sync (true iff the new state is AB_GP_TRAIN_DATA_VALIDATED).
| [in,out] | ctx | Train context. NULL -> returns false, no change. |
| [in] | event | Event to apply. An event this FSM does not react to from the current state -> returns false, no change (not an error - it is simply not one of this FSM's). |
Definition at line 118 of file ab_gp_train_data_fsm.c.
| const struct [struct].s_transitions s_transitions[] |