1 #ifndef _LIGHTBULBTEST_STUB_HPP__
2 #define _LIGHTBULBTEST_STUB_HPP__
4 #include "LightBulbTest.hpp"
8 class LightBulbTest_Stub : public LightBulbTest
13 string callbackAddress;
16 const static int objectId = 0;
21 LightBulbTest_Stub() { }
23 LightBulbTest_Stub(int _port, const char* _skeletonAddress, string _callbackAddress, int _rev, bool* _bResult, vector<int> _ports) {
24 callbackAddress = _callbackAddress;
26 rmiCall = new IoTRMICall(_port, _skeletonAddress, _rev, _bResult);
29 ~LightBulbTest_Stub() {
30 if (rmiCall != NULL) {
38 string retType = "void";
40 string paramCls[] = { };
41 void* paramObj[] = { };
43 rmiCall->remoteCall(objectId, methodId, retType, paramCls, paramObj, numParam, retObj);
46 double getBrightness() {
48 string retType = "double";
50 string paramCls[] = { };
51 void* paramObj[] = { };
53 void* retObj = &retVal;
54 rmiCall->remoteCall(objectId, methodId, retType, paramCls, paramObj, numParam, retObj);
60 string retType = "void";
62 string paramCls[] = { };
63 void* paramObj[] = { };
65 rmiCall->remoteCall(objectId, methodId, retType, paramCls, paramObj, numParam, retObj);
70 string retType = "boolean";
72 string paramCls[] = { };
73 void* paramObj[] = { };
75 void* retObj = &retVal;
76 rmiCall->remoteCall(objectId, methodId, retType, paramCls, paramObj, numParam, retObj);
80 void setColor(double _hue, double _saturation, double _brightness) {
82 string retType = "void";
84 string paramCls[] = { "double", "double", "double" };
85 void* paramObj[] = { &_hue, &_saturation, &_brightness };
87 rmiCall->remoteCall(objectId, methodId, retType, paramCls, paramObj, numParam, retObj);
90 double getSaturation() {
92 string retType = "double";
94 string paramCls[] = { };
95 void* paramObj[] = { };
97 void* retObj = &retVal;
98 rmiCall->remoteCall(objectId, methodId, retType, paramCls, paramObj, numParam, retObj);
104 string retType = "void";
106 string paramCls[] = { };
107 void* paramObj[] = { };
109 rmiCall->remoteCall(objectId, methodId, retType, paramCls, paramObj, numParam, retObj);
112 void setTemperature(int _temperature) {
114 string retType = "void";
116 string paramCls[] = { "int" };
117 void* paramObj[] = { &_temperature };
119 rmiCall->remoteCall(objectId, methodId, retType, paramCls, paramObj, numParam, retObj);
124 string retType = "double";
126 string paramCls[] = { };
127 void* paramObj[] = { };
129 void* retObj = &retVal;
130 rmiCall->remoteCall(objectId, methodId, retType, paramCls, paramObj, numParam, retObj);
134 int getTemperature() {
136 string retType = "int";
138 string paramCls[] = { };
139 void* paramObj[] = { };
141 void* retObj = &retVal;
142 rmiCall->remoteCall(objectId, methodId, retType, paramCls, paramObj, numParam, retObj);