11 Info::FloatField::operator bool()
const 26 ret = std::numeric_limits<float>::quiet_NaN();
34 Info::HighResAngleField::operator bool()
const 50 return std::numeric_limits<double>::quiet_NaN();
53 static_cast<double>(revolutions) * 2.0 *
M_PI +
54 static_cast<double>(radian_offset)
63 *radian_offset = std::numeric_limits<float>::quiet_NaN();
84 return static_cast<bool>(ret);
92 Info::StringField::operator bool()
const 111 auto buffer =
new char [length];
113 std::string tmp(buffer, length - 1);
123 Info::FlagField::operator bool()
const 152 return Color(r, g, b);
bool has() const
True if (and only if) the field has a value.
std::string get() const
If the field has a value, returns a copy of that value; otherwise, returns a default.
FloatField(HebiInfoPtr internal, HebiInfoFloatField field)
LedField(HebiInfoPtr internal, HebiInfoLedField field)
HebiInfoPtr const internal_
HebiStatusCode hebiInfoGetFloat(HebiInfoPtr info, HebiInfoFloatField field, float *value)
int32_t hebiInfoGetFlag(HebiInfoPtr info, HebiInfoFlagField field)
bool hasColor() const
Returns true if the LED color is set, and false otherwise.
HebiStatusCode hebiInfoGetHighResAngle(HebiInfoPtr, HebiInfoHighResAngleField, int64_t *int_part, float *dec_part)
float get() const
If the field has a value, returns that value; otherwise, returns a default.
bool has() const
True if (and only if) the field has a value.
~Info() noexcept
Cleans up info object as necessary.
bool has() const
True if (and only if) the field has a value.
Info objects have various fields representing the module state; which fields are populated depends on...
HebiInfoFloatField const field_
HebiInfoFlagField const field_
A message field for interfacing with an LED.
Gets the family for this module.
HebiInfoHighResAngleField
const LedField & led() const
The module's LED.
HebiInfoPtr const internal_
HebiInfoPtr const internal_
HighResAngleField(HebiInfoPtr internal, HebiInfoHighResAngleField field)
bool get() const
If the field has a value, returns that value; otherwise, returns false.
bool has() const
Returns true if the flag is set, false if it is cleared.
double get() const
If the field has a value, returns that value as a double; otherwise, returns a default.
HebiInfoPtr const internal_
Info(HebiInfoPtr)
Wraps an existing C-style object that is managed by its parent. NOTE: this should not be used except ...
StringField(HebiInfoPtr internal, HebiInfoStringField field)
HebiInfoLedField const field_
Color getColor() const
Returns the led color.
HebiStatusCode hebiInfoGetString(HebiInfoPtr info, HebiInfoStringField field, char *buffer, size_t *length)
HebiStatusCode hebiInfoGetBool(HebiInfoPtr info, HebiInfoBoolField field, int32_t *value)
HebiInfoStringField const field_
TFSIMD_FORCE_INLINE tfScalar length(const Quaternion &q)
struct _HebiInfo * HebiInfoPtr
The C-style's API representation of a group.
bool has() const
True if (and only if) the field has a value.
BoolField(HebiInfoPtr internal, HebiInfoBoolField field)
Structure to describe an RGB color.
EIGEN_DEVICE_FUNC const Scalar & b
HebiStatusCode hebiInfoGetLedColor(HebiInfoPtr info, HebiInfoLedField field, uint8_t *r, uint8_t *g, uint8_t *b)
HebiInfoHighResAngleField const field_
HebiInfoPtr const internal_
HebiInfoPtr const internal_
FlagField(HebiInfoPtr internal, HebiInfoFlagField field)
HebiInfoBoolField const field_