HEBI C++ API  3.4.0
hebi::Command::LedField Class Referencefinal

A message field for interfacing with an LED. More...

#include <command.hpp>

Public Member Functions

bool has () const
 Returns true if the LED command has been set, and false otherwise. More...
 
Color get () const
 Returns the current LED command. More...
 
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...
 
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...
 

Detailed Description

A message field for interfacing with an LED.

Member Function Documentation

◆ has()

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.

◆ get()

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.

◆ set()

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.

◆ clear()

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).


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