Sygaldry
Loading...
Searching...
No Matches

A wrapper around a value-like type. More...

Inheritance diagram for sygaldry::persistent< T >:
sygaldry::slider<"raw full capacity", "full capacity of the battery", int, 0, 65535, 0, sygaldry::tag_session_data > sygaldry::slider<"raw full capacity nominal", "full capacity of the battery (no voltage/temperature compensation)", int, 0, 65535, 0, sygaldry::tag_session_data > sygaldry::slider<"raw charge cycles", "LSB", int, 0, 65535, 0, sygaldry::tag_session_data > sygaldry::slider<"rcomp", "voltage compensation parameter", int, 0, 65535, 0, sygaldry::tag_session_data > sygaldry::slider<"tempco", "temperature compensation parameter", int, 0, 65535, 0, sygaldry::tag_session_data > sygaldry::slider<"instantaneous current", "mA", float > sygaldry::slider<"average current", "mA", float > sygaldry::slider<"instantaneous voltage", "V", float, 0.0f, 5.11992f, 0.0f > sygaldry::slider<"average voltage", "V", float, 0.0f, 5.11992f, 0.0f > sygaldry::slider<"capacity", "current capacity (mAh)", int > sygaldry::slider<"full capacity", "full capacity of the battery (mAh)", int > sygaldry::slider<"state of charge", "%", float, 0.0f, 255.9961f, 0.0f > sygaldry::slider<"battery age", "full battery capacity divided by design capacity (%)", float, 0.0f, 255.9961f, 0.0f > sygaldry::slider<"time to full", "h", float, 0.0f, 102.3984f, 0.0f > sygaldry::slider<"time to empty", "h", float, 0.0f, 102.3984f, 0.0f > sygaldry::slider<"charge cycles", "number of charge cycles", float, 0.0f, 655.35f, 0.0f > sygaldry::slider<"raw", "raw binary representation of the analog voltage measured by the ADC", int, 0, 4096, 0 > sygaldry::slider<"proportional feedback", "proportional feedback gain coefficient", float, 0.0f, 10.0f, 3.0f, sygaldry::tag_session_data > sygaldry::slider<"integral feedback", "integral feedback gain coefficient", float, 0.0f, 10.0f, 0.0f, sygaldry::tag_session_data > sygaldry::slider<"accelerometer influence", "accelerometer gain coefficient; reflects confidence in the accelerometer data", float, 0.0f, 1.0f, 0.25f, sygaldry::tag_session_data > sygaldry::slider<"magnetometer influence", "magnetometer gain coefficient; reflects confidence in the magnetometer data", float, 0.0f, 1.0f, 1.0f, sygaldry::tag_session_data > sygaldry::slider<"movement threshold", "threshold of jerk magnitude below which the device is considered as stationary", float, 0.0f, 32.0f, 0.0001f, sygaldry::tag_session_data > sygaldry::slider<"gyroscope bias smoothing", "IIR filter coefficient for gyro bias smoothing filter; higher value results in more smoothing/lower cutoff", float, 0.0f, 1.0f, 0.99f, sygaldry::tag_session_data > sygaldry::slider<"norm of gravity", "estimated strength of gravity relative to one standard gravity (9.80665 m/s/s)", float, 0.995f, 1.002f > sygaldry::slider<"accelerometer sensitivity", "g/LSB", float, 1/16384.0f, 1/2048.0f, 1/4096.0f > sygaldry::slider<"gyroscope sensitivity", "(rad/s)/LSB", float, 1/131.0f *rad_per_deg, 1/16.4f *rad_per_deg, 1/16.4f *rad_per_deg > sygaldry::slider<"magnetometer sensitivity", "uT/LSB", float, 0.15f, 0.15f > sygaldry::array< name_str, N, desc, T, min, max, init, Tags > sygaldry::slider< name_str, desc, T, min, max, init, Tags >

Public Types

using type = T
 The underlying type.
 

Public Member Functions

constexpr persistent () noexcept
 Default constuctor defers to T's empty initializer.
 
constexpr persistent (T &&t) noexcept
 Move constructor from T
 
constexpr persistent (const T &t) noexcept
 Copy constructor from T
 
constexpr auto & operator= (T &&t) noexcept
 Move assignment from T
 
constexpr auto & operator= (const T &t) noexcept
 Copy assignment from T
 
constexpr operator T& () noexcept
 Conversion to a mutable reference to the underlying value.
 
constexpr operator const T & () const noexcept
 Conversion to a constant reference to the underlying value.
 

Public Attributes

value
 The wrapped value.
 

Detailed Description

template<typename T>
struct sygaldry::persistent< T >

A wrapper around a value-like type.

persistent tries to mimick value semantics, providing constructors and conversion operators so that a persistent<T> can be roughly treated as if it is a T.

Endpoints inheriting from this type should state using persistent<T>::operator= to explicitly inherit the assignment operators from persistent.


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