Icarus
Vehicle Simulation as a Transformable Computational Graph, built on Vulcan and Janus
Loading...
Searching...
No Matches
icarus Namespace Reference

Namespaces

namespace  detail
namespace  LifecycleStrings
 Simulation phase names for logging banners.
namespace  io
namespace  signal
namespace  staging

Classes

struct  ForceContribution
 Force contribution from a single source. More...
class  Backplane
 Component-facing facade for signal registration and resolution. More...
struct  SignalDecl
 Signal declaration for introspection. More...
class  Component
 Base class for all simulation components. More...
struct  ComponentConfig
 Configuration container for components. More...
class  ComponentFactory
 Factory for creating components from configuration. More...
struct  Token
class  ConditionNode
class  ComparisonNode
 Comparison: signal <op> value or signal <op> signal. More...
class  AndNode
 Boolean AND. More...
class  OrNode
 Boolean OR. More...
class  NotNode
 Boolean NOT. More...
class  Tokenizer
class  CompiledCondition
 Compiled condition ready for evaluation. More...
class  ConditionParser
 Parser for condition expressions. More...
struct  RunConfig
 Run configuration for Stage phase. More...
struct  SimulationError
class  Error
 Base class for all Icarus exceptions. More...
class  SignalError
 Signal-related errors (registration, resolution, wiring). More...
class  ConfigError
 Configuration/parsing errors with optional file context. More...
class  LifecycleError
 Lifecycle ordering/state errors. More...
class  WiringError
 Wiring and signal routing errors. More...
class  IntegrationError
 Integration/ODE solver errors with time context. More...
class  StateError
 State vector management errors. More...
class  IOError
 File and I/O operation errors. More...
class  ConditionError
 Condition parsing and evaluation errors. More...
class  NotImplementedError
 Stub for unimplemented features. More...
class  ProvisionError
class  StageError
class  StepError
class  TypeMismatchError
class  DuplicateSignalError
class  SignalNotFoundError
class  UnwiredInputError
class  StateSizeMismatchError
class  StepSizeTooSmallError
class  PhysicalComponent
 Intermediate class for components with physical body attachment. More...
struct  ValidationIssue
 Single validation issue. More...
class  ValidationResult
 Structured validation result with errors and warnings. More...
struct  DataDictionary
 Complete catalog of simulation interface. More...
struct  IntrospectionEdge
 A single directed edge in the introspection graph. More...
struct  IntrospectionGraph
 Complete introspection graph: nodes (components) + typed edges. More...
class  Playback
 Simulation data playback interface. More...
class  Recorder
 Simulation data recorder interface. More...
class  ErrorHandler
 Central error handler integrating logging and exceptions. More...
class  ErrorScope
 RAII wrapper for try/catch with automatic error reporting. More...
class  HDF5Recorder
 HDF5 recorder for Icarus simulations. More...
struct  AnsiColor
 ANSI color codes. More...
struct  BoxChars
 Box-drawing characters (Unicode). More...
class  Console
 Console output with color and formatting support. More...
struct  LogConfig
 Logging configuration. More...
struct  LogContext
 Immutable log context - set by component/entity during execution. More...
struct  LogEntry
 A single log entry with full context. More...
class  LogContextManager
 Thread-local log context manager. More...
class  LogService
 Unified logging service for Icarus. More...
class  LogSinks
 Factory for common log sinks. More...
class  MissionLogger
 Mission Logger - Flight Recorder style logging. More...
class  AsciiTable
 ASCII table generator with box-drawing characters. More...
class  Banner
 ASCII art banners and headers. More...
class  FlightManifest
 Generate Flight Manifest (ASCII Data Dictionary). More...
struct  ComponentStats
 Component timing statistics. More...
class  MissionDebrief
 Mission Debrief generator. More...
class  SignalHandle
 Type-safe handle for accessing a signal value. More...
class  SignalRegistry
 Central registry for all simulation signals. More...
