getGpioSignal v5.4
Before v5.4, this method was called getGpioCondition.
Get the current state of a GPIO signal.
Parameter
The name of the GPIO signal.
Return value
| Key | Type | Description |
|---|---|---|
| active | boolean | Whether the signal is active. v6.0 |
| edgeCount | number | Number of edges (state changes) of the signal. v6.0 |
| activeCount | number | Number of times the signal became active. v6.0 |
| generation | number | A number that changes whenever the signal changes, for use with waitForGpioSignalChange. v6.0 |
| state | boolean | Deprecated name of active. |
The counts are every change of the signal's value. For an input or trigger
signal, device.<…>, that includes the change from inactive while its state
is unknown, when its I/O module connects with it active. The input's or
trigger's own counts, from getGpi or
getTrigger, leave that out, so they can be lower.
Example
getGpioSignal "MySignal"