ARGoS 3
A parallel, multi-engine simulator for swarm robotics
ci_controller.cpp
Go to the documentation of this file.
1
7#include "ci_controller.h"
8
9namespace argos {
10
11 /****************************************/
12 /****************************************/
13
15 /* Delete actuators*/
16 for(auto itActuators = m_mapActuators.begin();
17 itActuators != m_mapActuators.end();
18 ++itActuators) {
19 delete itActuators->second;
20 }
21 m_mapActuators.clear();
22
23 /* Delete sensors */
24 for(auto itSensors = m_mapSensors.begin();
25 itSensors != m_mapSensors.end();
26 ++itSensors) {
27 delete itSensors->second;
28 }
29 m_mapSensors.clear();
30 }
31
32 /****************************************/
33 /****************************************/
34
35 bool CCI_Controller::HasActuator(const std::string& str_actuator_type) const {
36 auto it = m_mapActuators.find(str_actuator_type);
37 return (it != m_mapActuators.end());
38 }
39
40 /****************************************/
41 /****************************************/
42
43 bool CCI_Controller::HasSensor(const std::string& str_sensor_type) const {
44 auto it = m_mapSensors.find(str_sensor_type);
45 return (it != m_mapSensors.end());
46 }
47
48 /****************************************/
49 /****************************************/
50
51}
The namespace containing all the ARGoS related code.
Definition ci_actuator.h:12
bool HasSensor(const std::string &str_sensor_type) const
Returns true if an sensor with the passed type is associated to this controller.
CCI_Sensor::TMap m_mapSensors
A map containing all the sensors associated to this controller.
virtual ~CCI_Controller()
Class destructor.
bool HasActuator(const std::string &str_actuator_type) const
Returns true if an actuator with the passed type is associated to this controller.
CCI_Actuator::TMap m_mapActuators
A map containing all the actuators associated to this controller.