Sygaldry
Loading...
Searching...
No Matches
sygaldry::vec3_message< name, T, min, max, unit, desc, Tags > Struct Template Reference

A MIMU data vector. More...

Inheritance diagram for sygaldry::vec3_message< name, T, min, max, unit, desc, Tags >:
sygaldry::array_message< name_str, N, desc, T, min, max, init, Tags > sygaldry::unit_< str > sygaldry::occasional< T > sygaldry::name_< name_str > sygaldry::description_< str > sygaldry::range_< _min, _max, _init > sygaldry::tagged_< Tags... >

Public Types

using Parent = array_message< name, 3, desc, T, min, max, T{}, Tags... >
 The parent type; this is defined as a convenience for implementation and shouldn't be treated as part of the public API.
 
- Public Types inherited from sygaldry::array_message< name_str, N, desc, T, min, max, init, Tags >
using type = T
 
- Public Types inherited from sygaldry::occasional< T >
using type = T
 The underlying type.
 

Public Member Functions

constexpr auto & x () noexcept
 Mutable vector component access; remember to call set_updated() if you change the value of the vector.
 
constexpr auto & y () noexcept
 Mutable vector component access; remember to call set_updated() if you change the value of the vector.
 
constexpr auto & z () noexcept
 Mutable vector component access; remember to call set_updated() if you change the value of the vector.
 
constexpr const auto & x () const noexcept
 Immutable vector component access.
 
constexpr const auto & y () const noexcept
 Immutable vector component access.
 
constexpr const auto & z () const noexcept
 Immutable vector component access.
 
- Public Member Functions inherited from sygaldry::array_message< name_str, N, desc, T, min, max, init, Tags >
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 = {};
 

Additional Inherited Members

- Static Public Member Functions inherited from sygaldry::array_message< name_str, N, desc, T, min, max, init, Tags >
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.
 
- Static Public Member Functions inherited from sygaldry::unit_< str >
static _consteval auto unit ()
 
- 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, typename T = float, num_literal< T > min = -1.0f, num_literal< T > max = 1.0f, string_literal unit = "normalized", string_literal desc = "", typename ... Tags>
struct sygaldry::vec3_message< name, T, min, max, unit, desc, Tags >

A MIMU data vector.

Template Parameters
nameThe name of the vector, e.g. "accelerometer"
TThe underlying numeric type, usually float or int
minThe expected minimum magnitude of the vector
maxThe expected maximum magnitude of the vector
unitThe unit of measurement of the vector
descA textual description of the vector
TagsA list of tag helper classes to apply to the endpoint

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