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

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

#include <info.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 HebiInfoRef &internal, HebiInfoLedField field)
 
 operator bool () const
 Allows casting to a bool to check if the LED color is set without directly calling hasColor(). More...
 

Private Attributes

HebiInfoLedField const field_
 
const HebiInfoRefinternal_
 

Detailed Description

A message field for interfacing with an LED.

Definition at line 280 of file info.hpp.

Constructor & Destructor Documentation

hebi::Info::LedField::LedField ( const HebiInfoRef internal,
HebiInfoLedField  field 
)

Definition at line 76 of file info.cpp.

Member Function Documentation

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

Returns the led color.

Definition at line 82 of file info.cpp.

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

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

Definition at line 78 of file info.cpp.

hebi::Info::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')

Info::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 297 of file info.hpp.

Member Data Documentation

HebiInfoLedField const hebi::Info::LedField::field_
private

Definition at line 306 of file info.hpp.

const HebiInfoRef& hebi::Info::LedField::internal_
private

Definition at line 305 of file info.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