public class GpioHandleRequest extends Object
Several lines can be requested at once and the resulting handle allows the user to control them all at once. In practise, there is no garantee that any kind of IO will be atomic, actually happening at the exact same time for all the lines. This depends on the underlying driver and is opaque to this library and user space in general.
GpioBuffer,
GpioFlags,
GpioHandle| Constructor and Description |
|---|
GpioHandleRequest()
Basic constructor, by default lines will be requested as they are.
|
| Modifier and Type | Method and Description |
|---|---|
GpioLine |
addLine(int lineNumber)
Adds a GPIO line to the request.
|
GpioLine |
addLine(int lineNumber,
boolean value)
Adds a GPIO line to the request with a default value.
|
String |
getConsumer()
Retrieves the consumer of this request.
|
GpioFlags |
getFlags()
Retrieves the flags specifying how the lines will be handled.
|
GpioHandleRequest |
setConsumer(String consumer)
Sets the consumer of the requested lines.
|
GpioHandleRequest |
setFlags(GpioFlags flags)
Sets flags specifying how the lines will be handled.
|
GpioHandleRequest |
unsetFlags()
The lines will be requested as they are.
|
public GpioHandleRequest()
public GpioHandleRequest setFlags(GpioFlags flags)
flags - Prepared flags.public GpioHandleRequest unsetFlags()
public GpioFlags getFlags()
public String getConsumer()
public GpioHandleRequest setConsumer(String consumer)
consumer - String representing the consumer, length must be smaller than 32.public GpioLine addLine(int lineNumber)
A handle can drive at most 64 lines at once.
lineNumber - Which line.GpioBufferpublic GpioLine addLine(int lineNumber, boolean value)
A handle can drive at most 64 lines.
Providing a default value works only for outputs and will be ignored for inputs.
lineNumber - Which line.value - Default value.GpioBuffer