public class ZwaveSwitch extends ZwaveDevice implements ej.basedriver.SwitchWithReturnState, SendDataListener
RequestFrameListener.RequestFrameError
Modifier and Type | Field and Description |
---|---|
static byte |
SWITCH_OFF |
static byte |
SWITCH_ON |
node
Constructor and Description |
---|
ZwaveSwitch(ZwaveNode node) |
Modifier and Type | Method and Description |
---|---|
void |
callbackComplete(byte[] bytes,
int commandClassIndex) |
int |
getLastKnownState() |
ZwaveNode |
getNode() |
void |
notifyComplete() |
void |
notifyError(RequestFrameListener.RequestFrameError error) |
void |
off() |
void |
on() |
void |
requestStateUpdate() |
void |
setState(int newState) |
getDescriptor, getName, getParent
public static final byte SWITCH_OFF
public static final byte SWITCH_ON
public ZwaveSwitch(ZwaveNode node)
public void on() throws java.io.IOException
on
in interface ej.basedriver.Switch
java.io.IOException
public void off() throws java.io.IOException
off
in interface ej.basedriver.Switch
java.io.IOException
public void notifyComplete()
notifyComplete
in interface RequestFrameListener
public void notifyError(RequestFrameListener.RequestFrameError error)
notifyError
in interface RequestFrameListener
public ZwaveNode getNode()
getNode
in interface SendDataListener
public int getLastKnownState()
getLastKnownState
in interface ej.basedriver.SwitchWithReturnState
public void requestStateUpdate() throws java.io.IOException
requestStateUpdate
in interface ej.basedriver.SwitchWithReturnState
java.io.IOException
public void setState(int newState)
newState
- the new state.public void callbackComplete(byte[] bytes, int commandClassIndex)
callbackComplete
in interface SendDataListener