public class GenericEvent extends DeviceEvent<GenericDevice>
GenericEvent class encapsulates events fired by devices that implement the
GenericDevice interface.GenericDevice,
GenericEventListener| Modifier and Type | Field and Description |
|---|---|
static int |
INPUT_BUFFER_OVERRUN
Event ID indicating an input buffer overrun.
|
static int |
INPUT_DATA_AVAILABLE
Event ID indicating that input data is available for reading.
|
static int |
OUTPUT_BUFFER_EMPTY
Event ID indicating that the output buffer is empty and that additional data may be written.
|
count, device, lastTimeStamp, lastTimeStampMicros, timeStamp, timeStampMicros| Constructor and Description |
|---|
GenericEvent(GenericDevice device,
int id)
Creates a new
GenericEvent with the specified value and time-stamped with the current
time. |
GenericEvent(GenericDevice device,
int id,
long timeStamp,
int timeStampMicros)
Creates a new
GenericEvent with the specified value and timestamp. |
| Modifier and Type | Method and Description |
|---|---|
int |
getID()
Returns this event ID.
|
getCount, getDevice, getLastTimeStamp, getLastTimeStampMicros, getTimeStamp, getTimeStampMicrospublic static final int INPUT_BUFFER_OVERRUN
public static final int INPUT_DATA_AVAILABLE
public static final int OUTPUT_BUFFER_EMPTY
public GenericEvent(GenericDevice device, int id)
GenericEvent with the specified value and time-stamped with the current
time.device - the source device.id - the event ID: INPUT_DATA_AVAILABLE, INPUT_BUFFER_OVERRUN,
OUTPUT_BUFFER_EMPTY or other device-specific event ID.java.lang.NullPointerException - if device is null.java.lang.IllegalArgumentException - if id is negative.public GenericEvent(GenericDevice device, int id, long timeStamp, int timeStampMicros)
GenericEvent with the specified value and timestamp.device - the source device.id - the event ID: INPUT_DATA_AVAILABLE, INPUT_BUFFER_OVERRUN,
OUTPUT_BUFFER_EMPTY or other device-specific event ID.timeStamp - the timestamp (in milliseconds).timeStampMicros - the additional microseconds to the timestamp.java.lang.NullPointerException - if device is null.java.lang.IllegalArgumentException - if id is negative or if timeStamp or timeStampMicros is
negative.public int getID()
INPUT_DATA_AVAILABLE, INPUT_BUFFER_OVERRUN,
OUTPUT_BUFFER_EMPTY or other device-specific event IDs.Copyright © 2012, 2014, Oracle and/or its affiliates. All rights reserved.
Legal Notices