11#include "rte/oal/memory/rte_mem_util.h"
87 if (v_train_kmh != 0U)
123 rte_mem_set(out, 0,
sizeof(*out));
127 out->
payload.msg_28.t_train_ref = t_train_request;
128 header = &out->
payload.msg_28.header;
133 out->
payload.msg_27.t_train_ref = t_train_request;
134 header = &out->
payload.msg_27.header;
137 header->
t_train = t_train_reply;
153 default:
return "UNKNOWN";
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,...
Synchronous, statically-wired event dispatch for GP's per-entity procedure state machines (state_mach...
#define RBC_MSG_TRACK_TO_TRAIN_SH_REFUSED
#define RBC_MSG_TRACK_TO_TRAIN_SH_AUTHORISED
@ AB_GP_SESSION_EVENT_SHUNTING_AUTHORIZED
@ AB_GP_SESSION_EVENT_SHUNTING_DEAUTHORIZED
bool ab_gp_logic_shunting_allowed(uint8_t train_id)
Asks every registered shunting validator about train_id.
A/B's own RBC decision logic - today's slice: connect a train's currently-reported route to that trai...
const char * ab_gp_proc_shunting_decision_name(ab_gp_shunting_decision_t decision)
bool ab_gp_proc_shunting_build_reply(ab_gp_shunting_decision_t decision, rbc_timestamp_ms_t t_train_reply, rbc_timestamp_ms_t t_train_request, rbc_nid_lrbg_t nid_lrbg, rbc_train_outbound_msg_t *out)
Builds the answer to a Msg 130: Msg 28 SH Authorised or Msg 27 SH Refused.
ab_gp_shunting_decision_t ab_gp_proc_shunting_handle_request(ab_gp_ertms_train_context_t *ctx, uint8_t train_id, uint32_t v_train_kmh)
Decides one Msg 130 Request for Shunting and applies the outcome.
bool ab_gp_proc_shunting_request(ab_gp_ertms_train_context_t *ctx)
Handles inbound Shunting Request (Msg 130).
bool ab_gp_proc_shunting_authorize(ab_gp_ertms_train_context_t *ctx, bool authorized)
Authorizes or rejects shunting mode for the train.
ERTMS Subset-026 5.6 Shunting initiated by driver (Level 2).
ab_gp_shunting_decision_t
@ AB_GP_SHUNTING_REFUSED_SESSION_STATE
@ AB_GP_SHUNTING_REFUSED_INVALID
@ AB_GP_SHUNTING_AUTHORISED
@ AB_GP_SHUNTING_REFUSED_NO_SESSION
@ AB_GP_SHUNTING_REFUSED_NOT_AT_STANDSTILL
@ AB_GP_SHUNTING_REFUSED_BY_GA
bool ab_gp_session_fsm_can_handle(ab_gp_ertms_session_state_t from, ab_gp_session_event_t event, ab_gp_ertms_session_state_t *out_to)
Read-only lookup, no side effect: what event does from a given state produce, if anything.
Event-driven legal-transition table for ab_gp_ertms_session_state_t (Subset-026 Chapter 5's various p...
uint64_t rbc_timestamp_ms_t
Timestamp in milliseconds (POSIX or ETCS T_TRAIN / T_RBC scale).
@ AB_GP_ERTMS_SESSION_SHUNTING
@ AB_GP_ERTMS_SESSION_INITIATED
@ AB_GP_ERTMS_SESSION_IDLE
Complete ERTMS state and procedure context for one train slot.
ab_gp_ertms_session_state_t session_state
Last Relevant Balise Group (Country + BG identifier).
union rbc_train_outbound_msg_t::@072257326371153356142277360163235337000010176256 payload