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/utility/logging/argos_log.h>
10 #include <argos3/plugins/simulator/media/led_medium.h>
18 m_pcLEDEquippedEntity(NULL) {}
34 std::string strMedium;
72 "Carlo Pinciroli [ilpincy@gmail.com]",
75 "This actuator controls a group of LEDs. For a complete description of its\n"
76 "usage, refer to the ci_leds_actuator.h file.\n\n"
77 "REQUIRED XML CONFIGURATION\n\n"
80 " <my_controller ...>\n"
84 " <leds implementation=\"default\"\n"
85 " medium=\"leds\" />\n"
92 "The 'medium' attribute sets the id of the LED medium declared in the <media>\n"
94 "OPTIONAL XML CONFIGURATION\n\n"
static CSimulator & GetInstance()
Returns the instance to the CSimulator class.
The namespace containing all the ARGoS related code.
void SetAllLEDsColors(const CColor &c_color)
Sets the color of all the LEDs to the same value.
Basic class for an entity that contains other entities.
The exception that wraps all errors in ARGoS.
CEntity & GetComponent(const std::string &str_component)
Returns the component with the passed string label.
virtual void Update()
Updates the state of the entity associated to this actuator.
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
A container of CLEDEntity.
#define THROW_ARGOSEXCEPTION_NESTED(message, nested)
This macro throws an ARGoS exception with the passed message and nesting the passed exception.
virtual void Destroy()
Destroys the actuator.
void AddToMedium(CLEDMedium &c_medium)
Adds the LEDs to the wanted LED medium.
SActuator::TList & GetLEDs()
Returns all the LEDs.
REGISTER_ACTUATOR(CLEDsDefaultActuator, "leds", "default", "Carlo Pinciroli [ilpincy@gmail.com]", "1.0", "The LEDs actuator.", "This actuator controls a group of LEDs. For a complete description of its\n" "usage, refer to the ci_leds_actuator.h file.\n\n" "REQUIRED XML CONFIGURATION\n\n" " <controllers>\n" " ...\n" " <my_controller ...>\n" " ...\n" " <actuators>\n" " ...\n" " <leds implementation=\"default\"\n" " medium=\"leds\" />\n" " ...\n" " </actuators>\n" " ...\n" " </my_controller>\n" " ...\n" " </controllers>\n\n" "The 'medium' attribute sets the id of the LED medium declared in the <media>\n" "XML section.\n\n" "OPTIONAL XML CONFIGURATION\n\n" "None.\n", "Usable")
void GetNodeAttribute(TConfigurationNode &t_node, const std::string &str_attribute, T &t_buffer)
Returns the value of a node's attribute.
virtual void SetAllColors(const CColor &c_color)
Sets the color of the whole LED ring.
virtual void SetRobot(CComposableEntity &c_entity)
Sets the entity associated to this actuator.
virtual void Reset()
Resets the actuator to the state it had just after Init().
virtual void Init(TConfigurationNode &t_node)
Initializes the actuator from the XML configuration tree.
T & GetMedium(const std::string &str_id)
Returns a reference to a medium.
void RemoveFromMedium()
Removes the LEDs from the associated LED medium.
virtual void Init(TConfigurationNode &t_tree)
Initializes the actuator from the XML configuration tree.