|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectModel
jhomenet.hw.HomenetHardware
jhomenet.hw.device.Device
jhomenet.hw.device.LightSwitchDevice
public class LightSwitchDevice
| Field Summary | |
|---|---|
static State |
OFF
Define the device's available states. |
static State |
ON
Define the device's available states. |
| Fields inherited from class jhomenet.hw.device.Device |
|---|
desiredState, PROPERTYNAME_CURRENTSTATE, states |
| Fields inherited from class jhomenet.hw.HomenetHardware |
|---|
configuration, driver, errorTracker, hardwareDescription, hardwareId, PROPERTYNAME_CONFIGURATION, PROPERTYNAME_SETUPDESC, setupDescription |
| Constructor Summary | |
|---|---|
LightSwitchDevice()
Constructor. |
|
LightSwitchDevice(java.lang.String hardwareID,
java.lang.String description)
Default constructor. |
|
| Method Summary | |
|---|---|
void |
execute()
Execute the device based on the desired state. |
protected void |
initializeHardwareDescription()
Set the hardware description. |
protected void |
initializeStates()
Initialize the list of states. |
boolean |
isOn()
Check whether the device is currently on. |
| Methods inherited from class jhomenet.hw.device.Device |
|---|
getCurrentState, getStates, setCurrentState, setDesiredState, toString |
| Methods inherited from class jhomenet.hw.HomenetHardware |
|---|
equals, getConfiguration, getConfiguration, getDriverHardwareDescription, getDriverName, getErrorCount, getHardwareClassname, getHardwareDescription, getHardwareId, getSetupDescription, initializeHardware, isRegistered, setConfiguration, setConfiguration, setDriver, setHardwareId, setSetupDescription |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final State ON
public static final State OFF
| Constructor Detail |
|---|
public LightSwitchDevice(java.lang.String hardwareID,
java.lang.String description)
hardwareID - The light switch hardware IDdescription - A description of the light switch hardware.public LightSwitchDevice()
| Method Detail |
|---|
protected void initializeStates()
Device
initializeStates in class DeviceDevice.initializeStates()protected void initializeHardwareDescription()
HomenetHardware
initializeHardwareDescription in class HomenetHardwareHomenetHardware.initializeHardwareDescription()public void execute()
Device
execute in class DeviceDevice.execute()public boolean isOn()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||