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.c
Go to the documentation of this file.
1
5
6#include "ab_gp_fsm_stub.h"
7
8#include "rte/oal/log/rte_log.h"
9#include "rte/utils/string/rte_string.h"
10
11bool ab_gp_fsm_stub_log(const char *fsm_tag, const char *impl_note,
13{
14 char storage[160];
15 rte_string_t line;
16 const char *out_cstr = NULL;
17
18 if (rte_string_init(&line, storage, sizeof(storage)) != RTE_STATUS_OK)
19 {
20 return false;
21 }
22 (void)rte_string_copy(&line, "train=");
23 (void)rte_string_append_u32(&line, (ctx != NULL) ? (uint32_t)ctx->train_id : 0U);
24 (void)rte_string_concat(&line, " event=");
25 (void)rte_string_append_u32(&line, (uint32_t)event);
26 (void)rte_string_concat(&line, " ");
27 (void)rte_string_concat(&line, (fsm_tag != NULL) ? fsm_tag : "?");
28 (void)rte_string_concat(&line, " state machine not implemented yet (");
29 (void)rte_string_concat(&line, (impl_note != NULL) ? impl_note : "");
30 (void)rte_string_concat(&line, ")");
31
32 if (rte_string_c_str(&line, &out_cstr) == RTE_STATUS_OK)
33 {
34 rte_log_write(RTE_LOG_LEVEL_INFO, "GP_FSM_STUB", out_cstr);
35 }
36 return false;
37}
ab_gp_event_t
Every event any GP procedure state machine reacts to. One per distinct real trigger in ertms_procedur...
Definition ab_gp_event.h:53
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 c...
Shared "this per-entity FSM is a placeholder" handler.
Complete ERTMS state and procedure context for one train slot.