public class OpcUaSubscription extends Object implements UaSubscription
UaSubscription.ItemCreationCallback, UaSubscription.NotificationListener| Constructor and Description |
|---|
OpcUaSubscription(OpcUaClient client,
org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger subscriptionId,
double revisedPublishingInterval,
org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger revisedLifetimeCount,
org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger revisedMaxKeepAliveCount,
org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger maxNotificationsPerPublish,
boolean publishingEnabled,
org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UByte priority) |
| Modifier and Type | Method and Description |
|---|---|
void |
addNotificationListener(UaSubscription.NotificationListener listener)
|
CompletableFuture<List<org.eclipse.milo.opcua.stack.core.types.builtin.StatusCode>> |
addTriggeringLinks(org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger triggeringItemId,
List<org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger> linksToAdd)
Add triggering links between the item identified by
triggerItemId and the items identified by
linksToAdd. |
CompletableFuture<List<UaMonitoredItem>> |
createMonitoredItems(org.eclipse.milo.opcua.stack.core.types.enumerated.TimestampsToReturn timestampsToReturn,
List<org.eclipse.milo.opcua.stack.core.types.structured.MonitoredItemCreateRequest> itemsToCreate)
Create one or more
UaMonitoredItems. |
CompletableFuture<List<UaMonitoredItem>> |
createMonitoredItems(org.eclipse.milo.opcua.stack.core.types.enumerated.TimestampsToReturn timestampsToReturn,
List<org.eclipse.milo.opcua.stack.core.types.structured.MonitoredItemCreateRequest> itemsToCreate,
UaSubscription.ItemCreationCallback itemCreationCallback)
Create one or more
UaMonitoredItems. |
CompletableFuture<List<org.eclipse.milo.opcua.stack.core.types.builtin.StatusCode>> |
deleteMonitoredItems(List<UaMonitoredItem> itemsToDelete)
Delete on or more
UaMonitoredItems. |
org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger |
getMaxNotificationsPerPublish() |
com.google.common.collect.ImmutableList<UaMonitoredItem> |
getMonitoredItems() |
org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UByte |
getPriority() |
org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger |
getRequestedLifetimeCount() |
org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger |
getRequestedMaxKeepAliveCount() |
double |
getRequestedPublishingInterval() |
org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger |
getRevisedLifetimeCount() |
org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger |
getRevisedMaxKeepAliveCount() |
double |
getRevisedPublishingInterval() |
org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger |
getSubscriptionId() |
boolean |
isPublishingEnabled() |
CompletableFuture<List<org.eclipse.milo.opcua.stack.core.types.builtin.StatusCode>> |
modifyMonitoredItems(org.eclipse.milo.opcua.stack.core.types.enumerated.TimestampsToReturn timestampsToReturn,
List<org.eclipse.milo.opcua.stack.core.types.structured.MonitoredItemModifyRequest> itemsToModify)
Modify one or more
UaMonitoredItems. |
org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger |
nextClientHandle() |
void |
removeNotificationListener(UaSubscription.NotificationListener listener)
Remove a
UaSubscription.NotificationListener. |
CompletableFuture<List<org.eclipse.milo.opcua.stack.core.types.builtin.StatusCode>> |
removeTriggeringLinks(org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger triggeringItemId,
List<org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger> linksToRemove)
Remove triggering links between the item identified by
triggeringItemId and the items identified by
linksToRemove. |
CompletableFuture<List<org.eclipse.milo.opcua.stack.core.types.builtin.StatusCode>> |
setMonitoringMode(org.eclipse.milo.opcua.stack.core.types.enumerated.MonitoringMode monitoringMode,
List<UaMonitoredItem> items)
Set the
MonitoringMode for one or more UaMonitoredItems. |
CompletableFuture<org.eclipse.milo.opcua.stack.core.types.builtin.StatusCode> |
setPublishingMode(boolean publishingEnabled)
Set the publishing mode for this subscription.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddTriggeringLinks, removeTriggeringLinkspublic OpcUaSubscription(OpcUaClient client, org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger subscriptionId, double revisedPublishingInterval, org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger revisedLifetimeCount, org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger revisedMaxKeepAliveCount, org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger maxNotificationsPerPublish, boolean publishingEnabled, org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UByte priority)
public CompletableFuture<List<UaMonitoredItem>> createMonitoredItems(org.eclipse.milo.opcua.stack.core.types.enumerated.TimestampsToReturn timestampsToReturn, List<org.eclipse.milo.opcua.stack.core.types.structured.MonitoredItemCreateRequest> itemsToCreate)
UaSubscriptionUaMonitoredItems.
Callers must check the quality of each of the returned UaMonitoredItems; it is not to be assumed that
all items were created successfully. Any item with a bad quality will not be updated nor will it be part of the
subscription's bookkeeping.
WARNING: items must be created in MonitoringMode.Sampling and then later set to
MonitoringMode.Reporting after consumers have been set in order to avoid a race condition where
the initial values arrive before the consumers are set. Alternatively, you can use
UaSubscription.createMonitoredItems(TimestampsToReturn, List, ItemCreationCallback) to avoid this race condition.
createMonitoredItems in interface UaSubscriptiontimestampsToReturn - the TimestampsToReturn.itemsToCreate - a list of MonitoredItemCreateRequests.UaMonitoredItems.public CompletableFuture<List<UaMonitoredItem>> createMonitoredItems(org.eclipse.milo.opcua.stack.core.types.enumerated.TimestampsToReturn timestampsToReturn, List<org.eclipse.milo.opcua.stack.core.types.structured.MonitoredItemCreateRequest> itemsToCreate, UaSubscription.ItemCreationCallback itemCreationCallback)
UaSubscriptionUaMonitoredItems.
Callers must check the quality of each of the returned UaMonitoredItems; it is not to be assumed that
all items were created successfully. Any item with a bad quality will not be updated nor will it be part of the
subscription's bookkeeping.
itemCreationCallback will be invoked for each successfully created UaMonitoredItem. Callers
should use this opportunity to register any value or event consumers on the item, as this is the only time in
which it is guaranteed no values or events will be delivered to the item yet.
createMonitoredItems in interface UaSubscriptiontimestampsToReturn - the TimestampsToReturn.itemsToCreate - a list of MonitoredItemCreateRequests.itemCreationCallback - callback to be invoked for each successfully created UaMonitoredItem.UaMonitoredItems.public CompletableFuture<List<org.eclipse.milo.opcua.stack.core.types.builtin.StatusCode>> modifyMonitoredItems(org.eclipse.milo.opcua.stack.core.types.enumerated.TimestampsToReturn timestampsToReturn, List<org.eclipse.milo.opcua.stack.core.types.structured.MonitoredItemModifyRequest> itemsToModify)
UaSubscriptionUaMonitoredItems.modifyMonitoredItems in interface UaSubscriptiontimestampsToReturn - the TimestampsToReturn to set for each item.itemsToModify - a list of MonitoredItemModifyRequests.CompletableFuture containing a list of StatusCodes, the size and order matching that
of itemsToModify.public CompletableFuture<List<org.eclipse.milo.opcua.stack.core.types.builtin.StatusCode>> deleteMonitoredItems(List<UaMonitoredItem> itemsToDelete)
UaSubscriptionUaMonitoredItems.deleteMonitoredItems in interface UaSubscriptionitemsToDelete - the items to delete.CompletableFuture containing a list of StatusCodes, the size and order matching that
of itemsToDelete.public CompletableFuture<List<org.eclipse.milo.opcua.stack.core.types.builtin.StatusCode>> setMonitoringMode(org.eclipse.milo.opcua.stack.core.types.enumerated.MonitoringMode monitoringMode, List<UaMonitoredItem> items)
UaSubscriptionMonitoringMode for one or more UaMonitoredItems.setMonitoringMode in interface UaSubscriptionmonitoringMode - the MonitoringMode to set.items - the UaMonitoredItems to set the mode on.CompletableFuture containing a list of StatusCodes, the size and order matching that
of items.public CompletableFuture<org.eclipse.milo.opcua.stack.core.types.builtin.StatusCode> setPublishingMode(boolean publishingEnabled)
UaSubscriptionsetPublishingMode in interface UaSubscriptionpublishingEnabled - true if publishing should be enabled.CompletableFuture containing a StatusCode representing the result of this operation.public CompletableFuture<List<org.eclipse.milo.opcua.stack.core.types.builtin.StatusCode>> addTriggeringLinks(org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger triggeringItemId, List<org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger> linksToAdd)
UaSubscriptiontriggerItemId and the items identified by
linksToAdd.addTriggeringLinks in interface UaSubscriptiontriggeringItemId - the id of the triggering item.linksToAdd - the ids of the triggered items.StatusCodes corresponding to the items in linksToAdd.public CompletableFuture<List<org.eclipse.milo.opcua.stack.core.types.builtin.StatusCode>> removeTriggeringLinks(org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger triggeringItemId, List<org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger> linksToRemove)
UaSubscriptiontriggeringItemId and the items identified by
linksToRemove.removeTriggeringLinks in interface UaSubscriptiontriggeringItemId - the id of the triggering item.linksToRemove - the ids of the triggered items.StatusCodes corresponding to the items in linksToRemove.public org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger getSubscriptionId()
getSubscriptionId in interface UaSubscriptionUaSubscription.public double getRequestedPublishingInterval()
getRequestedPublishingInterval in interface UaSubscriptionUaSubscription.public double getRevisedPublishingInterval()
getRevisedPublishingInterval in interface UaSubscriptionUaSubscription.public org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger getRequestedLifetimeCount()
getRequestedLifetimeCount in interface UaSubscriptionUaSubscription.public org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger getRevisedLifetimeCount()
getRevisedLifetimeCount in interface UaSubscriptionUaSubscription.public org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger getRequestedMaxKeepAliveCount()
getRequestedMaxKeepAliveCount in interface UaSubscriptionUaSubscription.public org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger getRevisedMaxKeepAliveCount()
getRevisedMaxKeepAliveCount in interface UaSubscriptionUaSubscription.public org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger getMaxNotificationsPerPublish()
getMaxNotificationsPerPublish in interface UaSubscriptionpublic boolean isPublishingEnabled()
isPublishingEnabled in interface UaSubscriptiontrue if publishing is enabled.public org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UByte getPriority()
getPriority in interface UaSubscriptionUaSubscription.public com.google.common.collect.ImmutableList<UaMonitoredItem> getMonitoredItems()
getMonitoredItems in interface UaSubscriptionImmutableList of this UaSubscription's UaMonitoredItems.public org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger nextClientHandle()
nextClientHandle in interface UaSubscriptionUaSubscription.public void addNotificationListener(UaSubscription.NotificationListener listener)
UaSubscriptionaddNotificationListener in interface UaSubscriptionlistener - the UaSubscription.NotificationListener to add.public void removeNotificationListener(UaSubscription.NotificationListener listener)
UaSubscriptionUaSubscription.NotificationListener.removeNotificationListener in interface UaSubscriptionlistener - the UaSubscription.NotificationListener to remove.Copyright © 2021. All rights reserved.