public class PinEvent extends PeripheralEvent
PinEvent class encapsulates GPIO pin value changes. When/if value change events for the same GPIO pin are
coalesced the value retained is that of the last occurrence.GPIOPin,
PinListenercount, lastTimeStamp, lastTimeStampMicros, peripheral, timeStamp, timeStampMicros| Constructor and Description |
|---|
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, getLastTimeStamp, getLastTimeStampMicros, getPeripheral, getTimeStamp, getTimeStampMicrospublic 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.java.lang.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.java.lang.NullPointerException - if pin is null.java.lang.IllegalArgumentException - if timeStamp or timeStampMicros is negative.Copyright (c) 1990, 2013, Oracle and/or its affiliates. All rights reserved.