|
|||||||||
| 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.AdjustableHomeDevice
public class AdjustableHomeDevice
AdjustableHomeDevice extends the HomeDevice
and represents devices that can have their "ON" value adjusted from
0 to 100%
| Field Summary |
|---|
| Fields inherited from class sophware.home.lang.BinaryObject |
|---|
OFF, ON |
| Constructor Summary | |
|---|---|
AdjustableHomeDevice(DeviceAddress address)
Creates a AdjustableHomeDevice with the given
DeviceAddress |
|
AdjustableHomeDevice(DeviceAddress address,
java.lang.String name)
Creates a AdjustableHomeDevice with the given
DeviceAddress and name |
|
| Method Summary | |
|---|---|
void |
adjustLevel(int adjustment)
Makes a relative adjustment to the level |
int |
getLevel()
Gets the current level |
void |
sendOn(int level)
Sends request to set device to given level |
void |
setLevel(int level)
Sets the current level |
| 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 AdjustableHomeDevice(DeviceAddress address)
AdjustableHomeDevice with the given
DeviceAddress
address - the DeviceAddress of the lamp
public AdjustableHomeDevice(DeviceAddress address,
java.lang.String name)
AdjustableHomeDevice with the given
DeviceAddress and name
address - the DeviceAddress of the lampname - of this device| Method Detail |
|---|
public void sendOn(int level)
throws HomeException
level - the desired level
HomeExceptionpublic int getLevel()
getLevel in interface AdjustableLevelpublic void setLevel(int level)
This method is usually not called directly, instead it is typically
called by the methods processing HomeEvents
setLevel in interface AdjustableLevellevel - the level 0-100%public void adjustLevel(int adjustment)
If the resulting value is outside the range of the min or max values, it will be silently adjusted to the min or max value
adjustLevel in interface AdjustableLeveladjustment - a signed adjustment (-100% to 100%)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||