Public Member Functions | Private Attributes | List of all members
hebi::Command::LedField Class Referencefinal

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 (HebiCommandRef &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_
 
HebiCommandRefinternal_
 

Detailed Description

A message field for interfacing with an LED.

Definition at line 400 of file command.hpp.

Constructor & Destructor Documentation

hebi::Command::LedField::LedField ( HebiCommandRef internal,
HebiCommandLedField  field 
)

Definition at line 183 of file command.cpp.

Member Function Documentation

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 204 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 189 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 185 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 200 of file command.cpp.

Member Data Documentation

HebiCommandLedField const hebi::Command::LedField::field_
private

Definition at line 436 of file command.hpp.

HebiCommandRef& hebi::Command::LedField::internal_
private

Definition at line 435 of file command.hpp.


The documentation for this class was generated from the following files:


hebi_cpp_api_ros
Author(s): Chris Bollinger , Matthew Tesch
autogenerated on Thu May 28 2020 03:14:45