public class MCP23xxxDigitalInputOutputDevice extends AbstractInputDevice<DigitalInputEvent> implements GpioDigitalInputOutputDeviceInterface
Constructor and Description |
---|
MCP23xxxDigitalInputOutputDevice(MCP23xxx mcp23xxx,
String key,
int gpio,
DeviceMode mode) |
Modifier and Type | Method and Description |
---|---|
protected void |
closeDevice() |
int |
getGpio() |
DeviceMode |
getMode() |
boolean |
getValue() |
void |
setMode(DeviceMode mode) |
void |
setValue(boolean value) |
disableListener, enableListener, removeListener, setListener, valueChanged
close, getDeviceFactory, getKey, isOpen
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
removeListener, setListener
close, getKey, isOpen
public MCP23xxxDigitalInputOutputDevice(MCP23xxx mcp23xxx, String key, int gpio, DeviceMode mode)
public boolean getValue() throws RuntimeIOException
getValue
in interface GpioDigitalDeviceInterface
RuntimeIOException
public void setValue(boolean value) throws RuntimeIOException
setValue
in interface GpioDigitalOutputDeviceInterface
RuntimeIOException
public int getGpio()
getGpio
in interface GpioDeviceInterface
protected void closeDevice() throws RuntimeIOException
closeDevice
in class AbstractDevice
RuntimeIOException
public DeviceMode getMode()
getMode
in interface GpioDigitalInputOutputDeviceInterface
public void setMode(DeviceMode mode)
setMode
in interface GpioDigitalInputOutputDeviceInterface
Copyright © 2016–2017 mattjlewis. All rights reserved.