public class GpioEventRequest extends Object
Edge-detection is monitoring changes of state, for instance when the line goes from low to high.
| Constructor and Description |
|---|
GpioEventRequest(int line)
Basic constructor requesting a regular input for both rising and falling edge.
|
GpioEventRequest(int line,
GpioEdgeDetection edgeDetection)
Constructor requesting a regular input leaving the choice of edge-detection.
|
GpioEventRequest(int line,
GpioEdgeDetection edgeDetection,
GpioFlags flags)
Constructor leaving all configuration to the user.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getConsumer()
Retrieves the consumer this line will be request under.
|
GpioEdgeDetection |
getEdgeDetection()
Retrieves what kind of edge-detection this request if for.
|
GpioFlags |
getFlags() |
int |
getLine()
Retrieves which line will be requested.
|
GpioEventRequest |
setConsumer(String consumer)
Sets the consumer this line will be request under.
|
GpioEventRequest |
setEdgeDetection(GpioEdgeDetection edgeDetection)
Selects edge-detection.
|
GpioEventRequest |
setFlags(GpioFlags flags) |
GpioEventRequest |
setLine(int line)
Selects which line will be requested.
|
GpioEventRequest |
unsetFlags() |
public GpioEventRequest(int line)
line - The number of the line.public GpioEventRequest(int line,
GpioEdgeDetection edgeDetection)
line - The number of the line.edgeDetection - The kind of edge-detection.public GpioEventRequest(int line,
GpioEdgeDetection edgeDetection,
GpioFlags flags)
line - The number of the line.edgeDetection - The kind of edge-detection.flags - Flags describing how the line will be handled.public GpioEventRequest setFlags(GpioFlags flags)
public GpioEventRequest unsetFlags()
public GpioFlags getFlags()
public GpioEdgeDetection getEdgeDetection()
public GpioEventRequest setEdgeDetection(GpioEdgeDetection edgeDetection)
edgeDetection - The kind of edge-detection.public int getLine()
public GpioEventRequest setLine(int line)
line - The number of the line.public String getConsumer()
public GpioEventRequest setConsumer(String consumer)
consumer - The name of the consumer, length must be smaller than 32.