19template <
typename Scalar>
class Backplane;
48 [[nodiscard]] T
get()
const {
51 return default_value_;
54 if constexpr (std::is_arithmetic_v<T>) {
55 return static_cast<T
>(*source_ * gain_);
69 void set(
const T &value) { default_value_ = value; }
81 [[nodiscard]] T *
data_ptr() {
return &default_value_; }
86 [[nodiscard]]
bool is_wired()
const {
return source_ !=
nullptr; }
91 [[nodiscard]]
const std::string &
name()
const {
return name_; }
96 [[nodiscard]]
const std::string &
full_name()
const {
return full_name_; }
101 [[nodiscard]]
const std::string &
wired_to()
const {
return wired_to_; }
106 [[nodiscard]]
const std::string &
units()
const {
return units_; }
111 [[nodiscard]]
const std::string &
description()
const {
return description_; }
119 void set_name(
const std::string &
name) { name_ =
name; }
121 void set_units(
const std::string &
units) { units_ =
units; }
122 void set_description(
const std::string &desc) { description_ = desc; }
124 void wire(
const T *source,
const std::string &source_name) {
126 wired_to_ = source_name;
135 void wire_with_gain(
const T *source,
const std::string &source_name,
double gain) {
137 wired_to_ = source_name;
142 std::string full_name_;
143 std::string wired_to_;
144 const T *source_ =
nullptr;
150 std::string description_;
Core type definitions, concepts, and configuration for Icarus.
Consolidated error handling for Icarus.
Component-facing facade for signal registration and resolution.
Definition Backplane.hpp:32
Central registry for all simulation signals.
Definition Registry.hpp:37
Definition AggregationTypes.hpp:13
InputHandle< Vec3< Scalar > > Vec3Input
Vec3 input handle.
Definition InputHandle.hpp:165
InputHandle< Vec4< Scalar > > QuatInput
Vec4/Quaternion input handle.
Definition InputHandle.hpp:170
InputHandle< Scalar > ScalarInput
Scalar input handle.
Definition InputHandle.hpp:160