A message field for interfacing with an LED. More...
#include <command.hpp>
Public Member Functions | |
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). More... | |
Color | get () const |
Returns the current LED command. More... | |
bool | has () const |
Returns true if the LED command has been set, and false otherwise. More... | |
LedField (HebiCommandPtr internal, HebiCommandLedField field) | |
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. More... | |
Private Attributes | |
HebiCommandLedField const | field_ |
HebiCommandPtr const | internal_ |
A message field for interfacing with an LED.
Definition at line 381 of file command.hpp.
hebi::Command::LedField::LedField | ( | HebiCommandPtr | internal, |
HebiCommandLedField | field | ||
) |
Definition at line 280 of file command.cpp.
void hebi::Command::LedField::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).
Definition at line 313 of file command.cpp.
Color hebi::Command::LedField::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.
Definition at line 292 of file command.cpp.
bool hebi::Command::LedField::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.
Definition at line 285 of file command.cpp.
void hebi::Command::LedField::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.
Definition at line 300 of file command.cpp.
|
private |
Definition at line 417 of file command.hpp.
|
private |
Definition at line 416 of file command.hpp.