Type-safe handle for accessing a signal value.
More...
#include <Handle.hpp>
template<typename T>
class icarus::SignalHandle< T >
Type-safe handle for accessing a signal value.
SignalHandle provides:
- Zero-overhead dereferencing (hot path): operator*, operator->
- Raw pointer access for integration with Eigen loops
- Metadata access (cold path): name(), unit(), lifecycle()
- Validity checking: operator bool()
Usage pattern:
double current_thrust = *thrust;
thrust->some_method();
SignalHandle(T *ptr, const SignalDescriptor *meta)
Construct a SignalHandle with pointer and metadata.
Definition Handle.hpp:48
- Template Parameters
-
| T | The signal value type (must have a TypeTraits specialization) |
◆ SignalHandle() [1/2]
Construct a SignalHandle with pointer and metadata.
- Parameters
-
| ptr | Pointer to the signal storage |
| meta | Pointer to the signal descriptor (metadata) |
◆ SignalHandle() [2/2]
Default constructor (creates invalid handle).
◆ descriptor()
Get the full signal descriptor.
- Precondition
- Handle must be valid
◆ lifecycle()
Get the signal lifecycle.
- Precondition
- Handle must be valid
◆ name()
Get the signal name.
- Precondition
- Handle must be valid (check with valid() or operator bool())
◆ operator bool()
Check if handle is valid (bound to a signal).
◆ operator*() [1/2]
Dereference to get/set the signal value.
◆ operator*() [2/2]
◆ operator->() [1/2]
Arrow operator for member access (if T is a class).
◆ operator->() [2/2]
◆ ptr() [1/2]
Get raw pointer for integration with Eigen loops.
◆ ptr() [2/2]
◆ unit()
Get the signal unit.
- Precondition
- Handle must be valid
◆ valid()
Check if handle is valid.
The documentation for this class was generated from the following file: