A multi-dimensional numeric endpoint with user customizeable range and occasional message semantics.
More...
|
constexpr const auto & | operator[] (std::size_t i) const noexcept |
|
constexpr auto & | operator[] (std::size_t i) noexcept |
|
void | set_updated () noexcept |
|
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 = {};
|
|
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_str | The name of the endpoint. Required. |
N | The number of elements in the array. Required. |
desc | A description of the endpoint. Defaults to an empty string. |
T | Underlying value type of the endpoint. Defaults to float . |
min | Expected minimum value of the endpoint. Defaults to 0.0f . |
max | Expected maximum value of the endpoint. Defaults to 1.0f . |
init | The initial value of the endpoint. Defaults to min . |
Tags | Tag helper classes to apply to the endpoint. None by default. |