argos::CCI_DirectionalLEDsActuator Class Reference

#include <ci_directional_leds_actuator.h>

Inheritance diagram for argos::CCI_DirectionalLEDsActuator:
Collaboration diagram for argos::CCI_DirectionalLEDsActuator:

Public Member Functions

 CCI_DirectionalLEDsActuator ()
 
virtual ~CCI_DirectionalLEDsActuator ()
 
size_t GetNumLEDs () const
 Returns the number of LEDs. More...
 
virtual void SetSingleColor (UInt32 un_led_number, const CColor &c_color)
 Sets the color of a single LED. More...
 
virtual void SetAllColors (const CColor &c_color)
 Sets the color of the whole LED ring. More...
 
virtual void SetAllColors (const std::vector< CColor > &c_colors)
 Sets the color of the whole LED ring. More...
 
virtual void SetSingleIntensity (UInt32 un_led_number, UInt8 un_intensity)
 Sets the intensity of a single LED in the ring. More...
 
virtual void SetAllIntensities (UInt8 un_intensity)
 Sets the intensity of all the LEDs in the ring. More...
 
- Public Member Functions inherited from argos::CCI_Actuator
virtual ~CCI_Actuator ()
 Class destructor. More...
 
virtual void Init (TConfigurationNode &t_node)
 Initializes the actuator from the XML configuration tree. More...
 
virtual void Reset ()
 Resets the actuator to the state it had just after Init(). More...
 
virtual void Destroy ()
 Destroys the actuator. More...
 
- Public Member Functions inherited from argos::CBaseConfigurableResource
virtual ~CBaseConfigurableResource ()
 Class destructor. More...
 

Protected Attributes

std::vector< CColorm_tSettings
 
std::vector< CColorm_tInitSettings
 

Additional Inherited Members

- Public Types inherited from argos::CCI_Actuator
typedef std::map< std::string, CCI_Actuator *, std::less< std::string > > TMap
 

Detailed Description

Definition at line 19 of file ci_directional_leds_actuator.h.

Constructor & Destructor Documentation

◆ CCI_DirectionalLEDsActuator()

argos::CCI_DirectionalLEDsActuator::CCI_DirectionalLEDsActuator ( )
inline

Definition at line 23 of file ci_directional_leds_actuator.h.

◆ ~CCI_DirectionalLEDsActuator()

virtual argos::CCI_DirectionalLEDsActuator::~CCI_DirectionalLEDsActuator ( )
inlinevirtual

Definition at line 25 of file ci_directional_leds_actuator.h.

Member Function Documentation

◆ GetNumLEDs()

size_t argos::CCI_DirectionalLEDsActuator::GetNumLEDs ( ) const

Returns the number of LEDs.

Definition at line 101 of file ci_directional_leds_actuator.cpp.

◆ SetAllColors() [1/2]

void argos::CCI_DirectionalLEDsActuator::SetAllColors ( const CColor c_color)
virtual

Sets the color of the whole LED ring.

All the LEDs in the ring will be lit up in the same color. The method does not impact on the LED intensity: if the intensity was changed, the method updates the color but preserves the intensity previously set.

Parameters
c_colorcolor to set

Definition at line 116 of file ci_directional_leds_actuator.cpp.

◆ SetAllColors() [2/2]

void argos::CCI_DirectionalLEDsActuator::SetAllColors ( const std::vector< CColor > &  c_colors)
virtual

Sets the color of the whole LED ring.

All the LEDs in the ring will be lit up, it is possible to have a different color for each LED. Notice that the method also impacts on the intensity of the LED color: it is up to the user to modulate the alpha channel of the color if intensity reduction is needed.

Parameters
c_colorscolor to set for each LED.

Definition at line 125 of file ci_directional_leds_actuator.cpp.

◆ SetAllIntensities()

void argos::CCI_DirectionalLEDsActuator::SetAllIntensities ( UInt8  un_intensity)
virtual

Sets the intensity of all the LEDs in the ring.

Intensity is expressed in [0-255].

Parameters
un_intensitycolor to set for each LED.

Definition at line 140 of file ci_directional_leds_actuator.cpp.

◆ SetSingleColor()

void argos::CCI_DirectionalLEDsActuator::SetSingleColor ( UInt32  un_led_number,
const CColor c_color 
)
virtual

Sets the color of a single LED.

The method does not impact on the LED intensity: if the intensity was changed, the method updates the color but preserves the intensity previously set.

Parameters
un_led_numberLED that must be set
c_colorcolor to set

Definition at line 108 of file ci_directional_leds_actuator.cpp.

◆ SetSingleIntensity()

void argos::CCI_DirectionalLEDsActuator::SetSingleIntensity ( UInt32  un_led_number,
UInt8  un_intensity 
)
virtual

Sets the intensity of a single LED in the ring.

Intensity is expressed in [0-255].

Parameters
un_led_numberindex of the LED whose intensity must be set.
un_intensitycolor to set for each LED.

Definition at line 132 of file ci_directional_leds_actuator.cpp.

Member Data Documentation

◆ m_tInitSettings

std::vector<CColor> argos::CCI_DirectionalLEDsActuator::m_tInitSettings
protected

Definition at line 90 of file ci_directional_leds_actuator.h.

◆ m_tSettings

std::vector<CColor> argos::CCI_DirectionalLEDsActuator::m_tSettings
protected

Definition at line 89 of file ci_directional_leds_actuator.h.