Icarus
Vehicle Simulation as a Transformable Computational Graph, built on Vulcan and Janus
Loading...
Searching...
No Matches
icarus::InputHandle< T > Class Template Reference

Handle to an input signal port. More...

#include <InputHandle.hpp>

Public Member Functions

 InputHandle ()
get () const
 Get the current value (from wired source or default buffer).
void set (const T &value)
 Set the default value (for external injection when unwired).
operator* () const
 Dereference operator (same as get()).
T * data_ptr ()
 Get pointer to the default value buffer (for registry).
bool is_wired () const
 Check if this input has been wired.
const std::string & name () const
 Get the port name (local name).
const std::string & full_name () const
 Get the full qualified name (entity.component.signal).
const std::string & wired_to () const
 Get the wired source signal name (empty if unwired).
const std::string & units () const
 Get units.
const std::string & description () const
 Get description.

Friends

template<typename S>
class Backplane
template<typename S>
class SignalRegistry

Detailed Description

template<typename T>
class icarus::InputHandle< T >

Handle to an input signal port.

Registered at Provision, wired to a source at Stage. Provides type-safe access to the wired signal value.

Inputs have their own storage buffer that:

  • Is initialized to zero (default)
  • Can be poked for external injection (e.g., from Hermes)
  • Is overridden when wired (wired source takes precedence)
Template Parameters
TThe value type (Scalar, Vec3<Scalar>, etc.)

Constructor & Destructor Documentation

◆ InputHandle()

template<typename T>
icarus::InputHandle< T >::InputHandle ( )
inline

Member Function Documentation

◆ data_ptr()

template<typename T>
T * icarus::InputHandle< T >::data_ptr ( )
inlinenodiscard

Get pointer to the default value buffer (for registry).

Used by SignalRegistry to enable poke via sim.set("signal", value)

◆ description()

template<typename T>
const std::string & icarus::InputHandle< T >::description ( ) const
inlinenodiscard

Get description.

◆ full_name()

template<typename T>
const std::string & icarus::InputHandle< T >::full_name ( ) const
inlinenodiscard

Get the full qualified name (entity.component.signal).

◆ get()

template<typename T>
T icarus::InputHandle< T >::get ( ) const
inlinenodiscard

Get the current value (from wired source or default buffer).

Priority:

  1. If wired: returns source value (with gain applied)
  2. If unwired: returns default_value_ (can be set via set())
Returns
Current value

◆ is_wired()

template<typename T>
bool icarus::InputHandle< T >::is_wired ( ) const
inlinenodiscard

Check if this input has been wired.

◆ name()

template<typename T>
const std::string & icarus::InputHandle< T >::name ( ) const
inlinenodiscard

Get the port name (local name).

◆ operator*()

template<typename T>
T icarus::InputHandle< T >::operator* ( ) const
inlinenodiscard

Dereference operator (same as get()).

◆ set()

template<typename T>
void icarus::InputHandle< T >::set ( const T & value)
inline

Set the default value (for external injection when unwired).

This value is used when the input is not wired. Allows external systems (Hermes, tests) to inject values.

Parameters
valueThe value to set

◆ units()

template<typename T>
const std::string & icarus::InputHandle< T >::units ( ) const
inlinenodiscard

Get units.

◆ wired_to()

template<typename T>
const std::string & icarus::InputHandle< T >::wired_to ( ) const
inlinenodiscard

Get the wired source signal name (empty if unwired).

◆ Backplane

template<typename T>
template<typename S>
friend class Backplane
friend

◆ SignalRegistry

template<typename T>
template<typename S>
friend class SignalRegistry
friend

The documentation for this class was generated from the following file: