Class Command::LedField
Defined in File command.hpp
Nested Relationships
This class is a nested type of Class Command.
Class Documentation
-
class LedField
A message field for interfacing with an LED.
Public Functions
-
LedField(HebiCommandRef &internal, HebiCommandLedField field)
-
bool has() const
Returns true if the LED command has been set, and false otherwise.
A command is “set” if there is an override color specified or if the module is being commanded to resume control of the LED. If this returns
false
, it indicates that the current state of the LED will be maintained.
-
Color get() const
Returns the current LED command.
If the alpha channel is ‘0’, this command indicates that the module should resume control of the LED (and the R, G, and B values are ignored). If the alpha channel is ‘1’, the R, G, and B values in this command will override the module’s control of the LED.
-
void set(const Color &color)
Commands a color that overrides the module’s control of the LED (if the alpha channel is 255), or specifies the the module should resume control of the LED color (if the alpha channel is 0). Values of the alpha channel from 1 to 254 are reserved for future use.
-
void clear()
Removes any currently set value for this field, so that the module maintains its previous state of LED control/color (i.e., does not have an override color command or an explicit ‘module control’ command).
-
LedField(HebiCommandRef &internal, HebiCommandLedField field)