public class MMIOEvent extends DeviceEvent<MMIODevice>
MMIOEvent
class encapsulates events fired by devices mapped to memory.MMIODevice
,
MMIOEventListener
count, device, lastTimeStamp, lastTimeStampMicros, timeStamp, timeStampMicros
Constructor and Description |
---|
MMIOEvent(MMIODevice device,
int id)
Creates a new
MMIOEvent with the specified event ID and time-stamped
with the current time. |
MMIOEvent(MMIODevice device,
int id,
java.nio.ByteBuffer capturedMemoryContent,
long timeStamp,
int timeStampMicros)
Creates a new
MMIOEvent with the specified event ID and timestamp, and
with the captured content of the memory area or memory block designated upon registration. |
MMIOEvent(MMIODevice device,
int id,
long timeStamp,
int timeStampMicros)
Creates a new
MMIOEvent with the specified event ID and timestamp. |
MMIOEvent(MMIODevice device,
int id,
T capturedRegisterValue,
long timeStamp,
int timeStampMicros)
Creates a new
MMIOEvent with the specified event ID and timestamp, and
the captured value of the register designated upon registration. |
Modifier and Type | Method and Description |
---|---|
java.nio.ByteBuffer |
getCapturedMemoryContent()
Gets the captured content of the memory area or memory block designated upon registration.
|
<T extends java.lang.Number> |
getCapturedRegisterValue()
Gets the captured value of the register designated upon registration.
|
int |
getID()
Returns this event ID.
|
getCount, getDevice, getLastTimeStamp, getLastTimeStampMicros, getTimeStamp, getTimeStampMicros
public MMIOEvent(MMIODevice device, int id)
MMIOEvent
with the specified event ID and time-stamped
with the current time.device
- the source device.id
- the event ID.java.lang.NullPointerException
- if device
is null
.java.lang.IllegalArgumentException
- if id
is negative.public MMIOEvent(MMIODevice device, int id, java.nio.ByteBuffer capturedMemoryContent, long timeStamp, int timeStampMicros)
MMIOEvent
with the specified event ID and timestamp, and
with the captured content of the memory area or memory block designated upon registration.device
- the source device.id
- the event ID.capturedMemoryContent
- the captured content of the memory area or memory block designated upon registration.timeStamp
- the timestamp (in milliseconds).timeStampMicros
- the additional microseconds to the timestamp.java.lang.NullPointerException
- if device
or capturedMemoryContent
is null
.java.lang.IllegalArgumentException
- if id
, timeStamp
or timeStampMicros
is negative.public MMIOEvent(MMIODevice device, int id, long timeStamp, int timeStampMicros)
MMIOEvent
with the specified event ID and timestamp.device
- the source device.id
- the 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
, timeStamp
or timeStampMicros
is negative.public MMIOEvent(MMIODevice device, int id, T capturedRegisterValue, long timeStamp, int timeStampMicros)
MMIOEvent
with the specified event ID and timestamp, and
the captured value of the register designated upon registration.T
- the type of the captured value.device
- the source device.id
- the event ID.capturedRegisterValue
- the captured value of the register designated upon registration.timeStamp
- the timestamp (in milliseconds).timeStampMicros
- the additional microseconds to the timestamp.java.lang.NullPointerException
- if device
or capturedRegisterValue
is null
.java.lang.IllegalArgumentException
- if id
, timeStamp
or timeStampMicros
is negative.public java.nio.ByteBuffer getCapturedMemoryContent()
null
if no memory area or block content was
captured. If the listener was registered using the MMIODevice#setMMIOEventListener(int, int, ByteBuffer, jdk.dio.mmio.MMIOEventListener) method
the ByteBuffer
returned is the ByteBuffer
that was passed as the captureBuffer
parameter.MMIODevice.setMMIOEventListener(int, java.lang.String, jdk.dio.mmio.MMIOEventListener)
,
MMIODevice.setMMIOEventListener(int, int, ByteBuffer, jdk.dio.mmio.MMIOEventListener)
public <T extends java.lang.Number> T getCapturedRegisterValue()
T
- the type of the value held by the register.null
if no register value was captured.MMIODevice.setMMIOEventListener(int, java.lang.String, jdk.dio.mmio.MMIOEventListener)
public int getID()
Copyright © 2012, 2014, Oracle and/or its affiliates. All rights reserved.
Legal Notices