public class PinEvent extends DeviceEvent<GPIOPin>
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, device, lastTimeStamp, lastTimeStampMicros, 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, getDevice, getLastTimeStamp, getLastTimeStampMicros, 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 © 2012, 2014, Oracle and/or its affiliates. All rights reserved.
Legal Notices