public interface KuraGPIOPin
getValue() or by attaching a PinStatusListener
to the pin.| Modifier and Type | Method and Description |
|---|---|
void |
addPinStatusListener(PinStatusListener listener)
Adds a
PinStatusListener to this input pin. |
void |
close()
Closes this pin and deallocates the resources needed to communicate with it.
If there is a PinStatusListener attached to this pin, the implementation should remove it
before closing the resource. |
KuraGPIODirection |
getDirection() |
int |
getIndex() |
KuraGPIOMode |
getMode() |
String |
getName() |
KuraGPIOTrigger |
getTrigger() |
boolean |
getValue()
Used to get the current value of a pin, either output or input
|
boolean |
isOpen() |
void |
open()
Opens the pin and allocates the needed resources to communicate with it.
|
void |
removePinStatusListener(PinStatusListener listener)
Removes a
PinStatusListener from this input pin.If the pin has no listeners attached, this method should fail silently. |
void |
setValue(boolean active)
Used to set the value of an output pin.
|
void setValue(boolean active)
throws KuraUnavailableDeviceException,
KuraClosedDeviceException,
IOException
active - New state of the pin.KuraUnavailableDeviceException - when the GPIO resource is not availableKuraClosedDeviceException - when the GPIO resource has not yet been openedIOException - if an I/O error occursboolean getValue()
throws KuraUnavailableDeviceException,
KuraClosedDeviceException,
IOException
KuraUnavailableDeviceException - when the GPIO resource is not availableKuraClosedDeviceException - when the GPIO resource has not yet been openedIOException - if an I/O error occursvoid addPinStatusListener(PinStatusListener listener) throws KuraClosedDeviceException, IOException
PinStatusListener to this input pin. The listener will be notified when the status of this input
changes.listener - Listener to be added to this pinKuraClosedDeviceException - when the GPIO resource has not yet been openedIOException - if an I/O error occursvoid removePinStatusListener(PinStatusListener listener) throws KuraClosedDeviceException, IOException
PinStatusListener from this input pin.listener - Listener to be removed from this pinKuraClosedDeviceException - when the GPIO resource has not yet been openedIOException - if an I/O error occursvoid open()
throws KuraGPIODeviceException,
KuraUnavailableDeviceException,
IOException
KuraGPIODeviceException - when an exception occurs opening the pinKuraUnavailableDeviceException - when the GPIO resource is not availableIOException - if a generic I/O error occursvoid close()
throws IOException
PinStatusListener attached to this pin, the implementation should remove it
before closing the resource.IOException - if a generic I/O error occursKuraGPIODirection getDirection()
KuraGPIOPinDirection representing the direction (Input/Output) of the PINKuraGPIOMode getMode()
KuraGPIOMode representing the mode of the pun.KuraGPIOTrigger getTrigger()
KuraGPIOTrigger representing the trigger mode for this pin.String getName()
int getIndex()
boolean isOpen()
Copyright © 2016. All Rights Reserved.