1 package SmartLightsController;
3 import java.io.IOException;
5 import java.util.ArrayList;
6 import java.util.Arrays;
7 import iotrmi.Java.IoTRMICall;
8 import iotrmi.Java.IoTRMIObject;
10 import iotcode.interfaces.LightBulbSmart;
12 public class LightBulbSmart_Stub implements LightBulbSmart {
14 private IoTRMICall rmiCall;
15 private String callbackAddress;
17 private final static int objectId = 0;
20 public LightBulbSmart_Stub(int _port, String _skeletonAddress, String _callbackAddress, int _rev, int[] _ports) throws Exception {
21 callbackAddress = _callbackAddress;
23 rmiCall = new IoTRMICall(_port, _skeletonAddress, _rev);
26 public void turnOn() {
28 Class<?> retType = void.class;
29 Class<?>[] paramCls = new Class<?>[] { };
30 Object[] paramObj = new Object[] { };
31 rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);
34 public double getBrightnessRangeLowerBound() {
36 Class<?> retType = double.class;
37 Class<?>[] paramCls = new Class<?>[] { };
38 Object[] paramObj = new Object[] { };
39 Object retObj = rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);
40 return (double)retObj;
43 public void turnOff() {
45 Class<?> retType = void.class;
46 Class<?>[] paramCls = new Class<?>[] { };
47 Object[] paramObj = new Object[] { };
48 rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);
51 public boolean getState() {
53 Class<?> retType = boolean.class;
54 Class<?>[] paramCls = new Class<?>[] { };
55 Object[] paramObj = new Object[] { };
56 Object retObj = rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);
57 return (boolean)retObj;
60 public double getBrightnessRangeUpperBound() {
62 Class<?> retType = double.class;
63 Class<?>[] paramCls = new Class<?>[] { };
64 Object[] paramObj = new Object[] { };
65 Object retObj = rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);
66 return (double)retObj;
69 public double getSaturation() {
71 Class<?> retType = double.class;
72 Class<?>[] paramCls = new Class<?>[] { };
73 Object[] paramObj = new Object[] { };
74 Object retObj = rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);
75 return (double)retObj;
78 public double getHueRangeLowerBound() {
80 Class<?> retType = double.class;
81 Class<?>[] paramCls = new Class<?>[] { };
82 Object[] paramObj = new Object[] { };
83 Object retObj = rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);
84 return (double)retObj;
87 public double getHue() {
89 Class<?> retType = double.class;
90 Class<?>[] paramCls = new Class<?>[] { };
91 Object[] paramObj = new Object[] { };
92 Object retObj = rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);
93 return (double)retObj;
96 public double getHueRangeUpperBound() {
98 Class<?> retType = double.class;
99 Class<?>[] paramCls = new Class<?>[] { };
100 Object[] paramObj = new Object[] { };
101 Object retObj = rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);
102 return (double)retObj;
105 public int getTemperature() {
107 Class<?> retType = int.class;
108 Class<?>[] paramCls = new Class<?>[] { };
109 Object[] paramObj = new Object[] { };
110 Object retObj = rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);
114 public double getBrightness() {
116 Class<?> retType = double.class;
117 Class<?>[] paramCls = new Class<?>[] { };
118 Object[] paramObj = new Object[] { };
119 Object retObj = rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);
120 return (double)retObj;
123 public int getTemperatureRangeLowerBound() {
125 Class<?> retType = int.class;
126 Class<?>[] paramCls = new Class<?>[] { };
127 Object[] paramObj = new Object[] { };
128 Object retObj = rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);
132 public int getTemperatureRangeUpperBound() {
134 Class<?> retType = int.class;
135 Class<?>[] paramCls = new Class<?>[] { };
136 Object[] paramObj = new Object[] { };
137 Object retObj = rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);
141 public void setColor(double _hue, double _saturation, double _brightness) {
143 Class<?> retType = void.class;
144 Class<?>[] paramCls = new Class<?>[] { double.class, double.class, double.class };
145 Object[] paramObj = new Object[] { _hue, _saturation, _brightness };
146 rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);
151 Class<?> retType = void.class;
152 Class<?>[] paramCls = new Class<?>[] { };
153 Object[] paramObj = new Object[] { };
154 rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);
157 public double getSaturationRangeLowerBound() {
159 Class<?> retType = double.class;
160 Class<?>[] paramCls = new Class<?>[] { };
161 Object[] paramObj = new Object[] { };
162 Object retObj = rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);
163 return (double)retObj;
166 public double getSaturationRangeUpperBound() {
168 Class<?> retType = double.class;
169 Class<?>[] paramCls = new Class<?>[] { };
170 Object[] paramObj = new Object[] { };
171 Object retObj = rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);
172 return (double)retObj;
175 public void setTemperature(int _temperature) {
177 Class<?> retType = void.class;
178 Class<?>[] paramCls = new Class<?>[] { int.class };
179 Object[] paramObj = new Object[] { _temperature };
180 rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);