Adding changes and files for doorlock driver
[iot2.git] / benchmarks / original_interfaces / LightBulb.java
1 package iotcode.interfaces;
2
3 // RMI Packages
4 import java.rmi.Remote;
5 import java.rmi.RemoteException;
6
7 /** Class LightBulb interface for the light bulb devices.
8  *
9  * @author      Ali Younis <ayounis @ uci.edu>
10  * @version     1.0
11  * @since       2016-01-27
12  */
13
14
15 public interface LightBulb extends Remote {
16
17         /** Method to turn the light bulb on (Physically illuminate the area).
18          *
19          *   @param None.
20          *
21          *   @return [void] None.
22          */
23
24         public void turnOff() throws RemoteException;
25
26         /** Method to turn the light bulb off.
27          *
28          *   @return [void] None.
29          */
30         public void turnOn() throws RemoteException;
31
32
33         /** Method to get the current on/off state of the light bulb.
34          *
35          *   @return [boolean] True means bulb on.
36          */
37         public boolean getState() throws RemoteException;
38
39
40         /** Method to set the light bulb color using Standard Hue, Saturation and Brightness
41          * conventions. See "http://www.tydac.ch/color/" for reference.
42          *
43          *   @param _hue [double]: Hue value (in degrees).
44          *   @param _saturation [double]: Saturation value (percentage).
45          *   @param _brightness [double]: Brightness value (percentage).
46          *
47          *   @return [void] None.
48          */
49         public void setColor(double _hue, double _saturation, double _brightness) throws RemoteException;
50
51
52         /** Method to set the color temperature.
53          *
54          *   @param _temperature [int]: Color temperature in degrees kelvin.
55          *
56          *   @return [void] None.
57          */
58         public void setTemperature(int _temperature) throws RemoteException;
59
60
61         /** Method to get the current hue value of the bulb.
62          *
63          *   @return [double] Current hue value of the bulb in degrees.
64          */
65         public double getHue() throws RemoteException;
66
67
68         /** Method to get the current saturation value of the bulb.
69          *
70          *   @return [double] Current saturation value of the bulb as a percentage.
71          */
72         public double getSaturation() throws RemoteException;
73
74
75         /** Method to get the current brightness value of the bulb.
76          *
77          *   @return [double] Current brightness value of the bulb as a percentage.
78          */
79         public double getBrightness() throws RemoteException;
80
81
82         /** Method to get the current color temperature value of the bulb.
83          *
84          *   @return [double] Current color temperature value of the bulb in kelvin.
85          */
86         public int getTemperature() throws RemoteException;
87
88
89         /** Method to get the hue range lower bound supported by the bulb.
90          *
91          *   @return [double] Hue lower bound in degrees.
92          */
93         public double getHueRangeLowerBound() throws RemoteException;
94
95
96         /** Method to get the hue range upper bound supported by the bulb.
97          *
98          *   @return [double] Hue upper bound in degrees.
99          */
100         public double getHueRangeUpperBound() throws RemoteException;
101
102
103         /** Method to get the saturation range lower bound supported by the bulb.
104          *
105          *   @return [double] Saturation lower bound as a percentage.
106          */
107         public double getSaturationRangeLowerBound() throws RemoteException;
108
109
110         /** Method to get the saturation range upper bound supported by the bulb.
111          *
112          *   @return [double] Saturation upper bound as a percentage.
113          */
114         public double getSaturationRangeUpperBound() throws RemoteException;
115
116
117         /** Method to get the brightness range lower bound supported by the bulb.
118          *
119          *   @return [double] Brightness lower bound as a percentage.
120          */
121         public double getBrightnessRangeLowerBound() throws RemoteException;
122
123
124         /** Method to get the brightness range upper bound supported by the bulb.
125          *
126          *   @return [double] Brightness upper bound as a percentage.
127          */
128         public double getBrightnessRangeUpperBound() throws RemoteException;
129
130
131         /** Method to get the temperature range lower bound supported by the bulb.
132          *
133          *   @return [int] Temperature lower bound as a percentage.
134          */
135         public int getTemperatureRangeLowerBound() throws RemoteException;
136
137
138         /** Method to get the temperature range upper bound supported by the bulb.
139          *
140          *   @return [int] Temperature upper bound as a percentage.
141          */
142         public int getTemperatureRangeUpperBound() throws RemoteException;
143
144
145         /** Method to initialize the bulb, if the bulb needs to be initialized.
146          *
147          *   @return [void] None.
148          */
149         public void init() throws RemoteException;
150
151 }
152
153
154
155
156
157
158
159
160
161
162
163
164
165