public class PinEvent extends DeviceEvent
Modifier and Type | Field and Description |
---|---|
protected boolean |
value
The new GPIO pin's value.
|
count, device, lastTimeStamp, lastTimeStampMicros, timeStamp, timeStampMicros
Modifier | Constructor and Description |
---|---|
protected |
PinEvent() |
|
PinEvent(GPIOPin pin,
boolean value)
Creates a new
PinEvent with the specified value and time-stamped with the current
time. |
|
PinEvent(GPIOPin pin,
boolean value,
long timeStamp,
int timeStampMicros)
Creates a new
PinEvent with the specified value and timestamp. |
Modifier and Type | Method and Description |
---|---|
boolean |
getValue()
Returns the new GPIO pin's value.
|
getCount, getDevice, getLastTimeStamp, getLastTimeStampMicros, getTimeStamp, getTimeStampMicros
protected PinEvent()
public PinEvent(GPIOPin pin, boolean value)
PinEvent
with the specified value and time-stamped with the current
time.pin
- the source GPIO pin.value
- the new value.NullPointerException
- if pin
is null
.public PinEvent(GPIOPin pin, boolean value, long timeStamp, int timeStampMicros)
PinEvent
with the specified value and timestamp.pin
- the source GPIO pin.value
- the new value.timeStamp
- the timestamp (in milliseconds).timeStampMicros
- the additional microseconds to the timestamp.NullPointerException
- if pin
is null
.IllegalArgumentException
- if timeStamp
is negative or
timeStampMicros
is not in the range [0 - 999]
.