ARGoS  3
A parallel, multi-engine simulator for swarm robotics
plugins/robots/foot-bot/control_interface/ci_footbot_light_sensor.h
Go to the documentation of this file.
00001 
00032 #ifndef CCI_FOOTBOT_LIGHT_SENSOR_H
00033 #define CCI_FOOTBOT_LIGHT_SENSOR_H
00034 
00035 namespace argos {
00036    class CCI_FootBotLightSensor;
00037 }
00038 
00039 #include <argos3/core/control_interface/ci_sensor.h>
00040 #include <argos3/core/utility/math/angles.h>
00041 #include <vector>
00042 
00043 namespace argos {
00044 
00045    class CCI_FootBotLightSensor : public CCI_Sensor {
00046 
00047    public:
00048 
00053       struct SReading {
00054          Real Value;
00055          CRadians Angle;
00056 
00057          SReading() :
00058             Value(0.0f) {}
00059 
00060          SReading(Real f_value,
00061                   const CRadians& c_angle) :
00062             Value(f_value),
00063             Angle(c_angle) {}
00064       };
00065 
00066       typedef std::vector<SReading> TReadings;
00067 
00068    public:
00069 
00070       CCI_FootBotLightSensor();
00071       virtual ~CCI_FootBotLightSensor() {}
00072 
00076       inline const TReadings& GetReadings() const {
00077          return m_tReadings;
00078       }
00079 
00080 #ifdef ARGOS_WITH_LUA
00081       virtual void CreateLuaState(lua_State* pt_lua_state);
00082 
00083       virtual void ReadingsToLuaState(lua_State* pt_lua_state);
00084 #endif
00085 
00086    protected:
00087 
00088       TReadings m_tReadings;
00089    };
00090 
00091    std::ostream& operator<<(std::ostream& c_os, const CCI_FootBotLightSensor::SReading& s_reading);
00092    std::ostream& operator<<(std::ostream& c_os, const CCI_FootBotLightSensor::TReadings& t_readings);
00093 
00094 }
00095 
00096 #endif