ARGoS
3
A parallel, multi-engine simulator for swarm robotics
|
#include <led_entity.h>
Public Types | |
typedef std::vector< CLEDEntity * > | TList |
typedef CSet< CLEDEntity * > | TSet |
Public Member Functions | |
ENABLE_VTABLE () | |
CLEDEntity (CComposableEntity *pc_parent) | |
CLEDEntity (CComposableEntity *pc_parent, const std::string &str_id, const CVector3 &c_position, const CColor &c_color) | |
virtual | ~CLEDEntity () |
virtual void | Init (TConfigurationNode &t_tree) |
Initializes the state of the entity from the XML configuration tree. | |
virtual void | Reset () |
Resets the state of the entity to whatever it was after Init() or the standalone constructor was called. | |
virtual void | SetEnabled (bool b_enabled) |
Enables or disables an entity. | |
const CColor & | GetColor () const |
Returns the current color of the LED. | |
const CColor & | GetInitColor () const |
Returns the color with which the LED was initialized. | |
void | SetColor (const CColor &c_color) |
Sets the current color of the LED. | |
void | SetInitColor (const CColor &c_color) |
Sets the initialization color for this LED. | |
virtual std::string | GetTypeDescription () const |
Returns a string label for this class. | |
void | AddToMedium (CLEDMedium &c_medium) |
Adds the LEDs to the wanted LED medium. | |
void | RemoveFromMedium (CLEDMedium &c_medium) |
Removes the LEDs from the wanted LED medium. | |
Protected Attributes | |
CColor | m_cColor |
CColor | m_cInitColor |
Definition at line 24 of file led_entity.h.
typedef std::vector<CLEDEntity*> argos::CLEDEntity::TList |
Definition at line 30 of file led_entity.h.
typedef CSet<CLEDEntity*> argos::CLEDEntity::TSet |
Definition at line 31 of file led_entity.h.
argos::CLEDEntity::CLEDEntity | ( | CComposableEntity * | pc_parent | ) |
Definition at line 16 of file led_entity.cpp.
argos::CLEDEntity::CLEDEntity | ( | CComposableEntity * | pc_parent, |
const std::string & | str_id, | ||
const CVector3 & | c_position, | ||
const CColor & | c_color | ||
) |
Definition at line 22 of file led_entity.cpp.
virtual argos::CLEDEntity::~CLEDEntity | ( | ) | [inline, virtual] |
Definition at line 42 of file led_entity.h.
void argos::CLEDEntity::AddToMedium | ( | CLEDMedium & | c_medium | ) |
Adds the LEDs to the wanted LED medium.
c_medium | The LED medium. |
Definition at line 66 of file led_entity.cpp.
Reimplemented from argos::CPositionalEntity.
Reimplemented in argos::CLightEntity.
const CColor& argos::CLEDEntity::GetColor | ( | ) | const [inline] |
Returns the current color of the LED.
Definition at line 56 of file led_entity.h.
const CColor& argos::CLEDEntity::GetInitColor | ( | ) | const [inline] |
Returns the color with which the LED was initialized.
When the simulation is reset, the LED color is set to this value.
Definition at line 67 of file led_entity.h.
virtual std::string argos::CLEDEntity::GetTypeDescription | ( | ) | const [inline, virtual] |
Returns a string label for this class.
Reimplemented from argos::CPositionalEntity.
Reimplemented in argos::CLightEntity.
Definition at line 91 of file led_entity.h.
void argos::CLEDEntity::Init | ( | TConfigurationNode & | t_tree | ) | [virtual] |
Initializes the state of the entity from the XML configuration tree.
If the id of the entity has not been set yet, this method sets an id for the entity. If the entity has no parent, this method parses the passed XML tree and looks for the id
attribute, setting its value as id. If, instead, this entity has a parent, the id is set as GetParent().GetId() + "." + GetTypeDescription()
.
CARGoSException | if a parse error occurred |
Reimplemented from argos::CPositionalEntity.
Reimplemented in argos::CLightEntity.
Definition at line 33 of file led_entity.cpp.
void argos::CLEDEntity::RemoveFromMedium | ( | CLEDMedium & | c_medium | ) |
Removes the LEDs from the wanted LED medium.
c_medium | The LED medium. |
Definition at line 73 of file led_entity.cpp.
void argos::CLEDEntity::Reset | ( | ) | [virtual] |
Resets the state of the entity to whatever it was after Init() or the standalone constructor was called.
The default implementation of this method does nothing.
Reimplemented from argos::CPositionalEntity.
Definition at line 48 of file led_entity.cpp.
void argos::CLEDEntity::SetColor | ( | const CColor & | c_color | ) | [inline] |
Sets the current color of the LED.
c_color | the wanted color. |
Definition at line 76 of file led_entity.h.
void argos::CLEDEntity::SetEnabled | ( | bool | b_enabled | ) | [virtual] |
Enables or disables an entity.
b_enabled | true if the entity is enabled, false otherwise |
Reimplemented from argos::CEntity.
Definition at line 56 of file led_entity.cpp.
void argos::CLEDEntity::SetInitColor | ( | const CColor & | c_color | ) | [inline] |
Sets the initialization color for this LED.
When the simulation is reset, the LED color is set to this value.
c_color | the initialization color for this LED. |
Definition at line 87 of file led_entity.h.
CColor argos::CLEDEntity::m_cColor [protected] |
Definition at line 111 of file led_entity.h.
CColor argos::CLEDEntity::m_cInitColor [protected] |
Definition at line 112 of file led_entity.h.