ci_battery_sensor.h
Go to the documentation of this file.
1 
7 #ifndef CCI_BATTERY_SENSOR_H
8 #define CCI_BATTERY_SENSOR_H
9 
10 namespace argos {
11  class CCI_BatterySensor;
12 }
13 
14 #include <argos3/core/control_interface/ci_sensor.h>
15 #include <limits>
16 
17 namespace argos {
18 
19  class CCI_BatterySensor : public CCI_Sensor {
20 
21  public:
22 
23  struct SReading {
28 
30  AvailableCharge(1.0),
31  TimeLeft(std::numeric_limits<Real>::infinity()) {}
32  };
33 
34  public:
35 
36  virtual ~CCI_BatterySensor() {}
37 
38  const SReading& GetReading() const;
39 
40 #ifdef ARGOS_WITH_LUA
41  virtual void CreateLuaState(lua_State* pt_lua_state);
42 
43  virtual void ReadingsToLuaState(lua_State* pt_lua_state);
44 #endif
45 
46  protected:
47 
49  };
50 
51 }
52 
53 #endif
The basic interface for all sensors.
Definition: ci_sensor.h:34
Real TimeLeft
Time left in seconds.
const SReading & GetReading() const
STL namespace.
Real AvailableCharge
Available charge, between 0 and 1.
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12
float Real
Collects all ARGoS code.
Definition: datatypes.h:39