RTE RBC 2oo2 Reference Application 0.1.0 build 0006685
SIL 4 2oo2 Dual-Site Fault-Tolerant ERTMS Radio Block Centre Reference Architecture
Loading...
Searching...
No Matches
ab_gp_fsm_stub.h File Reference

Shared "this per-entity FSM is a placeholder" handler. More...

#include <stdbool.h>
#include "ab_gp_event.h"
#include "../ertms_procedures/ab_gp_ertms_types.h"
Include dependency graph for ab_gp_fsm_stub.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool ab_gp_fsm_stub_log (const char *fsm_tag, const char *impl_note, const ab_gp_ertms_train_context_t *ctx, ab_gp_event_t event)
 Logs (INFO) that a not-yet-implemented per-entity FSM received an event, and returns false (nothing changed).

Detailed Description

Shared "this per-entity FSM is a placeholder" handler.

Every GP procedure now dispatches its events through ab_gp_dispatch() (ab_gp_dispatch.h) and has a subscriber FSM folder under state_machines/. Only session/ and train_data/ carry a real (state, event) -> state table so far; ma/, shunting/, emergency_stop/, position/, eom/, handover/, tsr/, text_message/ are STUBS - their handler just logs, at INFO, that the FSM form is not built yet and returns false (no state change, no functional impact). The relevant behaviour still runs where it already did (the ab_gp_proc_*.c file and/or the session FSM named in each stub's impl_note).

The point (per direct request): the dispatch wiring is COMPLETE now - every train message raises a semantic event that fans out to its subscriber(s) - so turning a stub into a real FSM later is purely additive (add the state enum + table + context field, following train_data/ as the template; drop the ab_gp_fsm_stub_log() call). No ertms_procedures/ or dispatch-table change needed at that point.

Definition in file ab_gp_fsm_stub.h.

Function Documentation

◆ ab_gp_fsm_stub_log()

bool ab_gp_fsm_stub_log ( const char * fsm_tag,
const char * impl_note,
const ab_gp_ertms_train_context_t * ctx,
ab_gp_event_t event )

Logs (INFO) that a not-yet-implemented per-entity FSM received an event, and returns false (nothing changed).

Parameters
[in]fsm_tagShort FSM name for the log line, e.g. "MA".
[in]impl_noteWhere the real behaviour currently lives, e.g. "logic in ab_gp_proc_ma.c + session FSM".
[in]ctxTrain context (for train_id in the log line). NULL tolerated - just omits the id.
[in]eventEvent that was dispatched.
Returns
Always false - a stub never reports a state change.

Definition at line 11 of file ab_gp_fsm_stub.c.