|
Icarus
Vehicle Simulation as a Transformable Computational Graph, built on Vulcan and Janus
|
Manages flight phase transitions. More...
#include <PhaseManager.hpp>
Public Member Functions | |
| PhaseManager ()=default | |
| void | Configure (const PhaseConfig &config) |
| Configure phase manager with phase definitions and transitions. | |
| void | EvaluateTransitions (const SignalRegistry< Scalar > ®istry) |
| Evaluate transition conditions and potentially change phase. | |
| int32_t | CurrentPhase () const |
| Get current phase value. | |
| std::string | CurrentPhaseName () const |
| Get current phase name. | |
| int32_t | PreviousPhase () const |
| Get previous phase value (before last EvaluateTransitions). | |
| bool | PhaseChangedThisStep () const |
| Check if phase changed in last EvaluateTransitions call. | |
| bool | IsConfigured () const |
| Check if phase manager is configured. | |
| std::string | GetPhaseSignalPath () const |
| Get phase signal path for this entity. | |
| const PhaseConfig & | GetConfig () const |
| Get the phase configuration. | |
| void | Reset () |
| Reset to initial phase. | |
| void | SetPhase (const std::string &phase_name) |
| Force set phase (for testing or initialization). | |
| void | SetPhaseValue (int32_t value) |
| Force set phase by value (for testing or initialization). | |
Manages flight phase transitions.
The PhaseManager tracks the current phase and evaluates transition conditions after each simulation step. It follows no-cascade semantics: at most one transition fires per step.
Example usage:
|
default |
|
inline |
Configure phase manager with phase definitions and transitions.
| config | Phase configuration |
| ConfigError | if initial phase not found or transitions invalid |
|
inlinenodiscard |
Get current phase value.
|
inlinenodiscard |
Get current phase name.
|
inline |
Evaluate transition conditions and potentially change phase.
Called after each Step(). Evaluates all applicable transitions in order and fires the first one whose condition is true. No-cascade: at most one transition per call.
| registry | Signal registry for condition evaluation |
|
inlinenodiscard |
Get the phase configuration.
|
inlinenodiscard |
Get phase signal path for this entity.
|
inlinenodiscard |
Check if phase manager is configured.
|
inlinenodiscard |
Check if phase changed in last EvaluateTransitions call.
|
inlinenodiscard |
Get previous phase value (before last EvaluateTransitions).
|
inline |
Reset to initial phase.
|
inline |
Force set phase (for testing or initialization).
| phase_name | Phase name to set |
| ConfigError | if phase name not found |
|
inline |
Force set phase by value (for testing or initialization).