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;
18 private final static int objectId = 0;
21 public LightBulbSmart_Stub(int _port, String _skeletonAddress, String _callbackAddress, int _rev, int[] _ports) throws Exception {
22 callbackAddress = _callbackAddress;
24 rmiCall = new IoTRMICall(_port, _skeletonAddress, _rev);
27 public void turnOn() {
29 Class<?> retType = void.class;
30 Class<?>[] paramCls = new Class<?>[] { };
31 Object[] paramObj = new Object[] { };
32 rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);
35 public double getBrightnessRangeLowerBound() {
37 Class<?> retType = double.class;
38 Class<?>[] paramCls = new Class<?>[] { };
39 Object[] paramObj = new Object[] { };
40 Object retObj = rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);
41 return (double)retObj;
44 public void turnOff() {
46 Class<?> retType = void.class;
47 Class<?>[] paramCls = new Class<?>[] { };
48 Object[] paramObj = new Object[] { };
49 rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);
52 public boolean getState() {
54 Class<?> retType = boolean.class;
55 Class<?>[] paramCls = new Class<?>[] { };
56 Object[] paramObj = new Object[] { };
57 Object retObj = rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);
58 return (boolean)retObj;
61 public double getBrightnessRangeUpperBound() {
63 Class<?> retType = double.class;
64 Class<?>[] paramCls = new Class<?>[] { };
65 Object[] paramObj = new Object[] { };
66 Object retObj = rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);
67 return (double)retObj;
70 public double getSaturation() {
72 Class<?> retType = double.class;
73 Class<?>[] paramCls = new Class<?>[] { };
74 Object[] paramObj = new Object[] { };
75 Object retObj = rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);
76 return (double)retObj;
79 public double getHueRangeLowerBound() {
81 Class<?> retType = double.class;
82 Class<?>[] paramCls = new Class<?>[] { };
83 Object[] paramObj = new Object[] { };
84 Object retObj = rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);
85 return (double)retObj;
88 public double getHue() {
90 Class<?> retType = double.class;
91 Class<?>[] paramCls = new Class<?>[] { };
92 Object[] paramObj = new Object[] { };
93 Object retObj = rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);
94 return (double)retObj;
97 public double getHueRangeUpperBound() {
99 Class<?> retType = double.class;
100 Class<?>[] paramCls = new Class<?>[] { };
101 Object[] paramObj = new Object[] { };
102 Object retObj = rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);
103 return (double)retObj;
106 public int getTemperature() {
108 Class<?> retType = int.class;
109 Class<?>[] paramCls = new Class<?>[] { };
110 Object[] paramObj = new Object[] { };
111 Object retObj = rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);
115 public double getBrightness() {
117 Class<?> retType = double.class;
118 Class<?>[] paramCls = new Class<?>[] { };
119 Object[] paramObj = new Object[] { };
120 Object retObj = rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);
121 return (double)retObj;
124 public int getTemperatureRangeLowerBound() {
126 Class<?> retType = int.class;
127 Class<?>[] paramCls = new Class<?>[] { };
128 Object[] paramObj = new Object[] { };
129 Object retObj = rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);
133 public int getTemperatureRangeUpperBound() {
135 Class<?> retType = int.class;
136 Class<?>[] paramCls = new Class<?>[] { };
137 Object[] paramObj = new Object[] { };
138 Object retObj = rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);
142 public void setColor(double _hue, double _saturation, double _brightness) {
144 Class<?> retType = void.class;
145 Class<?>[] paramCls = new Class<?>[] { double.class, double.class, double.class };
146 Object[] paramObj = new Object[] { _hue, _saturation, _brightness };
147 rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);
152 Class<?> retType = void.class;
153 Class<?>[] paramCls = new Class<?>[] { };
154 Object[] paramObj = new Object[] { };
155 rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);
158 public double getSaturationRangeLowerBound() {
160 Class<?> retType = double.class;
161 Class<?>[] paramCls = new Class<?>[] { };
162 Object[] paramObj = new Object[] { };
163 Object retObj = rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);
164 return (double)retObj;
167 public double getSaturationRangeUpperBound() {
169 Class<?> retType = double.class;
170 Class<?>[] paramCls = new Class<?>[] { };
171 Object[] paramObj = new Object[] { };
172 Object retObj = rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);
173 return (double)retObj;
176 public void setTemperature(int _temperature) {
178 Class<?> retType = void.class;
179 Class<?>[] paramCls = new Class<?>[] { int.class };
180 Object[] paramObj = new Object[] { _temperature };
181 rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);