Sygaldry
Loading...
Searching...
No Matches
sygaldry::array_message< name_str, N, desc, T, min, max, init, Tags > Struct Template Reference

A multi-dimensional numeric endpoint with user customizeable range and occasional message semantics. More...

Inheritance diagram for sygaldry::array_message< name_str, N, desc, T, min, max, init, Tags >:
sygaldry::occasional< T > sygaldry::name_< name_str > sygaldry::description_< str > sygaldry::range_< _min, _max, _init > sygaldry::tagged_< Tags... > sygaldry::vec3_message<"sensor acceleration", float, -16.0f *mss_per_g, 16.0f *mss_per_g, "m/s/s", "estimated acceleration due to motion expressed in the sensor frame of reference" > sygaldry::vec3_message<"global acceleration", float, -16.0f *mss_per_g, 16.0f *mss_per_g, "m/s/s", "estimated acceleration due to motion expressed in the performance frame of reference" > sygaldry::vec3_message<"previous accelerometer", float, -16.0f, 16.0f, "g", "previous measurement of acceleration; used in the estimation of jerk" > sygaldry::vec3_message<"jerk", float, -32.0f, 32.0f, "g/s", "approximate signal analogous to the derivative of acceleration in the sensor frame" > sygaldry::vec3_message<"gyroscope bias", float, -2000.0f *rad_per_deg, 2000.0f *rad_per_deg, "rad/s", "estimated gyroscope sensor bias" > sygaldry::vec3_message<"magnetometer maximum", float, -4900.0f, 4900.0f, "uT", "component-wise maximum of magnetometer values measured while calibrating bias compensation" > sygaldry::vec3_message<"magnetometer minimum", float, -4900.0f, 4900.0f, "uT", "component-wise minimum of magnetometer values measured while calibrating bias compensation" > sygaldry::vec3_message<"magnetometer bias", float, -4900.0f, 4900.0f, "uT", "estimated magnetometer sensor bias" > sygaldry::vec3_message<"angular rate", float, -2000.0f *rad_per_deg, 2000.0f *rad_per_deg, "rad/s", "estimated angular rate based on fused sensor measurements" > sygaldry::vec3_message< "integral feedback", float, -20.0f, 20.0f, "integral feedback through the complementary filter" > sygaldry::vec3_message<"accelerometer raw", int, -32768, 32767, "LSB"> sygaldry::vec3_message<"accelerometer", float, -16, 16, "g"> sygaldry::vec3_message<"gyroscope raw", int, -32768, 32767, "LSB"> sygaldry::vec3_message<"gyroscope", float, -2000.0f *rad_per_deg, 2000.0f *rad_per_deg, "rad/s"> sygaldry::vec3_message<"magnetometer raw", int, -32768, 32767, "LSB"> sygaldry::vec3_message<"magnetometer", float, -4900, 4900, "uT"> sygaldry::vec3_message< name, T, min, max, unit, desc, Tags >

Public Types

using type = T
 
- Public Types inherited from sygaldry::occasional< T >
using type = T
 The underlying type.
 

Public Member Functions

constexpr const auto & operator[] (std::size_t i) const noexcept
 
constexpr auto & operator[] (std::size_t i) noexcept
 
void set_updated () noexcept
 
- Public Member Functions inherited from sygaldry::occasional< T >
constexpr occasional () noexcept
 Default constructor; state is default initialized and updated is false.
 
constexpr occasional (occasional< T > &&other)
 Move constructor from another occasional.
 
constexpr occasional (const occasional< T > &other)
 Copy constructor from another occasional.
 
constexpr auto & operator= (occasional< T > &&other)
 Move assignment from another occasional.
 
constexpr auto & operator= (const occasional< T > &other)
 Copy assignment from another occasional.
 
constexpr operator T& () noexcept
 Mutable value access.
 
constexpr operator const T & () const noexcept
 Immutable value access.
 
constexpr occasional (T &&t) noexcept
 Move constructor from the underlying type.
 
constexpr occasional (const T &t) noexcept
 Copy constructor from the underlying type.
 
constexpr auto & operator= (T &&t) noexcept
 Move assignment from the underlying type.
 
constexpr auto & operator= (const T &t) noexcept
 Copy assignment from the underlying type.
 
constexpr T & operator* () noexcept
 Mutable dereference operator; provides access to the underlying state.
 
constexpr const T & operator* () const noexcept
 Constant dereference operator; provides access to the underlying state.
 
constexpr T * operator-> () noexcept
 Mutable member access operator; provides access to the members of the underlying state.
 
constexpr const T * operator-> () const noexcept
 Constant member access operator; provides access to the members of the underlying state.
 
constexpr T & value () noexcept
 Mutable value access.
 
constexpr const T & value () const noexcept
 Immutable value access.
 
constexpr void reset () noexcept
 Clear the updated flag. This can also be achieved by assignment from empty braces, e.g. x = {};
 

Static Public Member Functions

static _consteval auto size () noexcept
 
- Static Public Member Functions inherited from sygaldry::name_< name_str >
static _consteval auto name ()
 
- Static Public Member Functions inherited from sygaldry::description_< str >
static _consteval auto description ()
 
- Static Public Member Functions inherited from sygaldry::range_< _min, _max, _init >
static _consteval auto range ()
 Returns a struct with min, max, and init members containing the range.
 
static _consteval auto min ()
 Returns the minimum value of the range.
 
static _consteval auto max ()
 Returns the maximum value of the range.
 
static _consteval auto init ()
 Returns the initial value of the range.
 

Additional Inherited Members

- Public Attributes inherited from sygaldry::occasional< T >
state
 The wrapped state.
 
bool updated
 Flag indicating if the state has been changed.
 

Detailed Description

template<string_literal name_str, std::size_t N, string_literal desc = "", typename T = float, num_literal< T > min = 0.0f, num_literal< T > max = 1.0f, num_literal< T > init = min, typename ... Tags>
struct sygaldry::array_message< name_str, N, desc, T, min, max, init, Tags >

A multi-dimensional numeric endpoint with user customizeable range and occasional message semantics.

Example: array_message<"touch mask", 30, "Mask of currently touched capacitive sensors", unsigned int, 0, 1> touch_mask;

Template Parameters
name_strThe name of the endpoint. Required.
NThe number of elements in the array. Required.
descA description of the endpoint. Defaults to an empty string.
TUnderlying value type of the endpoint. Defaults to float.
minExpected minimum value of the endpoint. Defaults to 0.0f.
maxExpected maximum value of the endpoint. Defaults to 1.0f.
initThe initial value of the endpoint. Defaults to min.
TagsTag helper classes to apply to the endpoint. None by default.

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