class  InputHandle
 Handle to an input signal port. More...
struct  TypeTraits
 Primary template for TypeTraits (generates compile error if not specialized). More...
struct  TypeTraits< double >
 TypeTraits specialization for double. More...
struct  TypeTraits< int32_t >
 TypeTraits specialization for int32_t. More...
struct  TypeTraits< int64_t >
 TypeTraits specialization for int64_t. More...
struct  TypeTraits< SymbolicScalar >
 TypeTraits specialization for SymbolicScalar (casadi::MX). More...
struct  SignalDescriptor
 Descriptor for a signal on the backplane. More...
struct  Vec3Handle
 Handle for accessing a Vec3 signal as three scalar components. More...
struct  QuatHandle
 Handle for accessing a quaternion signal as four scalar components. More...
struct  Mat3Handle
 Handle for accessing a Mat3 signal as nine scalar components. More...
class  IntegrationManager
 Manages integrator lifecycle and stepping. More...
struct  AdaptiveStepResult
 Result from adaptive step integrators. More...
class  Integrator
 Abstract interface for numerical integrators. More...
class  AdaptiveIntegrator
 Interface for adaptive step integrators. More...
class  IntegratorFactory
 Factory for creating integrators from configuration. More...
struct  IntegratorConfig
 Configuration for integrator creation. More...
class  RK45Integrator
 Adaptive Dormand-Prince RK4(5) integrator. More...
class  EulerIntegrator
 Forward Euler integrator (1st order). More...
class  RK2Integrator
 Heun's method / RK2 integrator (2nd order). More...
class  RK4Integrator
 Classic 4th-order Runge-Kutta integrator. More...
struct  PhaseTransition
 Configuration for a single phase transition. More...
struct  PhaseConfig
 Configuration for phase management. More...
class  PhaseManager
 Manages flight phase transitions. More...
class  Scheduler
 Group-based execution scheduler. More...
class  Simulator
 Top-level simulation coordinator. More...
struct  EpochConfig
 Time epoch configuration for absolute time support. More...
struct  TrimConfig
 Trim configuration for state initialization. More...
struct  LinearizationConfig
 Linearization configuration. More...
struct  SymbolicsConfig
 Symbolic generation configuration. More...
struct  StageConfig
 Staging configuration. More...
struct  GroupMember
 A component member within a scheduler group. More...
struct  SchedulerGroupConfig
 A scheduler group with its own rate and priority. More...
struct  TopologyConfig
 Cycle detection and handling configuration. More...
struct  SchedulerConfig
 Scheduler configuration with rate groups. More...
struct  OutputConfig
 Output/export configuration. More...
struct  RecordingConfig
 HDF5 recording configuration. More...
struct  EntityTemplate
 Entity template loaded from YAML. More...
struct  EntityInstance
 Entity instance (template + name + overrides). More...
struct  SwarmConfig
 Swarm configuration for bulk entity spawning. More...
struct  EntitySystemConfig
 Entity system configuration. More...
struct  SimulatorConfig
 Complete simulation configuration. More...
struct  StateBinding
 Binding to a single scalar state value and its derivative. More...
class  StateManager
 Manages state integration via signal discovery. More...
struct  CycleInfo
 Information about a detected cycle in the dependency graph. More...
struct  TopologyResult
 Result of topological analysis. More...
class  DependencyGraph
 Dependency graph for component execution ordering. More...
class  TopologyAnalyzer
 Utility class for building and analyzing component dependency graphs. More...

Concepts

concept  IcarusScalar
 Alias for Icarus-specific documentation.
concept  ComponentType
 Concept for types that can serve as Icarus components.
concept  ExtendedComponent
 Concept for components with optional extended hooks.

Typedefs

using RoutingError = WiringError
using ConfigurationError = ConfigError
using IntegratorError = IntegrationError
using ErrorCallback = std::function<ErrorPolicy(const SimulationError &)>
 Error handler callback signature.
