ci_sensor.h
Go to the documentation of this file.
1 
9 #ifndef CI_SENSOR_H
10 #define CI_SENSOR_H
11 
12 namespace argos {
13  class CCI_Sensor;
14 }
15 
16 #include <argos3/core/config.h>
17 #include <argos3/core/utility/datatypes/datatypes.h>
18 #include <argos3/core/utility/configuration/base_configurable_resource.h>
19 #include <map>
20 
21 #ifdef ARGOS_WITH_LUA
22 extern "C" {
23 #include <lua.h>
24 #include <lualib.h>
25 #include <lauxlib.h>
26 }
27 #endif
28 
29 namespace argos {
30 
35 
36  public:
37 
38  typedef std::map<std::string, CCI_Sensor*, std::less<std::string> > TMap;
39 
40  public:
41 
45  virtual ~CCI_Sensor() {}
46 
54  virtual void Init(TConfigurationNode& t_node) {}
55 
62  virtual void Reset() {}
63 
71  virtual void Destroy() {}
72 
73 #ifdef ARGOS_WITH_LUA
74 
80  virtual void CreateLuaState(lua_State* pt_lua_state) = 0;
81 
87  virtual void ReadingsToLuaState(lua_State* pt_lua_state) = 0;
88 #endif
89 
90  };
91 
92 }
93 
94 #endif
virtual void Reset()
Resets the sensor to the state it had just after Init().
Definition: ci_sensor.h:62
virtual ~CCI_Sensor()
Class destructor.
Definition: ci_sensor.h:45
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
The basic interface for all sensors.
Definition: ci_sensor.h:34
virtual void Init(TConfigurationNode &t_node)
Initializes the sensor from the XML configuration tree.
Definition: ci_sensor.h:54
std::map< std::string, CCI_Sensor *, std::less< std::string > > TMap
Definition: ci_sensor.h:38
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12
This class is the base of all XML-configurable ARGoS interface.
virtual void Destroy()
Destroys the sensor.
Definition: ci_sensor.h:71