]> pilppa.org Git - libplp.git/blobdiff - src/SensorDevice.hh
Data read optimizations
[libplp.git] / src / SensorDevice.hh
index 80c02dfbe2d08f0de965c86c48138f5a96bead1c..852c8706316956ffd68729abdfbf553c6e96e081 100644 (file)
 
 #include <string>
 
+#include "DataReader.hh"
 #include "Device.hh"
 
+using namespace plp;
+
 namespace plp {
+       /**
+        * This class defines methods for Device which can return and collect data.
+        */
        class SensorDevice : public Device {
                public:
                        SensorDevice(std::string id_param, std::string type_param) : Device(id_param, type_param) {}
-                       virtual std::string get_unit() = 0;
+                       virtual ~SensorDevice() {}
+                       /*
+                        * Returns DataReader class for the device.
+                        */
+                       virtual const DataReader *get_datareader() = 0;
+                       /**
+                        * Returns the unit used by the device data.
+                        */
+                       virtual string get_unit() = 0;
+                       /*
+                        * Returns latest data that is available for the device.
+                        */
                        virtual plp::Data *get_data() = 0;
        };
 }