14 ret = std::numeric_limits<float>::quiet_NaN();
30 return std::numeric_limits<double>::quiet_NaN();
32 return (static_cast<double>(revolutions) * 2.0 *
M_PI + static_cast<double>(radian_offset));
38 *radian_offset = std::numeric_limits<float>::quiet_NaN();
49 return static_cast<bool>(ret);
65 auto buffer =
new char[length];
67 std::string tmp(buffer, length - 1);
90 return Color(r, g, b, a);
std::string get() const
If the field has a value, returns a copy of that value; otherwise, returns a default.
const HebiInfoRef & internal_
HebiStatusCode ledGetter(const RefT &ref, MetadataT &metadata, int field, uint8_t *r, uint8_t *g, uint8_t *b, uint8_t *a)
FlagField(const HebiInfoRef &internal, HebiInfoFlagField field)
void hebiInfoGetReference(HebiInfoPtr info, HebiInfoRef *ref)
bool has() const
True if (and only if) the field has a value.
HebiInfoRef internal_ref_
bool has() const
True if (and only if) the field has a value.
BoolField(const HebiInfoRef &internal, HebiInfoBoolField field)
Info objects have various fields representing the module state; which fields are populated depends on...
HebiStatusCode floatGetter(const RefT &ref, MetadataT &metadata, int field, float *value)
HebiInfoFloatField const field_
struct HebiInfo_ * HebiInfoPtr
The C-style's API representation of info.
HebiInfoFlagField const field_
The family for this module. The string must be null-terminated and less than 21 characters.
HebiInfoHighResAngleField
HebiStatusCode boolGetter(const RefT &ref, MetadataT &metadata, int field, bool *value)
LedField(const HebiInfoRef &internal, HebiInfoLedField field)
HebiStatusCode highResAngleGetter(const RefT &ref, MetadataT &metadata, int field, int64_t *revs, float *offset)
HebiInfoPtr const internal_
double get() const
If the field has a value, returns that value as a double; otherwise, returns a default.
const HebiInfoRef & internal_
HebiInfoFloatField
Info Enums.
const HebiInfoRef & internal_
bool has() const
True if (and only if) the field has a value.
HighResAngleField(const HebiInfoRef &internal, HebiInfoHighResAngleField field)
bool flagGetter(const RefT &ref, MetadataT &metadata, int field)
Color getColor() const
Returns the led color.
Info(HebiInfoPtr)
Wraps an existing C-style object that is managed by its parent. NOTE: this should not be used except ...
float get() const
If the field has a value, returns that value; otherwise, returns a default.
const HebiInfoRef & internal_
const HebiInfoRef & internal_
StringField(HebiInfoPtr internal, HebiInfoStringField field)
HebiInfoLedField const field_
bool hasColor() const
Returns true if the LED color is set, and false otherwise.
HebiStatusCode hebiInfoGetString(HebiInfoPtr info, HebiInfoStringField field, char *buffer, size_t *length)
Info API.
HebiInfoStringField const field_
FloatField(const HebiInfoRef &internal, HebiInfoFloatField field)
bool get() const
If the field has a value, returns that value; otherwise, returns false.
Structure to describe an RGB color.
bool has() const
True if (and only if) the field has a value.
bool has() const
Returns true if the flag is set, false if it is cleared.
HebiInfoHighResAngleField const field_
HebiInfoBoolField const field_