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.LightBulbTest;
12 public class LightBulbTest_Stub implements LightBulbTest {
14 private IoTRMICall rmiCall;
15 private String callbackAddress;
18 private final static int objectId = 0;
21 public LightBulbTest_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 getBrightness() {
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 void setColor(double _hue, double _saturation, double _brightness) {
63 Class<?> retType = void.class;
64 Class<?>[] paramCls = new Class<?>[] { double.class, double.class, double.class };
65 Object[] paramObj = new Object[] { _hue, _saturation, _brightness };
66 rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);
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;
80 Class<?> retType = void.class;
81 Class<?>[] paramCls = new Class<?>[] { };
82 Object[] paramObj = new Object[] { };
83 rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);
86 public void setTemperature(int _temperature) {
88 Class<?> retType = void.class;
89 Class<?>[] paramCls = new Class<?>[] { int.class };
90 Object[] paramObj = new Object[] { _temperature };
91 rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);
94 public double getHue() {
96 Class<?> retType = double.class;
97 Class<?>[] paramCls = new Class<?>[] { };
98 Object[] paramObj = new Object[] { };
99 Object retObj = rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);
100 return (double)retObj;
103 public int getTemperature() {
105 Class<?> retType = int.class;
106 Class<?>[] paramCls = new Class<?>[] { };
107 Object[] paramObj = new Object[] { };
108 Object retObj = rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);