|
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_dispatch.h. Holds the one subscription table. More...
#include "ab_gp_dispatch.h"#include "session/ab_gp_session_fsm.h"#include "train_data/ab_gp_train_data_fsm.h"#include "ma/ab_gp_ma_fsm.h"#include "shunting/ab_gp_shunting_fsm.h"#include "emergency_stop/ab_gp_emergency_stop_fsm.h"#include "position/ab_gp_position_fsm.h"#include "eom/ab_gp_eom_fsm.h"#include "handover/ab_gp_handover_fsm.h"#include "tsr/ab_gp_tsr_fsm.h"#include "text_message/ab_gp_text_message_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_subscriptions |
| The (event -> FSM handler) subscription table: the single place that says which state machine(s) react to a given event. One row per (event, subscriber) pair; an event with two subscribers has two rows (see AB_GP_SESSION_EVENT_TRAIN_DATA_VALIDATED below). Rows are visited top to bottom, so ordering here is the handler call order for a multi-subscriber event - keep the more "primary" FSM first (session before the procedure-specific one) so ab_gp_dispatch()'s aggregate bool still tracks the session FSM's own result where a caller relies on that. More... | |
Macros | |
| #define | AB_GP_DISPATCH_SUBSCRIPTION_COUNT (sizeof(s_subscriptions) / sizeof(s_subscriptions[0])) |
Functions | |
| static void | log_dispatch (const ab_gp_ertms_train_context_t *ctx, ab_gp_event_t event, uint32_t reached, uint32_t changed) |
| bool | ab_gp_dispatch (ab_gp_ertms_train_context_t *ctx, ab_gp_event_t event) |
Raises event to every state machine subscribed to it, in subscription-table order, synchronously. | |
Variables | |
| static const struct | s_subscriptions [] |
See ab_gp_dispatch.h. Holds the one subscription table.
Definition in file ab_gp_dispatch.c.
| #define AB_GP_DISPATCH_SUBSCRIPTION_COUNT (sizeof(s_subscriptions) / sizeof(s_subscriptions[0])) |
Definition at line 106 of file ab_gp_dispatch.c.
|
static |
Debug-level line per dispatch: which event, how many subscribers it reached, and how many of those reported a state change. Built with rte_string's bounded API (ADR-006), same posture as ab_gp_session_fsm.c's own log_event(); a formatting failure silently skips the line rather than emit a truncated one.
Definition at line 114 of file ab_gp_dispatch.c.
| bool ab_gp_dispatch | ( | ab_gp_ertms_train_context_t * | ctx, |
| ab_gp_event_t | event ) |
Raises event to every state machine subscribed to it, in subscription-table order, synchronously.
| [in,out] | ctx | Train context. A NULL ctx dispatches to nothing and returns false. |
| [in] | event | Event to raise. An out-of-range value dispatches to nothing and returns false. |
Definition at line 140 of file ab_gp_dispatch.c.
| const struct [struct].s_subscriptions s_subscriptions[] |