template class ugcs::vsm::mavlink::Value¶
Overview¶
Field value in MAVLink message. More…
#include <mavlink.h> template <typename T, Field_type_id id, int32_t initial_value = 0> class Value { public: // construction Value(T value = initial_value); // methods Value& operator = (T value); operator T () const; T Get() const; constexpr Field_type_id Get_type_id(); void Reset(); bool Is_reset() const; };
Detailed Documentation¶
Field value in MAVLink message.
Parameters:
T |
Integer underlying type. |
id |
ID for the type. |
initial_value |
Initial value for the field. It’s type is fixed to integer because floating point numbers cannot be template parameters. |
Construction¶
Value(T value = initial_value)
Construct value.
Parameters:
value |
Value in host byte order. |
Methods¶
Value& operator = (T value)
Assign new value.
Parameters:
value |
Value in host byte order. |
operator T () const
Cast to underlying type.
Returns:
Value in host byte order.
T Get() const
Get the value of underlying type.
Returns:
Value in host byte order.
constexpr Field_type_id Get_type_id()
Get type ID for this value.
void Reset()
Reset to default value used in UgCS as a “not present” indication.
bool Is_reset() const
Check, if the field is reset.