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

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

#include <feedback.hpp>

Public Member Functions

Color getColor () const
 Returns the led color. More...
 
bool hasColor () const
 Returns true if the LED color is set, and false otherwise. More...
 
 LedField (HebiFeedbackPtr internal, HebiFeedbackLedField field)
 
 operator bool () const
 Allows casting to a bool to check if the LED color is set without directly calling hasColor(). More...
 

Private Attributes

HebiFeedbackLedField const field_
 
HebiFeedbackPtr const internal_
 

Detailed Description

A message field for interfacing with an LED.

Definition at line 399 of file feedback.hpp.

Constructor & Destructor Documentation

hebi::Feedback::LedField::LedField ( HebiFeedbackPtr  internal,
HebiFeedbackLedField  field 
)

Definition at line 199 of file feedback.cpp.

Member Function Documentation

Color hebi::Feedback::LedField::getColor ( ) const

Returns the led color.

Definition at line 209 of file feedback.cpp.

bool hebi::Feedback::LedField::hasColor ( ) const

Returns true if the LED color is set, and false otherwise.

Definition at line 204 of file feedback.cpp.

hebi::Feedback::LedField::operator bool ( ) const
inlineexplicit

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

Feedback::LedField& f = parent.myField();
if (f)
std::cout << "Field has color!" << std::endl;
else
std::cout << "Field has no value!" << std::endl;

Definition at line 417 of file feedback.hpp.

Member Data Documentation

HebiFeedbackLedField const hebi::Feedback::LedField::field_
private

Definition at line 425 of file feedback.hpp.

HebiFeedbackPtr const hebi::Feedback::LedField::internal_
private

Definition at line 424 of file feedback.hpp.


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


hebiros
Author(s): Xavier Artache , Matthew Tesch
autogenerated on Thu Sep 3 2020 04:10:59