Warning: include(php/utility.php): Failed to open stream: No such file or directory in /home/argos/argos3/doc/api/embedded/a00672_source.php on line 2

Warning: include(): Failed opening 'php/utility.php' for inclusion (include_path='.:/usr/lib64/php') in /home/argos/argos3/doc/api/embedded/a00672_source.php on line 2
The ARGoS Website

directional_leds_default_actuator.cpp
Go to the documentation of this file.
1 
8 #include <argos3/core/simulator/simulator.h>
9 #include <argos3/plugins/simulator/media/directional_led_medium.h>
10 
11 namespace argos {
12 
13  /****************************************/
14  /****************************************/
15 
17  m_pcDirectionalLEDEquippedEntity(nullptr) {}
18 
19  /****************************************/
20  /****************************************/
21 
23  m_pcDirectionalLEDEquippedEntity =
24  &(c_entity.GetComponent<CDirectionalLEDEquippedEntity>("directional_leds"));
25  m_tSettings.resize(m_pcDirectionalLEDEquippedEntity->GetInstances().size());
26  }
27 
28  /****************************************/
29  /****************************************/
30 
32  try {
34  }
35  catch(CARGoSException& ex) {
36  THROW_ARGOSEXCEPTION_NESTED("Error initializing the directional LEDs default actuator", ex);
37  }
38  }
39 
40  /****************************************/
41  /****************************************/
42 
44  m_pcDirectionalLEDEquippedEntity->SetLEDColors(m_tSettings);
45  }
46 
47  /****************************************/
48  /****************************************/
49 
52  }
53 
54  /****************************************/
55  /****************************************/
56 
58  "directional_leds", "default",
59  "Michael Allwright [allsey87@gmail.com]",
60  "1.0",
61  "The directional LEDs actuator.",
62  "This actuator controls a group of directional LEDs. For a complete description\n"
63  "of its usage, refer to the ci_leds_actuator.h file.\n\n"
64  "REQUIRED XML CONFIGURATION\n\n"
65  " <controllers>\n"
66  " ...\n"
67  " <my_controller ...>\n"
68  " ...\n"
69  " <actuators>\n"
70  " ...\n"
71  " <leds implementation=\"default\" />\n"
72  " ...\n"
73  " </actuators>\n"
74  " ...\n"
75  " </my_controller>\n"
76  " ...\n"
77  " </controllers>\n\n"
78  "The 'medium' attribute sets the id of the LED medium declared in the <media>\n"
79  "XML section.\n\n"
80  "OPTIONAL XML CONFIGURATION\n\n"
81  "None.\n",
82  "Usable"
83  );
84 
85  /****************************************/
86  /****************************************/
87 
88 }
static CColor BLACK
Definition: color.h:29
REGISTER_ACTUATOR(CFootBotDistanceScannerDefaultActuator,"footbot_distance_scanner","default","Carlo Pinciroli [ilpincy@gmail.com]","1.0","The foot-bot distance scanner actuator.","This actuator controls the foot-bot distance scanner. For a complete\n""description of its usage, refer to the ci_footbot_distance_scanner_actuator\n""file.\n\n""REQUIRED XML CONFIGURATION\n\n"" <controllers>\n"" ...\n"" <my_controller ...>\n"" ...\n"" <actuators>\n"" ...\n"" <footbot_distance_scanner implementation=\"default\" />\n"" ...\n"" </actuators>\n"" ...\n"" </my_controller>\n"" ...\n"" </controllers>\n\n""OPTIONAL XML CONFIGURATION\n\n""None for the time being.\n","Usable")
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
virtual void Update()
Updates the state of the entity associated to this actuator.
#define THROW_ARGOSEXCEPTION_NESTED(message, nested)
This macro throws an ARGoS exception with the passed message and nesting the passed exception...
virtual void Init(TConfigurationNode &t_tree)
Initializes the actuator from the XML configuration tree.
virtual void Init(TConfigurationNode &t_node)
Initializes the actuator from the XML configuration tree.
Definition: ci_actuator.h:54
Basic class for an entity that contains other entities.
virtual void SetAllColors(const CColor &c_color)
Sets the color of the whole LED ring.
void SetLEDColors(const CColor &c_color)
Sets the color of all the LEDs to the same value.
virtual void Reset()
Resets the actuator to the state it had just after Init().
The exception that wraps all errors in ARGoS.
virtual void SetRobot(CComposableEntity &c_entity)
Sets the entity associated to this actuator.
A container of CDirectionalLEDEntity.
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12
SInstance::TVector & GetInstances()
Returns all the LEDs.
CEntity & GetComponent(const std::string &str_component)
Returns the component with the passed string label.