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 (const HebiFeedbackRef &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_
 
const HebiFeedbackRefinternal_
 

Detailed Description

A message field for interfacing with an LED.

Definition at line 410 of file feedback.hpp.

Constructor & Destructor Documentation

hebi::Feedback::LedField::LedField ( const HebiFeedbackRef internal,
HebiFeedbackLedField  field 
)

Definition at line 136 of file feedback.cpp.

Member Function Documentation

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

Returns the led color.

Definition at line 143 of file feedback.cpp.

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

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

Definition at line 139 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 427 of file feedback.hpp.

Member Data Documentation

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

Definition at line 436 of file feedback.hpp.

const HebiFeedbackRef& hebi::Feedback::LedField::internal_
private

Definition at line 435 of file feedback.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