public class GpioEventHandle extends Object implements AutoCloseable
GpioEventWatcher| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this GPIO handle and releases resources.
|
GpioLine |
getLine()
Retrieves the GPIO line associated with this handle.
|
void |
read(GpioBuffer buffer)
Reads the current state of the line this handle controls and write it back to the given
buffer.
|
GpioEvent |
waitForEvent()
Waits for an event to happen.
|
GpioEvent |
waitForEvent(GpioEvent data)
Waits for an event to happen and writes what happened to the given `
data` object. |
public GpioLine getLine()
public void read(GpioBuffer buffer) throws LinuxException
buffer - Buffer meant to hold the data.LinuxException - When something fails on the native side.public GpioEvent waitForEvent() throws LinuxException
LinuxException - When something fails on the native side.public GpioEvent waitForEvent(GpioEvent data) throws LinuxException
data` object.data - Object for holding data about what happened.LinuxException - When something fails on the native side.public void close()
throws LinuxException
close in interface AutoCloseableLinuxException - When something fails on the native side.