8#include "ga_interface.h"
19 ab_gp_train_session_t *sessions;
27 ab_gp_route_update_type_t update_type);
29 ab_gp_train_update_type_t update_type);
31 ab_gp_il_pending_output_t out[AB_GP_IL_MAX_PENDING_OUTPUTS]);
33 ab_gp_ctc_pending_output_t out[AB_GP_CTC_MAX_PENDING_OUTPUTS]);
40 g_channel_ctx.sessions = sessions;
41 g_channel_ctx.db = db;
44 if (status != SAPI_STATUS_OK)
49 if (status != SAPI_STATUS_OK)
59 if (status != SAPI_STATUS_OK)
64 if (status != SAPI_STATUS_OK)
84 ab_gp_route_update_type_t update_type)
96 ab_gp_train_update_type_t update_type)
106 ab_gp_il_pending_output_t out[AB_GP_IL_MAX_PENDING_OUTPUTS])
117 ab_gp_ctc_pending_output_t out[AB_GP_CTC_MAX_PENDING_OUTPUTS])
uint8_t ab_ga_ctc_build_outputs(ab_gp_train_session_t *sessions, ab_gp_db_t *db, ab_gp_ctc_pending_output_t out[AB_GP_CTC_MAX_PENDING_OUTPUTS])
Decides which trains need a CTC indication THIS cycle and builds all of them - see this file's own mo...
void ab_ga_ctc_on_train_context_changed(const ab_gp_train_context_t *ctx, ab_gp_train_update_type_t update_type)
GA's dispatch module fans every train-context change here - stores the received snapshot and marks th...
void ab_ga_ctc_on_route_context_changed(const ab_gp_route_context_t *ctx, ab_gp_route_update_type_t update_type)
GA's single dispatch module (safeAPIRBC2oo2GA/src/AB/main/ ab_ga_dispatch.c) is the ONLY thing that r...
A/B's own outbound messages to CtcRBCSim. Two layers, same split as AB/GP/train/ab_gp_train....
static void on_route_context_changed(const void *context, const ab_gp_route_context_t *ctx, ab_gp_route_update_type_t update_type)
static uint8_t ctc_output_producer_trampoline(const void *context, ab_gp_ctc_pending_output_t out[AB_GP_CTC_MAX_PENDING_OUTPUTS])
static void on_train_context_changed(const void *context, const ab_gp_train_context_t *ctx, ab_gp_train_update_type_t update_type)
sapi_status_t ab_ga_dispatch_init(ab_gp_train_session_t *sessions, ab_gp_db_t *db)
Registers every GA<->GP subscription this process needs, in one place: route-context notify,...
static uint8_t il_output_producer_trampoline(const void *context, ab_gp_il_pending_output_t out[AB_GP_IL_MAX_PENDING_OUTPUTS])
GA's single GP-notification subscriber AND registration point for everything GP calls into GA with - ...
void ab_ga_il_on_route_context_changed(ab_gp_train_session_t *sessions, ab_gp_db_t *db, const ab_gp_route_context_t *ctx, ab_gp_route_update_type_t update_type)
GA's single dispatch module (ab_ga_dispatch.c) fans every route change here for AB_ROUTE_CONNECTED/AB...
bool ab_ga_il_apply_envelope(const void *context, ab_gp_train_session_t *sessions, ab_gp_db_t *db, const uint8_t env_bytes[RBC_ENVELOPE_WIRE_SIZE], uint32_t cycle, sapi_example_site_t site, const char *role_tag)
THE handler this module registers with GP (ab_gp_register_il_envelope_handler(), ga_interface....
uint8_t ab_ga_il_build_outputs(ab_gp_il_pending_output_t out[AB_GP_IL_MAX_PENDING_OUTPUTS])
Drains this module's own TrainPositionInRoute event queue (populated by this module's own route-conne...
A/B's own route handling against GP's own runtime table (via AB/GP/ga_interface/ga_interface....