public class ManagedDataItem extends ManagedItem
| Modifier and Type | Class and Description |
|---|---|
static interface |
ManagedDataItem.DataValueListener
A callback that receives notification of new values for a
ManagedDataItem. |
client, monitoredItem, subscription| Modifier and Type | Method and Description |
|---|---|
ManagedDataItem.DataValueListener |
addDataValueListener(Consumer<org.eclipse.milo.opcua.stack.core.types.builtin.DataValue> consumer)
|
void |
addDataValueListener(ManagedDataItem.DataValueListener dataValueListener)
Add a
ManagedDataItem.DataValueListener to this ManagedDataItem. |
CompletableFuture<org.eclipse.milo.opcua.stack.core.util.Unit> |
deleteAsync()
Delete this
ManagedDataItem. |
double |
getSamplingInterval()
Get this item's current sampling interval, i.e.
|
boolean |
removeDataValueListener(ManagedDataItem.DataValueListener dataValueListener)
Remove a
ManagedDataItem.DataValueListener from this ManagedDataItem. |
double |
setSamplingInterval(double samplingInterval)
Request a new sampling interval for this item.
|
CompletableFuture<Double> |
setSamplingIntervalAsync(double samplingInterval)
Request a new sampling interval for this item.
|
CompletableFuture<Double> |
setSamplingIntervalAsync(double samplingInterval,
BatchModifyMonitoredItems batch)
Request a new sampling interval for this item as part of a batch operation.
|
delete, getClient, getDiscardOldest, getMonitoredItem, getMonitoringMode, getNodeId, getQueueSize, getReadValueId, getStatusCode, getSubscription, getTimestampsToReturn, setDiscardOldest, setDiscardOldestAsync, setDiscardOldestAsync, setMonitoringMode, setMonitoringModeAsync, setMonitoringModeAsync, setQueueSize, setQueueSizeAsync, setQueueSizeAsync, setTimestampsToReturn, setTimestampsToReturnAsync, setTimestampsToReturnAsyncpublic CompletableFuture<org.eclipse.milo.opcua.stack.core.util.Unit> deleteAsync()
ManagedItemManagedDataItem.
This call completes asynchronously.
deleteAsync in class ManagedItemCompletableFuture that completes successfully if the operation succeeds or completes
exceptionally if an operation- or service-level error occurs.public double getSamplingInterval()
UaMonitoredItem.getRevisedSamplingInterval()public double setSamplingInterval(double samplingInterval)
throws org.eclipse.milo.opcua.stack.core.UaException
samplingInterval - the new sampling interval to request.org.eclipse.milo.opcua.stack.core.UaException - if an operation- or service-level error occurs.public CompletableFuture<Double> setSamplingIntervalAsync(double samplingInterval)
This call completes asynchronously.
samplingInterval - the new sampling interval to request.CompletableFuture that completes successfully with the new sampling interval, possibly revised
by the server, or completes exceptionally if an operation- or service-level error occurs.public CompletableFuture<Double> setSamplingIntervalAsync(double samplingInterval, BatchModifyMonitoredItems batch)
samplingInterval - the new sampling interval to request.batch - the BatchModifyMonitoredItems operation.CompletableFuture that completes successfully with the new sampling interval, possibly revised
by the server, or completes exceptionally if an operation- or service-level error occurred.public ManagedDataItem.DataValueListener addDataValueListener(Consumer<org.eclipse.milo.opcua.stack.core.types.builtin.DataValue> consumer)
DataValue Consumer to this ManagedDataItem.
consumer will be invoked any time a new DataValue arrives for this item.
The Consumer is transformed into the returned ManagedDataItem.DataValueListener that can later be removed.
Listeners should be added in the callback that happens during item creation in the
ManagedSubscription.createDataItem(double, ReadValueId, Consumer) and
ManagedSubscription.createDataItemsAsync(double, List, Consumer) to avoid a possible
race condition between the initial value arriving and the listener being registered.
consumer - a DataValue Consumer.ManagedDataItem.DataValueListener that can later be removed.public void addDataValueListener(ManagedDataItem.DataValueListener dataValueListener)
ManagedDataItem.DataValueListener to this ManagedDataItem.
listener will be invoked any time a new DataValue arrives for this item.
Listeners should be added in the callback that happens during item creation in the
ManagedSubscription.createDataItem(double, ReadValueId, Consumer) and
ManagedSubscription.createDataItemsAsync(double, List, Consumer) to avoid a possible
race condition between the initial value arriving and the listener being registered.
dataValueListener - the ManagedDataItem.DataValueListener to add.public boolean removeDataValueListener(ManagedDataItem.DataValueListener dataValueListener)
ManagedDataItem.DataValueListener from this ManagedDataItem.dataValueListener - the ManagedDataItem.DataValueListener to remove.true if the listener was removed.Copyright © 2021. All rights reserved.