public class PortEvent extends DeviceEvent<GPIOPort>
PortEvent class encapsulates GPIO port value changes. When/if value change events for
the same GPIO port are coalesced the value retained is that of the last occurrence.GPIOPort,
PortListenercount, device, lastTimeStamp, lastTimeStampMicros, timeStamp, timeStampMicros| Constructor and Description |
|---|
PortEvent(GPIOPort port,
int value)
Creates a new
PortEvent with the specified value and time-stamped with the current
time. |
PortEvent(GPIOPort port,
int value,
long timeStamp,
int timeStampMicros)
Creates a new
PortEvent with the specified value and timestamp. |
| Modifier and Type | Method and Description |
|---|---|
int |
getValue()
Returns the new GPIO port's value.
|
getCount, getDevice, getLastTimeStamp, getLastTimeStampMicros, getTimeStamp, getTimeStampMicrospublic PortEvent(GPIOPort port, int value)
PortEvent with the specified value and time-stamped with the current
time.port - the source GPIO port.value - the new value.java.lang.NullPointerException - if port is null.public PortEvent(GPIOPort port, int value, long timeStamp, int timeStampMicros)
PortEvent with the specified value and timestamp.port - the source GPIO port.value - the new value.timeStamp - the timestamp (in milliseconds).timeStampMicros - the additional microseconds to the timestamp.java.lang.NullPointerException - if port is null.java.lang.IllegalArgumentException - if timeStamp or timeStampMicros is negative.Copyright © 2012, 2014, Oracle and/or its affiliates. All rights reserved.
Legal Notices