ci_footbot_light_sensor.h
Go to the documentation of this file.
1 
32 #ifndef CCI_FOOTBOT_LIGHT_SENSOR_H
33 #define CCI_FOOTBOT_LIGHT_SENSOR_H
34 
35 namespace argos {
36  class CCI_FootBotLightSensor;
37 }
38 
39 #include <argos3/core/control_interface/ci_sensor.h>
40 #include <argos3/core/utility/math/angles.h>
41 #include <vector>
42 
43 namespace argos {
44 
46 
47  public:
48 
53  struct SReading {
56 
58  Value(0.0f) {}
59 
60  SReading(Real f_value,
61  const CRadians& c_angle) :
62  Value(f_value),
63  Angle(c_angle) {}
64  };
65 
66  typedef std::vector<SReading> TReadings;
67 
68  public:
69 
72 
76  const TReadings& GetReadings() const;
77 
78 #ifdef ARGOS_WITH_LUA
79  virtual void CreateLuaState(lua_State* pt_lua_state);
80 
81  virtual void ReadingsToLuaState(lua_State* pt_lua_state);
82 #endif
83 
84  protected:
85 
87  };
88 
89  std::ostream& operator<<(std::ostream& c_os, const CCI_FootBotLightSensor::SReading& s_reading);
90  std::ostream& operator<<(std::ostream& c_os, const CCI_FootBotLightSensor::TReadings& t_readings);
91 
92 }
93 
94 #endif
float Real
Collects all ARGoS code.
Definition: datatypes.h:39
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12
std::ostream & operator<<(std::ostream &c_os, const CByteArray &c_byte_array)
Definition: byte_array.cpp:530
The basic interface for all sensors.
Definition: ci_sensor.h:34
It defines the basic type CRadians, used to store an angle value in radians.
Definition: angles.h:42
const TReadings & GetReadings() const
Returns the readings of this sensor.
SReading(Real f_value, const CRadians &c_angle)