|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectsophware.home.lang.StateObject
sophware.home.lang.BinaryObject
sophware.home.lang.HomeDevice
sophware.home.lang.LampDevice
sophware.home.lang.DimableLampDevice
public class DimableLampDevice
DimableLampDevice extends the LampDevice and
represents dimable lights/lamps.
| Field Summary |
|---|
| Fields inherited from class sophware.home.lang.BinaryObject |
|---|
OFF, ON |
| Constructor Summary | |
|---|---|
DimableLampDevice(DeviceAddress address)
Creates a DimableLampDevice with the given
DeviceAddress |
|
DimableLampDevice(DeviceAddress address,
java.lang.String name)
Creates a DimableLampDevice with the given
DeviceAddress and name |
|
| Method Summary | |
|---|---|
void |
adjustLevel(int dim)
Makes a relative adjustment to the dim value |
int |
getLevel()
Gets the current dim value |
void |
sendBright()
Sends dim request to the lamp |
void |
sendDim()
Sends dim request to the lamp |
void |
sendOn(int level)
sets device to desired level |
void |
setLevel(int dim)
Sets the dim value to an absolute level between 0 and 100%. |
| Methods inherited from class sophware.home.lang.HomeDevice |
|---|
equals, getAddress, getName, getProperties, sendHail, sendOff, sendOn, sendStatusRequest, setName, setProperties, toString, update |
| Methods inherited from class sophware.home.lang.BinaryObject |
|---|
isOn, setOn, stateEquals |
| Methods inherited from class sophware.home.lang.StateObject |
|---|
addStateChangeListener, fireStateChange, removeStateChangeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DimableLampDevice(DeviceAddress address)
DimableLampDevice with the given
DeviceAddress
address - the DeviceAddress of the lamp
public DimableLampDevice(DeviceAddress address,
java.lang.String name)
DimableLampDevice with the given
DeviceAddress and name
address - the DeviceAddress of the lampname - the name of this lamp| Method Detail |
|---|
public void sendOn(int level)
throws HomeException
level - desired level
HomeException
public void sendDim()
throws HomeException
HomeException
public void sendBright()
throws HomeException
HomeExceptionpublic int getLevel()
getLevel in interface AdjustableLevelpublic void setLevel(int dim)
Any value outside that range will be automatically adjusted to the closest valid value. A value of zero will set the device's state to off. Any other value will result in the state of on.
setLevel in interface AdjustableLeveldim - the levelpublic void adjustLevel(int dim)
Adjusts the dim value by a signed percentage. If the adjustement drops the dim value to or below 0%, the device's state will be set to off and the value to zero. Any value greater than zero will result in the device's state being on. Adjustments resulting in a value greater than 100% will result in the value set to 100.
adjustLevel in interface AdjustableLeveldim - a signed offset (-100% to 100%) applied to the current level
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||