|
| virtual | ~Component ()=default |
| virtual void | Provision (Backplane< Scalar > &bp)=0 |
| | Provision phase - called once at application launch.
|
| virtual void | Stage (Backplane< Scalar > &bp)=0 |
| | Stage phase - called at start of each run/episode.
|
| virtual void | Step (Scalar t, Scalar dt)=0 |
| | Step phase - called every time step (hot path!).
|
| virtual void | PreStep (Scalar, Scalar) |
| | Called before any component Steps (for pre-processing).
|
| virtual void | PostStep (Scalar, Scalar) |
| | Called after all component Steps (for post-processing).
|
| virtual void | OnError (const SimulationError &) |
| | Called when simulation encounters an error.
|
| virtual void | Shutdown () |
| | Called during shutdown (cleanup, flush buffers).
|
| virtual std::string | Name () const =0 |
| | Component instance name (e.g., "MainEngine").
|
| virtual std::string | Entity () const |
| | Entity namespace (e.g., "X15").
|
| virtual std::string | TypeName () const |
| | Component type name for data dictionary (e.g., "JetEngine").
|
| std::string | FullName () const |
| | Full qualified name: entity.component (or just component).
|
| virtual std::vector< SignalDecl > | DeclareInputs () const |
| | Declared inputs (for documentation/dependency graph).
|
| virtual std::vector< SignalDecl > | DeclareOutputs () const |
| | Declared outputs (for documentation/dependency graph).
|
| std::vector< std::string > | GetOutputNames () const |
| | Get list of output signal names.
|
| std::vector< std::string > | GetInputNames () const |
| | Get list of input signal names.
|
| virtual bool | HasBodyAttachment () const |
| | Whether this component has a body attachment (position/orientation).
|
| virtual Vec3< Scalar > | GetBodyPosition () const |
| | Get the component's mounting position in vehicle body frame.
|
| virtual janus::Quaternion< Scalar > | GetBodyOrientation () const |
| | Get the component's mounting orientation (body-to-component rotation).
|
| bool | IsProvisioned () const |
| | Check if Provision has been called.
|
| bool | IsStaged () const |
| | Check if Stage has been called.
|
| void | SetConfig (ComponentConfig config) |
| | Set component configuration (called by factory after construction).
|
| const ComponentConfig & | GetConfig () const |
| | Get component configuration.
|
| const vulcan::time::Epoch< Scalar > * | GetEpoch () const |
| | Get simulation epoch (read-only).
|
|
| template<typename T> |
| T | read_param (const std::string &key, const T &default_val) const |
| | Read a scalar config parameter with default.
|
| template<typename T> |
| T | require_param (const std::string &key) const |
| | Read a required scalar config parameter (throws if missing).
|
| Vec3< Scalar > | read_param_vec3 (const std::string &key, const Vec3< Scalar > &default_val) const |
| | Read a Vec3 config parameter with automatic double→Scalar conversion.
|
| Vec3< Scalar > | require_param_vec3 (const std::string &key) const |
| | Read a required Vec3 config parameter (throws if missing).
|
| Vec4< Scalar > | read_param_vec4 (const std::string &key, const Vec4< Scalar > &default_val) const |
| | Read a Vec4 config parameter with automatic double→Scalar conversion.
|
| Vec4< Scalar > | require_param_vec4 (const std::string &key) const |
| | Read a required Vec4 config parameter (throws if missing).
|
| void | MarkProvisioned () |
| void | MarkStaged () |
| void | ResetStaged () |
| void | BindEpoch (const vulcan::time::Epoch< Scalar > *epoch) |
template<typename Scalar>
class icarus::Component< Scalar >
Base class for all simulation components.
Components are the fundamental unit of execution in Icarus. They own state and implement the Provision/Stage/Step lifecycle.
Lifecycle:
- Provision (once) - Register outputs, allocate memory, load params
- Stage (per run) - Wire inputs, apply ICs
- Step (per dt) - Compute dynamics (hot path!)
- Template Parameters
-
| Scalar | The numeric type (double or casadi::MX) |
template<typename Scalar>
| Vec4< Scalar > icarus::Component< Scalar >::read_param_vec4 |
( |
const std::string & | key, |
|
|
const Vec4< Scalar > & | default_val ) const |
|
inlineprotected |
Read a Vec4 config parameter with automatic double→Scalar conversion.
Usage: attitude_ = read_param_vec4("initial_attitude", Vec4<Scalar>{1, 0, 0, 0});