using RecordingReader = vulcan::io::HDF5Reader
 HDF5 recording reader (re-export of Vulcan's HDF5Reader).
template<typename Scalar>
using ScalarInput = InputHandle<Scalar>
 Scalar input handle.
template<typename Scalar>
using Vec3Input = InputHandle<Vec3<Scalar>>
 Vec3 input handle.
template<typename Scalar>
using QuatInput = InputHandle<Vec4<Scalar>>
 Vec4/Quaternion input handle.
using SignalType = vulcan::io::SignalType
 Signal data type (re-exported from Vulcan for consistency).
using SignalLifecycle = vulcan::io::SignalLifecycle
 Signal lifecycle (re-exported from Vulcan for consistency).

Enumerations

enum class  Frame : uint8_t { BODY , WIND , LOCAL , INERTIAL }
 Reference frame for force/moment quantities. More...
enum class  SourceLifecycle : uint8_t { STATIC , DYNAMIC }
 Signal lifecycle for mass/force sources. More...
enum class  TokenType {
  Number , Identifier , Less , LessEqual ,
  Greater , GreaterEqual , Equal , NotEqual ,
  And , Or , Not , LeftParen ,
  RightParen , Eof
}
enum class  Lifecycle : uint8_t {
  Uninitialized , Provisioned , Staged , Running ,
  Paused , Completed , Error
}
 Simulation lifecycle phases. More...
enum class  Severity : uint8_t { INFO , WARNING , ERROR , FATAL }
enum class  SignalErrorKind {
  NotFound , Duplicate , TypeMismatch , Unwired ,
  NullPointer
}
 Signal-related error categories. More...
enum class  LifecyclePhase {
  Provision , Stage , Step , Reset ,
  Other
}
 Simulation lifecycle phases. More...
enum class  ValidationSeverity { Error , Warning , Info }
 Severity level for validation issues. More...
enum class  EdgeKind { Route , Resolve }
 Edge classification for the introspection graph. More...
enum class  ErrorPolicy { Continue , Pause , Abort , Crash }
 Error handling policy. More...
enum class  LogLevel {
  Trace , Debug , Info , Event ,
  Warning , Error , Fatal
}
 Log severity levels. More...
enum class  ExitStatus {
  Success , EndConditionMet , UserAbort , Error ,
  Divergence
}
 Exit status codes. More...
enum class  SignalKind { Output , Input , Parameter , Config }
 Classification of signal types in the component interface. More...
enum class  IntegratorType { Euler , RK2 , RK4 , RK45 }
 Available integrator methods. More...
enum class  SchedulingMode { Automatic , Explicit }
 Scheduling mode enumeration. More...

Functions

const char * FrameToString (Frame frame)
 Convert Frame enum to string for logging.
template<>
std::string ComponentConfig::Get< std::string > (const std::string &key, const std::string &def) const
template<>
std::string ComponentConfig::Require< std::string > (const std::string &key) const
template<>
bool ComponentConfig::Has< std::string > (const std::string &key) const
template<>
std::vector< double > ComponentConfig::Get< std::vector< double > > (const std::string &key, const std::vector< double > &def) const
template<>
std::vector< double > ComponentConfig::Require< std::vector< double > > (const std::string &key) const
template<>
bool ComponentConfig::Has< std::vector< double > > (const std::string &key) const
template<>
std::vector< std::string > ComponentConfig::Get< std::vector< std::string > > (const std::string &key, const std::vector< std::string > &def) const
template<>
std::vector< std::string > ComponentConfig::Require< std::vector< std::string > > (const std::string &key) const
template<>
bool ComponentConfig::Has< std::vector< std::string > > (const std::string &key) const
constexpr int VersionMajor ()
 Major version number.
constexpr int VersionMinor ()
 Minor version number.
constexpr int VersionPatch ()
 Patch version number.
constexpr const char * Version ()
 Version string (derived from components).
std::string MakeFullPath (const std::string &entity, const std::string &name)
 Build a full path from entity and name.
template<typename E>
void ThrowError (E &&error, double time=0.0, const std::string &component="")
 Helper to throw an error and optionally log it.
LogLevel SeverityToLogLevel (Severity severity)
 Convert error severity to log level.
void LogError (const Error &error, double time=0.0, const std::string &component="")
 Log an error to the global LogService.
template<typename E>
void ThrowAndLog (E &&error, double time=0.0, const std::string &component="")
 Throw an error after logging it.
LogServiceGetLogService ()
 Global log service singleton.
const char * to_string (SignalKind kind)
 Convert SignalKind to string.
std::string to_string (IntegratorType type)
 Convert integrator type to string.
IntegratorType parse_integrator_type (const std::string &name)
 Parse integrator type from string (case-insensitive).

Variables

constexpr bool kDebugMode = false
 Check if we're in debug mode at compile time.

Typedef Documentation

◆ ConfigurationError

◆ ErrorCallback

using icarus::ErrorCallback = std::function<ErrorPolicy(const SimulationError &)>

Error handler callback signature.

◆ IntegratorError

◆ QuatInput

template<typename Scalar>
using icarus::QuatInput = InputHandle<Vec4<Scalar>>

Vec4/Quaternion input handle.

◆ RecordingReader

using icarus::RecordingReader = vulcan::io::HDF5Reader

HDF5 recording reader (re-export of Vulcan's HDF5Reader).

Reads recordings created by Recorder. See vulcan::io::HDF5Reader for full API documentation.

Example:

RecordingReader reader("sim.h5");
auto times = reader.times();
auto positions = reader.read_vec3("Satellite.position");
std::cout << "Frames: " << reader.frame_count() << "\n";
vulcan::io::HDF5Reader RecordingReader
HDF5 recording reader (re-export of Vulcan's HDF5Reader).
Definition RecordingReader.hpp:31

◆ RoutingError

◆ ScalarInput

template<typename Scalar>
using icarus::ScalarInput = InputHandle<Scalar>

Scalar input handle.

◆ SignalLifecycle

using icarus::SignalLifecycle = vulcan::io::SignalLifecycle

Signal lifecycle (re-exported from Vulcan for consistency).

◆ SignalType

using icarus::SignalType = vulcan::io::SignalType

Signal data type (re-exported from Vulcan for consistency).

◆ Vec3Input

template<typename Scalar>
using icarus::Vec3Input = InputHandle<Vec3<Scalar>>

Vec3 input handle.

Enumeration Type Documentation

◆ EdgeKind

enum class icarus::EdgeKind
strong

Edge classification for the introspection graph.

Enumerator
Route 

Explicit SignalRouter connection (input_path <- output_path).

Resolve 

Implicit dependency via Backplane::resolve() (source binding).

◆ ErrorPolicy

enum class icarus::ErrorPolicy
strong

Error handling policy.

Enumerator
Continue 

Log and continue (for warnings).

Pause 

Pause simulation, allow resume.

Abort 

Clean shutdown with debrief.

Crash 

Immediate termination (for fatal errors).

◆ ExitStatus

enum class icarus::ExitStatus
strong

Exit status codes.

Enumerator
Success 

Normal completion.

EndConditionMet 

End condition triggered.

UserAbort 

User requested abort.

Error 

Error during simulation.

Divergence 

Numerical divergence.

◆ Frame

enum class icarus::Frame : uint8_t
strong

Reference frame for force/moment quantities.

Forces can be expressed in different reference frames. The aggregator must transform all forces to body frame before summing.

Enumerator
BODY 

Body-fixed frame (X=forward, Y=right, Z=down).

WIND 

Velocity-aligned frame (X=airspeed direction).

LOCAL 

Component-local frame (e.g., nozzle axis).

INERTIAL 

Inertial frame (ECI or ECEF).

◆ IntegratorType

enum class icarus::IntegratorType
strong

Available integrator methods.

Maps directly to Janus step functions.

Enumerator
Euler 

Forward Euler (1st order, 1 eval) - janus::euler_step.

RK2 

Heun's method (2nd order, 2 evals) - janus::rk2_step.

RK4 

Classic RK4 (4th order, 4 evals) - janus::rk4_step.

RK45 

Dormand-Prince adaptive (5th order, 7 evals) - janus::rk45_step.

◆ Lifecycle

enum class icarus::Lifecycle : uint8_t
strong

Simulation lifecycle phases.

Enumerator
Uninitialized 

Before Provision.

Provisioned 

After Provision, before Stage.

Staged 

After Stage, ready to run.

Running 

During Step loop.

Paused 

Temporarily halted.

Completed 

Simulation finished.

Error 

Error state.

◆ LifecyclePhase

enum class icarus::LifecyclePhase
strong

Simulation lifecycle phases.

Enumerator
Provision 
Stage 
Step 
Reset 
Other 

◆ LogLevel

enum class icarus::LogLevel
strong

Log severity levels.

Enumerator
Trace 

Most verbose, internal debugging.

Debug 

Debugging info.

Info 

Normal operation.

Event 

Simulation events (phase changes, etc.).

Warning 

Potential issues.

Error 

Recoverable errors.

Fatal 

Unrecoverable errors.

◆ SchedulingMode

enum class icarus::SchedulingMode
strong

Scheduling mode enumeration.

Enumerator
Automatic 

Topological sort from signal dependencies (Future TODO).

Explicit 

User-defined execution order.

◆ Severity

enum class icarus::Severity : uint8_t
strong
Enumerator
INFO 

Informational (logged, no action).

WARNING 

Warning (may trigger graceful degradation).

ERROR 

Error (simulation may continue with fallback).

FATAL 

Fatal (simulation must stop).

◆ SignalErrorKind

enum class icarus::SignalErrorKind
strong

Signal-related error categories.

Enumerator
NotFound 

Signal does not exist.

Duplicate 

Signal already registered.

TypeMismatch 

Type mismatch during resolution.

Unwired 

Input not wired to output.

NullPointer 

Null data pointer provided.

◆ SignalKind

enum class icarus::SignalKind
strong

Classification of signal types in the component interface.

Enumerator
Output 

Dynamic output signal (Scalar, Vec3, etc.).

Input 

Input port (wired to an output).

Parameter 

Scalar-typed parameter (optimizable).

Config 

Discrete config (int/bool/enum, not optimizable).

◆ SourceLifecycle

enum class icarus::SourceLifecycle : uint8_t
strong

Signal lifecycle for mass/force sources.

Used to distinguish static (constant) vs dynamic (time-varying) quantities.

Enumerator
STATIC 

Constant during run (e.g., dry mass, structure).

DYNAMIC 

Time-varying (e.g., fuel mass, sloshing).

◆ TokenType

enum class icarus::TokenType
strong
Enumerator
Number 
Identifier 
Less 
LessEqual 
Greater 
GreaterEqual 
Equal 
NotEqual 
And 
Or 
Not 
LeftParen 
RightParen 
Eof 

◆ ValidationSeverity

enum class icarus::ValidationSeverity
strong

Severity level for validation issues.

Enumerator
Error 

Fatal - operation cannot proceed.

Warning 

Proceed with caution.

Info 

Informational note.

Function Documentation

◆ ComponentConfig::Get< std::string >()

template<>
std::string icarus::ComponentConfig::Get< std::string > ( const std::string & key,
const std::string & def ) const
inline

◆ ComponentConfig::Get< std::vector< double > >()

template<>
std::vector< double > icarus::ComponentConfig::Get< std::vector< double > > ( const std::string & key,
const std::vector< double > & def ) const
inline

◆ ComponentConfig::Get< std::vector< std::string > >()

template<>
std::vector< std::string > icarus::ComponentConfig::Get< std::vector< std::string > > ( const std::string & key,
const std::vector< std::string > & def ) const
inline

◆ ComponentConfig::Has< std::string >()

template<>
bool icarus::ComponentConfig::Has< std::string > ( const std::string & key) const
inline

◆ ComponentConfig::Has< std::vector< double > >()

template<>
bool icarus::ComponentConfig::Has< std::vector< double > > ( const std::string & key) const
inline

◆ ComponentConfig::Has< std::vector< std::string > >()

template<>
bool icarus::ComponentConfig::Has< std::vector< std::string > > ( const std::string & key) const
inline

◆ ComponentConfig::Require< std::string >()

template<>
std::string icarus::ComponentConfig::Require< std::string > ( const std::string & key) const
inline

◆ ComponentConfig::Require< std::vector< double > >()

template<>
std::vector< double > icarus::ComponentConfig::Require< std::vector< double > > ( const std::string & key) const
inline

◆ ComponentConfig::Require< std::vector< std::string > >()

template<>
std::vector< std::string > icarus::ComponentConfig::Require< std::vector< std::string > > ( const std::string & key) const
inline

◆ FrameToString()

const char * icarus::FrameToString ( Frame frame)
inline

Convert Frame enum to string for logging.

◆ GetLogService()

LogService & icarus::GetLogService ( )
inline

Global log service singleton.

◆ LogError()

void icarus::LogError ( const Error & error,
double time = 0.0,
const std::string & component = "" )
inline

Log an error to the global LogService.

◆ MakeFullPath()

std::string icarus::MakeFullPath ( const std::string & entity,
const std::string & name )
inline

Build a full path from entity and name.

Returns "entity.name" if entity is non-empty, otherwise just "name". Used consistently across Component, ComponentConfig, and logging.

◆ parse_integrator_type()

IntegratorType icarus::parse_integrator_type ( const std::string & name)
inlinenodiscard

Parse integrator type from string (case-insensitive).

Exceptions
std::invalid_argumentif type name is not recognized

◆ SeverityToLogLevel()

LogLevel icarus::SeverityToLogLevel ( Severity severity)
inline

Convert error severity to log level.

◆ ThrowAndLog()

template<typename E>
void icarus::ThrowAndLog ( E && error,
double time = 0.0,
const std::string & component = "" )

Throw an error after logging it.

Usage:

ThrowAndLog(SignalError::NotFound("mySignal"), 0.0, "MyComponent");
static SignalError NotFound(const std::string &name)
Definition Error.hpp:109
void ThrowAndLog(E &&error, double time=0.0, const std::string &component="")
Throw an error after logging it.
Definition ErrorLogging.hpp:59

◆ ThrowError()

template<typename E>
void icarus::ThrowError ( E && error,
double time = 0.0,
const std::string & component = "" )

Helper to throw an error and optionally log it.

Usage with LogService integration (in files that include LogService.hpp):

ICARUS_THROW(SignalError::NotFound("mySignal"), time, "MyComponent");
#define ICARUS_THROW(error)
Throw an error (simple version, no logging).
Definition Error.hpp:515

The error will be logged before being thrown if ICARUS_LOG_ERRORS is defined.

◆ to_string() [1/2]

std::string icarus::to_string ( IntegratorType type)
inlinenodiscard

Convert integrator type to string.

◆ to_string() [2/2]

const char * icarus::to_string ( SignalKind kind)
inline

Convert SignalKind to string.

◆ Version()

const char * icarus::Version ( )
constexpr

Version string (derived from components).

◆ VersionMajor()

int icarus::VersionMajor ( )
constexpr

Major version number.

◆ VersionMinor()

int icarus::VersionMinor ( )
constexpr

Minor version number.

◆ VersionPatch()

int icarus::VersionPatch ( )
constexpr

Patch version number.

Variable Documentation

◆ kDebugMode

bool icarus::kDebugMode = false
constexpr

Check if we're in debug mode at compile time.