ARGoS  3
A parallel, multi-engine simulator for swarm robotics
ci_eyebot_light_sensor.h
Go to the documentation of this file.
1 
32 #ifndef CCI_EYEBOT_LIGHT_SENSOR_H
33 #define CCI_EYEBOT_LIGHT_SENSOR_H
34 
35 namespace argos {
36  class CCI_EyeBotLightSensor;
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_EyeBotLightSensor::SReading& s_reading);
90  std::ostream& operator<<(std::ostream& c_os, const CCI_EyeBotLightSensor::TReadings& t_readings);
91 
92 }
93 
94 #endif
argos
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12
argos::CRadians
It defines the basic type CRadians, used to store an angle value in radians.
Definition: angles.h:42
argos::CCI_EyeBotLightSensor::SReading::SReading
SReading(Real f_value, const CRadians &c_angle)
Definition: ci_eyebot_light_sensor.h:60
argos::CCI_EyeBotLightSensor::m_tReadings
TReadings m_tReadings
Definition: ci_eyebot_light_sensor.h:86
argos::CCI_EyeBotLightSensor
Definition: ci_eyebot_light_sensor.h:45
argos::CCI_Sensor
The basic interface for all sensors.
Definition: ci_sensor.h:34
argos::CCI_EyeBotLightSensor::CCI_EyeBotLightSensor
CCI_EyeBotLightSensor()
Definition: ci_eyebot_light_sensor.cpp:24
argos::operator<<
std::ostream & operator<<(std::ostream &c_os, const CByteArray &c_byte_array)
Definition: byte_array.cpp:530
argos::CCI_EyeBotLightSensor::SReading::SReading
SReading()
Definition: ci_eyebot_light_sensor.h:57
argos::CCI_EyeBotLightSensor::SReading
The DTO of the light sensor.
Definition: ci_eyebot_light_sensor.h:53
argos::CCI_EyeBotLightSensor::SReading::Value
Real Value
Definition: ci_eyebot_light_sensor.h:54
argos::CCI_EyeBotLightSensor::SReading::Angle
CRadians Angle
Definition: ci_eyebot_light_sensor.h:55
argos::CCI_EyeBotLightSensor::GetReadings
const TReadings & GetReadings() const
Returns the readings of this sensor.
Definition: ci_eyebot_light_sensor.cpp:35
argos::CCI_EyeBotLightSensor::~CCI_EyeBotLightSensor
virtual ~CCI_EyeBotLightSensor()
Definition: ci_eyebot_light_sensor.h:71
Real
float Real
Collects all ARGoS code.
Definition: datatypes.h:39
argos::CCI_EyeBotLightSensor::TReadings
std::vector< SReading > TReadings
Definition: ci_eyebot_light_sensor.h:66