ARGoS
3
A parallel, multi-engine simulator for swarm robotics
|
Go to the documentation of this file.
8 #include <argos3/core/simulator/simulator.h>
9 #include <argos3/core/simulator/space/space.h>
10 #include <argos3/plugins/simulator/media/led_medium.h>
27 const std::string& str_id,
32 m_cInitColor(c_color),
127 c_space_hash.
UpdateCell(m_nI, m_nJ, m_nK, c_element);
145 m_cGrid.PositionToCell(m_nI, m_nJ, m_nK, c_entity.
GetPosition());
147 m_cGrid.UpdateCell(m_nI, m_nJ, m_nK, c_entity);
virtual void Destroy()
Destroys the entity, undoing whatever was done by Init() or by the standalone constructor.
const CColor & GetColor() const
Returns the current color of the LED.
The abstract definition of a space hash.
CLEDEntityGridUpdater(CGrid< CLEDEntity > &c_grid)
const std::string & GetId() const
Returns the id of this entity.
The namespace containing all the ARGoS related code.
Basic class for an entity that contains other entities.
The exception that wraps all errors in ARGoS.
virtual void Init(TConfigurationNode &t_tree)
Initializes the state of the entity from the XML configuration tree.
virtual void UpdateCell(SInt32 n_x, SInt32 n_y, SInt32 n_z, ENTITY &c_entity)=0
Adds an entity to a cell of the space hash.
void Enable()
Enables the entity.
void SetColor(const CColor &c_color)
Sets the current color of the LED.
REGISTER_STANDARD_SPACE_OPERATIONS_ON_ENTITY(CEntity)
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
void RemoveFromMedium()
Removes the LEDs from the wanted LED medium.
const CVector3 & GetPosition() const
bool HasMedium() const
Returns true if this LED is associated to a medium.
CLEDEntity(CComposableEntity *pc_parent)
#define THROW_ARGOSEXCEPTION_NESTED(message, nested)
This macro throws an ARGoS exception with the passed message and nesting the passed exception.
#define THROW_ARGOSEXCEPTION(message)
This macro throws an ARGoS exception with the passed message.
virtual void SetEnabled(bool b_enabled)
Enables or disables an entity.
virtual SInt32 SpaceToHashTable(Real f_coord, UInt32 un_axis)
Converts a single space coordinate into a space hash cell coordinate.
void AddEntity(CLEDEntity &c_entity)
Adds the specified entity to the list of managed entities.
void Disable()
Disables the entity.
void GetNodeAttribute(TConfigurationNode &t_node, const std::string &str_attribute, T &t_buffer)
Returns the value of a node's attribute.
std::string GetContext() const
Returns the context of this entity.
void AddToMedium(CLEDMedium &c_medium)
Adds the LEDs to the wanted LED medium.
virtual void SetEnabled(bool b_enabled)
Enables or disables an entity.
virtual void Init(TConfigurationNode &t_tree)
Initializes the state of the entity from the XML configuration tree.
CLEDMedium & GetMedium() const
Returns the medium associated to this LED.
void RemoveEntity(CLEDEntity &c_entity)
Removes the specified entity from the list of managed entities.
virtual bool operator()(CLEDEntity &c_entity)
virtual void Reset()
Resets the state of the entity to whatever it was after Init() or the standalone constructor was call...
virtual void operator()(CAbstractSpaceHash< CLEDEntity > &c_space_hash, CLEDEntity &c_element)
Updates the necessary cells of a space hash.