|
ADS-IDAC Engine 5.0.0
|
Process-local masters of immutable configuration (state overlay). More...
Go to the source code of this file.
Namespaces | |
| namespace | adsidac |
Functions | |
| const Procedures * | adsidac::shared_procedures () |
| void | adsidac::set_shared_procedures (const Procedures *master) |
| const ControlPanel * | adsidac::shared_control_panel () |
| void | adsidac::set_shared_control_panel (const ControlPanel *master) |
| const KB * | adsidac::shared_kb (int operator_type) |
| void | adsidac::set_shared_kb (int operator_type, const KB *master) |
| const EventSymptomMatrix * | adsidac::shared_diagnosis_matrix (int operator_type) |
| void | adsidac::set_shared_diagnosis_matrix (int operator_type, const EventSymptomMatrix *master) |
Process-local masters of immutable configuration (state overlay).
Snapshot classes serialize state-only (their config members are absent from the archive); a deserialized snapshot is reconstructed by copying the registered master FIRST and then applying the state stream over it. Masters are registered once at startup, right after the input files are loaded. Every rank registers its own, and the configuration fingerprint guarantees all ranks (and any resumed run) loaded identical files.
Accessors are null until registration: unit tests serialize these classes standalone, and a null master simply means "no pre-seed". Round-trips remain byte-exact, with config members default-valued.
The masters are stored as non-owning pointers and must outlive every deserialization. The setters are not synchronized; register before any other thread deserializes. For the KB and diagnosis-matrix accessors, sim::Operator::ODM selects the decision maker's master and any other value selects the action taker's.
Free functions (not SimulationContext members) on purpose: class headers call these from serialize() load paths, and SimulationContext.h includes those same class headers, so a member would create an include cycle.
Definition in file SharedConfig.h.