Class Info::LedField
Defined in File info.hpp
Nested Relationships
This class is a nested type of Class Info.
Class Documentation
-
class LedField
A message field for interfacing with an LED.
Public Functions
-
LedField(const HebiInfoRef &internal, HebiInfoLedField field)
-
inline explicit operator bool() const
Allows casting to a bool to check if the LED color is set without directly calling
hasColor()
.This can be used as in the following (assuming ‘parent’ is a parent message, and this field is called ‘myField’)
Info::LedField& f = parent.myField(); if (f) std::cout << "Field has color!" << std::endl; else std::cout << "Field has no value!" << std::endl;
-
bool hasColor() const
Returns true if the LED color is set, and false otherwise.
-
Color getColor() const
Returns the led color.
-
LedField(const HebiInfoRef &internal, HebiInfoLedField field)