#ifndef F49794A5_C3E3_4955_B9B2_6BAA267D3436 #define F49794A5_C3E3_4955_B9B2_6BAA267D3436 /* ******************************************************************************* * INCLUDE ******************************************************************************* */ #include #include #include namespace Hardware { /* ******************************************************************************* * CLASS DECLARE ******************************************************************************* */ class Sensor { public: using Ptr = Poco::SharedPtr; enum Type { TEMPERATURE, }; public: Sensor(Type type); virtual ~Sensor(); public: virtual void read(float& value); virtual void read(float values[]); Type type(); private: Type _type; }; class SensorManager { public: static Sensor& getDefaultSensor(Sensor::Type type); static void registerSensor(Sensor::Type type, Sensor::Ptr pSensor); private: using SensorList = std::vector; using SensorCollection = std::map; private: static SensorCollection _sensorCollection; }; } #endif