Cleaning up drivers/Cpp, Cpp/Lifxtest, virtuals, and iotrmi/C++ (revisiting the C...
[iot2.git] / benchmarks / drivers / Cpp / LifxLightBulb / LightBulb_Skeleton.hpp
1 #ifndef _LIGHTBULB_SKELETON_HPP__
2 #define _LIGHTBULB_SKELETON_HPP__
3 #include <iostream>
4 #include "LightBulb.hpp"
5
6 #include <vector>
7 #include <set>
8 #include "IoTRMIComm.hpp"
9 #include "IoTRMICommClient.hpp"
10 #include "IoTRMICommServer.hpp"
11
12 using namespace std;
13
14 class LightBulb_Skeleton : public LightBulb
15 {
16         private:
17
18         LightBulb *mainObj;
19         IoTRMIComm *rmiComm;
20         char* methodBytes;
21         int methodLen;
22         int objectId = 1;
23         static set<int> set0Allowed;
24         // Synchronization variables
25         bool methodReceived = false;
26         bool didAlreadyInitWaitInvoke = false;
27
28         public:
29
30         LightBulb_Skeleton();
31         LightBulb_Skeleton(LightBulb*_mainObj, int _portSend, int _portRecv);
32         LightBulb_Skeleton(LightBulb*_mainObj, IoTRMIComm *rmiComm, int _objectId);
33         ~LightBulb_Skeleton();
34         bool didInitWaitInvoke();
35         void init();
36         void turnOff();
37         void turnOn();
38         bool getState();
39         void setColor(double _hue, double _saturation, double _brightness);
40         void setTemperature(int _temperature);
41         double getBrightness();
42         double getHue();
43         double getSaturation();
44         int getTemperature();
45         double getBrightnessRangeLowerBound();
46         double getBrightnessRangeUpperBound();
47         double getHueRangeLowerBound();
48         double getHueRangeUpperBound();
49         double getSaturationRangeLowerBound();
50         double getSaturationRangeUpperBound();
51         int getTemperatureRangeLowerBound();
52         int getTemperatureRangeUpperBound();
53         void ___init(LightBulb_Skeleton* skel);
54         void ___turnOff(LightBulb_Skeleton* skel);
55         void ___turnOn(LightBulb_Skeleton* skel);
56         void ___getState(LightBulb_Skeleton* skel);
57         void ___setColor(LightBulb_Skeleton* skel);
58         void ___setTemperature(LightBulb_Skeleton* skel);
59         void ___getBrightness(LightBulb_Skeleton* skel);
60         void ___getHue(LightBulb_Skeleton* skel);
61         void ___getSaturation(LightBulb_Skeleton* skel);
62         void ___getTemperature(LightBulb_Skeleton* skel);
63         void ___getBrightnessRangeLowerBound(LightBulb_Skeleton* skel);
64         void ___getBrightnessRangeUpperBound(LightBulb_Skeleton* skel);
65         void ___getHueRangeLowerBound(LightBulb_Skeleton* skel);
66         void ___getHueRangeUpperBound(LightBulb_Skeleton* skel);
67         void ___getSaturationRangeLowerBound(LightBulb_Skeleton* skel);
68         void ___getSaturationRangeUpperBound(LightBulb_Skeleton* skel);
69         void ___getTemperatureRangeLowerBound(LightBulb_Skeleton* skel);
70         void ___getTemperatureRangeUpperBound(LightBulb_Skeleton* skel);
71         void ___waitRequestInvokeMethod(LightBulb_Skeleton* skel);
72 };
73 set<int> LightBulb_Skeleton::set0Allowed { 2, 6, 1, 3, 4, 8, 0, 5, 7, 9 };
74 #endif