SafeAPI RBC 2oo2 Generic Application
IL/CTC route and train logic for the safeAPIRBC2oo2 reference RBC
Loading...
Searching...
No Matches
ab_ga_ma_logic_adaptation.h File Reference

GA's own single entry point, IMPLEMENTED here - ab_ga_ma_adaptation_init() is DECLARED in AB/GP/ga_interface/ga_interface.h instead (later session, on direct request: every function GP calls into GA with by bare name is declared in GP's own facade header, not GA's - see that header's own "functions GP calls into GA with" section), so this header does not redeclare it - #include "ga_interface.h" below already brings the declaration in, and this .c file's own definition is checked against that one declaration. More...

#include "safeapi/utils/status/sapi_status.h"
#include "site_config.h"
#include "ga_interface.h"
Include dependency graph for ab_ga_ma_logic_adaptation.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Detailed Description

GA's own single entry point, IMPLEMENTED here - ab_ga_ma_adaptation_init() is DECLARED in AB/GP/ga_interface/ga_interface.h instead (later session, on direct request: every function GP calls into GA with by bare name is declared in GP's own facade header, not GA's - see that header's own "functions GP calls into GA with" section), so this header does not redeclare it - #include "ga_interface.h" below already brings the declaration in, and this .c file's own definition is checked against that one declaration.

Registers this module's own route-connection validator with GP (ga_interface.h's own ab_gp_ga_register_init()) - approves a proposed route<->train connection if and only if the route is a real entry in this site's own static layout (AB/il/ab_ga_il.h's own ab_ga_il_site_has_route()), adding it to GP's own tracked route table on first approval (ab_ga_il_route_add()) - then calls AB/main/ab_ga_dispatch.c's own ab_ga_dispatch_init(), which registers every other thing GA calls GP with/GP calls GA with (route/ train context notify, the IL envelope handler, the IL/CTC output producers - see ga_interface.h's own doc for each). Setup-phase only (sapi_lifecycle_check_setup_allowed(), via every registration call above) - called once from AB/GP/com/ab_gp_channel.c's own ab_gp_channel_ga_setup(), before the setup phase locks.

Depends on AB/il/ab_ga_il.h (ab_ga_il_site_has_route()/ _route_add(), meant for exactly this kind of caller) and AB/GP/ga_interface/ga_interface.h (the validator registration call itself, ab_ga_ma_adaptation_init()'s own declaration, and the opaque ab_gp_db_t/ab_gp_train_session_t this module threads through without ever dereferencing them itself) - never any other GP header directly, same "GA shall not have any idea about GP's own internal module split" contract every GA module keeps.

Definition in file ab_ga_ma_logic_adaptation.h.