RTE RBC 2oo2 Reference Application
0.1.0 build 0006685
SIL 4 2oo2 Dual-Site Fault-Tolerant ERTMS Radio Block Centre Reference Architecture
Toggle main menu visibility
Loading...
Searching...
No Matches
execute.c
Go to the documentation of this file.
1
9
10
#include "
ab_gp_channel_cycle_hooks.h
"
11
12
#include "rte/oal/timer/rte_timer.h"
13
14
#include "
../com/ab_gp_channel_types.h
"
15
#include "
../com/ab_gp_channel_crosscompare.h
"
16
#include "
../ma_logic/ab_gp_logic.h
"
17
#include "
../ertms_procedures/ab_gp_ertms_engine.h
"
18
19
rte_status_t
ab_gp_channel_execute
(
void
*context)
20
{
21
ab_gp_channel_context_t
*ctx = (
ab_gp_channel_context_t
*)context;
22
rte_timestamp_ms_t now_ms = 0U;
23
24
if
(ctx == NULL)
25
{
26
return
RTE_STATUS_INVALID_PARAM;
27
}
28
29
(void)rte_timer_now(&now_ms);
30
ab_gp_ertms_engine_step
(&ctx->
db
, ctx->
cyc_cycle
, (uint32_t)now_ms, ctx->
config
.
timers
.
cycle_period_ms
);
31
ab_gp_logic_connect_routes_and_trains
(&ctx->
db
);
32
return
ab_gp_channel_crosscompare_execute
(ctx);
33
}
34
ab_gp_channel_crosscompare_execute
rte_status_t ab_gp_channel_crosscompare_execute(ab_gp_channel_context_t *ctx)
Runs one cycle's cross-compare decision - see this file's own header. This is ab_gp_channel....
Definition
ab_gp_channel_crosscompare.c:420
ab_gp_channel_crosscompare.h
The actual A-vs-B cross-compare decision: does this cycle's own M24/M15 answer match what the peer in...
ab_gp_channel_cycle_hooks.h
Shared declarations for the four rte_appmanager_operations_t cyclic-executive hooks this component's ...
ab_gp_channel_execute
rte_status_t ab_gp_channel_execute(void *context)
Definition
execute.c:19
ab_gp_channel_types.h
Modular type definitions for AB channel components (Com, Train, DB, Redundancy).
ab_gp_ertms_engine_step
void ab_gp_ertms_engine_step(ab_gp_db_t *db, uint32_t cycle, uint32_t timestamp_ms, uint32_t elapsed_ms)
Executes one cyclic evaluation of all active ERTMS train procedures.
Definition
ab_gp_ertms_engine.c:37
ab_gp_ertms_engine.h
Unified ERTMS Subset-026 Chapter 5 Operational Procedure Orchestrator.
ab_gp_logic_connect_routes_and_trains
void ab_gp_logic_connect_routes_and_trains(ab_gp_db_t *db)
THE cyclic sweep: calls ab_gp_logic_connect_route_for_train() for every currently-connected train (ab...
Definition
ab_gp_logic.c:219
ab_gp_logic.h
A/B's own RBC decision logic - today's slice: connect a train's currently-reported route to that trai...
ab_gp_channel_context_t
Central application context owned by composition root (main.c).
Definition
ab_gp_channel_types.h:155
ab_gp_channel_context_t::config
ab_gp_config_t config
Definition
ab_gp_channel_types.h:180
ab_gp_channel_context_t::db
ab_gp_db_t db
Definition
ab_gp_channel_types.h:268
ab_gp_channel_context_t::cyc_cycle
uint32_t cyc_cycle
Definition
ab_gp_channel_types.h:286
ab_gp_config_t::timers
ab_gp_config_timers_t timers
Definition
ab_gp_config.h:55
ab_gp_config_timers_t::cycle_period_ms
uint32_t cycle_period_ms
Definition
ab_gp_config.h:37
src
application
AB
GP
main
execute.c
Generated by
1.18.0