Preparing Lifxtest as a test benchmark; making adjustments in IoTSet for C++, etc.
[iot2.git] / benchmarks / virtuals / LightBulbTest.hpp
1 #ifndef _LIGHTBULBTEST_HPP__
2 #define _LIGHTBULBTEST_HPP__
3 #include <iostream>
4 #include <sstream>
5 #include <vector>
6 #include <set>
7 #include "IoTRMICall.hpp"
8 #include "IoTRMIObject.hpp"
9
10 using namespace std;
11
12 class LightBulbTest
13 {
14         public:
15         virtual void turnOn() = 0;
16         virtual double getBrightness() = 0;
17         virtual void turnOff() = 0;
18         virtual bool getState() = 0;
19         virtual void setColor(double _hue, double _saturation, double _brightness) = 0;
20         virtual double getSaturation() = 0;
21         virtual void init() = 0;
22         virtual void setTemperature(int _temperature) = 0;
23         virtual double getHue() = 0;
24         virtual int getTemperature() = 0;
25
26         // Custom hasher for LightBulbTest iterator
27         size_t hash(LightBulbTest const& device) const {
28
29                 // Use device address for hashing
30                 std::stringstream ss;
31                 ss << &device;
32                 std::hash<std::string> hashVal;
33                 return hashVal(ss.str());
34         }
35 };
36 #endif