|
RTE RBC 2oo2 Reference Application 0.1.0 build 0006685
SIL 4 2oo2 Dual-Site Fault-Tolerant ERTMS Radio Block Centre Reference Architecture
|
Synchronous, statically-wired event dispatch for GP's per-entity procedure state machines (state_machines/). More...
Go to the source code of this file.
Typedefs | |
| typedef bool(*) | ab_gp_fsm_handler_fn(ab_gp_ertms_train_context_t *ctx, ab_gp_event_t event) |
| One FSM's event entry point. Every per-entity FSM under state_machines/ exposes exactly this signature so it can appear in the dispatcher's subscription table. | |
Functions | |
| 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. | |
Synchronous, statically-wired event dispatch for GP's per-entity procedure state machines (state_machines/).
A procedure in ertms_procedures/ raises an ab_gp_event_t (ab_gp_event.h) by calling ab_gp_dispatch() - it does NOT call any one FSM by name. The dispatcher walks a single compile-time subscription table (s_subscriptions[] in ab_gp_dispatch.c) and invokes, in table order, every FSM handler subscribed to that event, each run-to-completion.
Deliberately NOT an HSM / event queue / runtime pub-sub:
Definition in file ab_gp_dispatch.h.
| typedef bool(*) ab_gp_fsm_handler_fn(ab_gp_ertms_train_context_t *ctx, ab_gp_event_t event) |
One FSM's event entry point. Every per-entity FSM under state_machines/ exposes exactly this signature so it can appear in the dispatcher's subscription table.
| [in,out] | ctx | Train context this FSM reads/updates its own field of (ctx->session_state, ctx->train_data.state, ...). |
| [in] | event | Event being dispatched. |
Definition at line 52 of file ab_gp_dispatch.h.
| 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.