public class SwitchWithReturnStateProxy extends DeviceProxy<SwitchWithReturnState> implements SwitchWithReturnState
Constructor and Description |
---|
SwitchWithReturnStateProxy() |
Modifier and Type | Method and Description |
---|---|
int |
getLastKnownState()
Get the last known state of this device.
|
void |
off()
Change the switch state to off.
|
void |
on()
Change the switch state to on.
|
void |
requestStateUpdate()
Ask for this device's state to be updated.
|
getChildren, getDescriptor, getName, getParent
public void on() throws java.io.IOException
Switch
public void off() throws java.io.IOException
Switch
public int getLastKnownState()
SwitchWithReturnState
getLastKnownState
in interface SwitchWithReturnState
public void requestStateUpdate() throws java.io.IOException
SwitchWithReturnState
requestStateUpdate
in interface SwitchWithReturnState
java.io.IOException
- if there is a communication error with the device