]> pilppa.org Git - libplp.git/blob - src/SensorDevice.hh
Data read optimizations
[libplp.git] / src / SensorDevice.hh
1 /*
2  * DeviceTypeSensor.hh
3  *
4  *  Created on: Feb 28, 2011
5  *      Author: lamikr
6  */
7
8 #ifndef DEVICETYPESENSOR_HH_
9 #define DEVICETYPESENSOR_HH_
10
11 #include <string>
12
13 #include "DataReader.hh"
14 #include "Device.hh"
15
16 using namespace plp;
17
18 namespace plp {
19         /**
20          * This class defines methods for Device which can return and collect data.
21          */
22         class SensorDevice : public Device {
23                 public:
24                         SensorDevice(std::string id_param, std::string type_param) : Device(id_param, type_param) {}
25                         virtual ~SensorDevice() {}
26                         /*
27                          * Returns DataReader class for the device.
28                          */
29                         virtual const DataReader *get_datareader() = 0;
30                         /**
31                          * Returns the unit used by the device data.
32                          */
33                         virtual string get_unit() = 0;
34                         /*
35                          * Returns latest data that is available for the device.
36                          */
37                         virtual plp::Data *get_data() = 0;
38         };
39 }
40
41 #endif /* DEVICETYPESENSOR_HH_ */