1 /** Class LightBulb interface for the light bulb devices.
3 * @author Ali Younis <ayounis @ uci.edu>
9 public interface LightBulb {
11 /** Method to turn the light bulb on (Physically illuminate the area).
15 * @return [void] None.
18 public void turnOff();
20 /** Method to turn the light bulb off.
22 * @return [void] None.
27 /** Method to get the current on/off state of the light bulb.
29 * @return [boolean] True means bulb on.
31 public boolean getState();
34 /** Method to set the light bulb color using Standard Hue, Saturation and Brightness
35 * conventions. See "http://www.tydac.ch/color/" for reference.
37 * @param _hue [double]: Hue value (in degrees).
38 * @param _saturation [double]: Saturation value (percentage).
39 * @param _brightness [double]: Brightness value (percentage).
41 * @return [void] None.
43 public void setColor(double _hue, double _saturation, double _brightness);
46 /** Method to set the color temperature.
48 * @param _temperature [int]: Color temperature in degrees kelvin.
50 * @return [void] None.
52 public void setTemperature(int _temperature);
55 /** Method to get the current hue value of the bulb.
57 * @return [double] Current hue value of the bulb in degrees.
59 public double getHue();
62 /** Method to get the current saturation value of the bulb.
64 * @return [double] Current saturation value of the bulb as a percentage.
66 public double getSaturation();
69 /** Method to get the current brightness value of the bulb.
71 * @return [double] Current brightness value of the bulb as a percentage.
73 public double getBrightness();
76 /** Method to get the current color temperature value of the bulb.
78 * @return [double] Current color temperature value of the bulb in kelvin.
80 public int getTemperature();
83 /** Method to get the hue range lower bound supported by the bulb.
85 * @return [double] Hue lower bound in degrees.
87 public double getHueRangeLowerBound();
90 /** Method to get the hue range upper bound supported by the bulb.
92 * @return [double] Hue upper bound in degrees.
94 public double getHueRangeUpperBound();
97 /** Method to get the saturation range lower bound supported by the bulb.
99 * @return [double] Saturation lower bound as a percentage.
101 public double getSaturationRangeLowerBound();
104 /** Method to get the saturation range upper bound supported by the bulb.
106 * @return [double] Saturation upper bound as a percentage.
108 public double getSaturationRangeUpperBound();
111 /** Method to get the brightness range lower bound supported by the bulb.
113 * @return [double] Brightness lower bound as a percentage.
115 public double getBrightnessRangeLowerBound();
118 /** Method to get the brightness range upper bound supported by the bulb.
120 * @return [double] Brightness upper bound as a percentage.
122 public double getBrightnessRangeUpperBound();
125 /** Method to get the temperature range lower bound supported by the bulb.
127 * @return [int] Temperature lower bound as a percentage.
129 public int getTemperatureRangeLowerBound();
132 /** Method to get the temperature range upper bound supported by the bulb.
134 * @return [int] Temperature upper bound as a percentage.
136 public int getTemperatureRangeUpperBound();
139 /** Method to initialize the bulb, if the bulb needs to be initialized.
141 * @return [void] None.