battery_default_sensor.h
Go to the documentation of this file.
1 
7 #ifndef BATTERY_DEFAULT_SENSOR_H
8 #define BATTERY_DEFAULT_SENSOR_H
9 
10 #include <string>
11 #include <map>
12 
13 namespace argos {
14  class CBatteryDefaultSensor;
15  class CBatteryEquippedEntity;
16  class CPhysicsEngine;
17 }
18 
19 #include <argos3/plugins/robots/generic/control_interface/ci_battery_sensor.h>
20 #include <argos3/core/utility/math/range.h>
21 #include <argos3/core/utility/math/rng.h>
22 #include <argos3/core/simulator/space/space.h>
23 #include <argos3/core/simulator/sensor.h>
24 
25 namespace argos {
26 
28  public CCI_BatterySensor {
29 
30  public:
31 
33 
35 
36  virtual void SetRobot(CComposableEntity& c_entity);
37 
38  virtual void Init(TConfigurationNode& t_tree);
39 
40  virtual void Update();
41 
42  virtual void Reset();
43 
44  protected:
45 
48 
51 
54 
57 
60  };
61 
62 }
63 
64 #endif
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
Basic class for an entity that contains other entities.
This entity is a link to a body in the physics engine.
The basic interface for a simulated sensor.
Definition: sensor.h:24
The RNG.
Definition: rng.h:90
CBatteryEquippedEntity * m_pcBatteryEntity
Reference to battery sensor equipped entity associated to this sensor.
virtual void Reset()
Resets the sensor to the state it had just after Init().
virtual void Init(TConfigurationNode &t_tree)
Initializes the sensor from the XML configuration tree.
CRange< Real > m_cNoiseRange
Noise range on battery level.
CEmbodiedEntity * m_pcEmbodiedEntity
Reference to embodied entity associated to this sensor.
bool m_bAddNoise
Whether to add noise or not.
CRandom::CRNG * m_pcRNG
Random number generator.
virtual void SetRobot(CComposableEntity &c_entity)
Sets the entity associated to this sensor.
virtual void Update()
Updates the state of the entity associated to this sensor, if the sensor is currently enabled.