7 #ifndef LED_EQUIPPED_ENTITY_H
8 #define LED_EQUIPPED_ENTITY_H
11 class CLEDEquippedEntity;
15 #include <argos3/core/simulator/entity/composable_entity.h>
16 #include <argos3/plugins/simulator/entities/led_entity.h>
42 typedef std::map<std::string, CLEDEquippedEntity*>
TMap;
47 typedef std::vector<SActuator*>
TList;
72 const std::string& str_id);
138 "CLEDEquippedEntity::GetLEDOffset() : index " <<
140 " out of bounds [0:" <<
143 return m_tLEDs[un_idx]->Offset;
CLEDEntity & GetLED(UInt32 un_index)
Returns an LED by numeric index.
virtual void Init(TConfigurationNode &t_tree)
Initializes the state of the entity from the XML configuration tree.
float Real
Collects all ARGoS code.
void AddLED(const CVector3 &c_offset, SAnchor &s_anchor, const CColor &c_color=CColor::BLACK)
Adds an LED to this entity.
virtual std::string GetTypeDescription() const
Returns a string label for this class.
void AddLEDRing(const CVector3 &c_center, Real f_radius, const CRadians &c_start_angle, UInt32 un_num_leds, SAnchor &s_anchor, const CColor &c_color=CColor::BLACK)
Adds a ring of LEDs to this entity.
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
std::vector< SActuator * > TList
It defines the basic type CRadians, used to store an angle value in radians.
void SetMedium(CLEDMedium &c_medium)
Sets the medium associated to this entity.
~CLEDEquippedEntity()
Class destructor.
std::map< std::string, CLEDEquippedEntity * > TMap
virtual void UpdateComponents()
Calls the Update() method on all the components.
#define ARGOS_ASSERT(condition, message)
When code is compiled in debug, this macro throws an ARGoS exception with the passed message if the s...
unsigned int UInt32
32-bit unsigned integer.
A container of CLEDEntity.
Basic class for an entity that contains other entities.
An anchor related to the body of an entity.
const CVector3 & GetLEDOffset(size_t un_idx) const
Returns the offset position of the given LED.
virtual void Reset()
Resets the state of the entity to whatever it was after Init() or the standalone constructor was call...
void SetLEDOffset(UInt32 un_index, const CVector3 &c_offset)
Sets the position of an LED.
CLEDEquippedEntity(CComposableEntity *pc_parent)
Class constructor.
SActuator::TList & GetLEDs()
Returns all the LEDs.
void SetLEDColor(UInt32 un_index, const CColor &c_color)
Sets the color of an LED.
SActuator::TList m_tLEDs
List of the LEDs managed by this entity.
void SetAllLEDsColors(const CColor &c_color)
Sets the color of all the LEDs to the same value.
The namespace containing all the ARGoS related code.
SActuator(CLEDEntity &c_led, const CVector3 &c_offset, SAnchor &s_anchor)