public class GenerationEvent extends PeripheralEvent
GenerationEvent class encapsulates DAC channel analog output generation completion conditions. A
GenerationEvent may indicate that:
GenerationEvent, the application may copy more output values to be converted in the buffer
section designated by getValues(), getOffset() and getNumber(). The application must set the
actual number of output values copied by calling setActualNumber(int). If the actual number is set to a
value smaller than the length of the designated buffer section (as given by getNumber()) the current
asynchronous analog output generation will stop after these last provided output values have been converted
as if from a call to DACChannel.stopGeneration().
This kind of events is never coalesced.count, lastTimeStamp, lastTimeStampMicros, peripheral, timeStamp, timeStampMicros| Constructor and Description |
|---|
GenerationEvent(DACChannel channel,
int[] values,
int offset,
int number)
Creates a new
GenerationEvent with the specified raw output value buffer and time-stamped with the
current time. |
GenerationEvent(DACChannel channel,
int[] values,
int offset,
int number,
long timeStamp,
int timeStampMicros)
Creates a new
GenerationEvent with the specified raw output value buffer and timestamp. |
| Modifier and Type | Method and Description |
|---|---|
int |
getActualNumber()
Returns the actual number of values to output that were copied to the
values buffer. |
int |
getNumber()
Returns the maximum number of values to output that can be copied to the
values buffer. |
int |
getOffset()
Returns the offset in the
values buffer where to start copying the values to output. |
int[] |
getValues()
Returns the buffer where the values to output must be copied.
|
void |
setActualNumber(int actualNumber)
Sets the actual number of values to output that were copied to the
values buffer. |
getCount, getLastTimeStamp, getLastTimeStampMicros, getPeripheral, getTimeStamp, getTimeStampMicrospublic GenerationEvent(DACChannel channel, int[] values, int offset, int number)
GenerationEvent with the specified raw output value buffer and time-stamped with the
current time.channel - the source DAC channel.values - the buffer where the values to output must be copied.offset - the offset in the values buffer where to start copying the values to output.number - the maximum number of values to output that can be copied to the values buffer.java.lang.NullPointerException - if channel or values is null.java.lang.IndexOutOfBoundsException - if offset and/or number would result in pointing outside of values.public GenerationEvent(DACChannel channel, int[] values, int offset, int number, long timeStamp, int timeStampMicros)
GenerationEvent with the specified raw output value buffer and timestamp.channel - the source DAC channel.values - the buffer where the values to output must be copied.offset - the offset in the values buffer where to start copying the values to output.number - the maximum number of values to output that can be copied to the values buffer.timeStamp - the timestamp (in milliseconds).timeStampMicros - the additional microseconds to the timestamp.java.lang.NullPointerException - if channel or values is null.java.lang.IllegalArgumentException - if timeStamp or timeStampMicros is negative.java.lang.IndexOutOfBoundsException - if offset and/or number would result in pointing outside of values.public int getActualNumber()
values buffer.values buffer.public int getNumber()
values buffer.values buffer.public int getOffset()
values buffer where to start copying the values to output. This offset is
within the range defined by the parameters passed to DACChannel.startGeneration(int[], int, int, boolean, com.oracle.deviceaccess.dac.GenerationListener).values buffer where to start copying the values to output.public int[] getValues()
DACChannel.startGeneration(int[], int, int, boolean, com.oracle.deviceaccess.dac.GenerationListener).public void setActualNumber(int actualNumber)
values buffer. If the provided value
is smaller than the length of the designated buffer section as given by getNumber() then the current
asynchronous analog output generation will be stopped as if from a call to DACChannel.stopGeneration().actualNumber - the actual number of values to output that were copied to the values buffer.java.lang.IndexOutOfBoundsException - if actualNumber is negative or is larger than the number returned by getNumber().Copyright (c) 2012, Oracle and/or its affiliates. All Rights Reserved. Use of this specification is subject to license terms.