com.prosysopc.ua.server
Class MonitoredItem

java.lang.Object
  extended by com.prosysopc.ua.MonitoredItemBase
      extended by com.prosysopc.ua.server.MonitoredItem
Direct Known Subclasses:
MonitoredDataItem, MonitoredEventItem

public abstract class MonitoredItem
extends MonitoredItemBase

An OPC UA server side MonitoredItem definition, used by the server side Subscription.


Field Summary
protected  List<MonitoredItem> links
           
protected  UaNode node
           
protected  Subscription subscription
           
 
Fields inherited from class com.prosysopc.ua.MonitoredItemBase
attributeId, clientHandle, dataEncoding, discardOldest, maxQueueSize, monitoredItemId, monitoringMode, nodeId, queueSize
 
Constructor Summary
MonitoredItem(ServiceContext serviceContext, Subscription subscription, org.opcfoundation.ua.builtintypes.UnsignedInteger monitoredItemId, org.opcfoundation.ua.builtintypes.NodeId nodeId, org.opcfoundation.ua.builtintypes.UnsignedInteger attributeId, org.opcfoundation.ua.core.MonitoringMode monitoringMode)
           
 
Method Summary
protected  void addLink(MonitoredItem linkToAdd)
           
 void close()
          Close down the monitoredItem, i.e. unplug the NodeListener.
 boolean equals(Object obj)
           
static int getMaxQueueSize()
          The maximum size of the queue of MonitoredItems.
 UaNode getNode()
           
 ServiceContext getServiceContext()
          The service context that was used to create or modify the item.
 Subscription getSubscription()
           
 org.opcfoundation.ua.core.TimestampsToReturn getTimestampsToReturn()
          An enumeration that specifies the time stamp Attributes to be transmitted for each MonitoredItem.
 int hashCode()
           
protected  void monitoringModeChanged()
           
protected  void plugNodeListener()
           
protected  void removeLink(MonitoredItem linkToRemove)
          Removes a link
protected  void setClientHandle(org.opcfoundation.ua.builtintypes.UnsignedInteger clientHandle)
          Client-supplied ID of the MonitoredItem.
protected  void setFilter(org.opcfoundation.ua.core.MonitoringFilter filter)
          A filter used by the Server to determine if the MonitoredItem should generate a Notification.
protected  void setFilterResult(org.opcfoundation.ua.core.MonitoringFilterResult filterResult)
           
static void setMaxQueueSize(int maxQueueSize)
          Define the maximum size of the queue of each MonitoredItem.
protected  void setNode(UaNode node)
           
protected  void setServiceContext(ServiceContext serviceContext)
           
protected  void setTimestampsToReturn(org.opcfoundation.ua.core.TimestampsToReturn timestampsToReturn)
           
protected  void unPlugNodeListener()
           
 
Methods inherited from class com.prosysopc.ua.MonitoredItemBase
getAttributeId, getClientHandle, getDataEncoding, getDefaultQueueSize, getFilter, getFilterResult, getIndexRange, getMonitoredItemId, getMonitoringMode, getNodeId, getQueueSize, getSamplingInterval, isDiscardOldest, setDiscardOldest, setMonitoredItemId, setMonitoringMode, setQueueSize, setQueueSize, toString, updateFilter, updateQueue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

links

protected List<MonitoredItem> links

node

protected UaNode node

subscription

protected final Subscription subscription
Constructor Detail

MonitoredItem

public MonitoredItem(ServiceContext serviceContext,
                     Subscription subscription,
                     org.opcfoundation.ua.builtintypes.UnsignedInteger monitoredItemId,
                     org.opcfoundation.ua.builtintypes.NodeId nodeId,
                     org.opcfoundation.ua.builtintypes.UnsignedInteger attributeId,
                     org.opcfoundation.ua.core.MonitoringMode monitoringMode)
Parameters:
serviceContext -
monitoredItemId -
nodeId -
attributeId -
indexRange -
dataEncoding -
monitoringMode -
Method Detail

getMaxQueueSize

public static int getMaxQueueSize()
The maximum size of the queue of MonitoredItems.

Returns:
the maxQueueSize

setMaxQueueSize

public static void setMaxQueueSize(int maxQueueSize)
Define the maximum size of the queue of each MonitoredItem.

Default: 1000000

Parameters:
maxQueueSize - the maxQueueSize to set, must be bigger than 0

close

public void close()
Close down the monitoredItem, i.e. unplug the NodeListener.

Overrides:
close in class MonitoredItemBase

equals

public boolean equals(Object obj)
Overrides:
equals in class MonitoredItemBase

getNode

public UaNode getNode()

getServiceContext

public ServiceContext getServiceContext()
The service context that was used to create or modify the item.

Returns:

getSubscription

public Subscription getSubscription()
Returns:
the subscription

getTimestampsToReturn

public org.opcfoundation.ua.core.TimestampsToReturn getTimestampsToReturn()
An enumeration that specifies the time stamp Attributes to be transmitted for each MonitoredItem.

When monitoring Events, this applies only to Event fields that are of type DataValue.

Returns:

hashCode

public int hashCode()
Overrides:
hashCode in class MonitoredItemBase

addLink

protected void addLink(MonitoredItem linkToAdd)

monitoringModeChanged

protected void monitoringModeChanged()
                              throws ServiceException
Overrides:
monitoringModeChanged in class MonitoredItemBase
Throws:
ServiceException

plugNodeListener

protected void plugNodeListener()

removeLink

protected void removeLink(MonitoredItem linkToRemove)
                   throws StatusException
Removes a link

Parameters:
linkToRemove -
Throws:
StatusException

setClientHandle

protected void setClientHandle(org.opcfoundation.ua.builtintypes.UnsignedInteger clientHandle)
Client-supplied ID of the MonitoredItem. This ID is used in Notifications generated for the list Node.

Parameters:
clientHandle -

setFilter

protected final void setFilter(org.opcfoundation.ua.core.MonitoringFilter filter)
                        throws ServiceException
Description copied from class: MonitoredItemBase
A filter used by the Server to determine if the MonitoredItem should generate a Notification. If not used, this parameter is null. The filter type depends on type of item being monitored. The main types are
DataChangeFilter The change in a data value that will cause a Notification to be generated.
EventFilter If a Notification conforms to the EventFilter, the Notification is sent to the Client.
AggregateFilter The aggregate and its intervals when it will be calculated and a Notification is generated.
See the respective type definitions in org.opcfoundation.org.core.

Overrides:
setFilter in class MonitoredItemBase
Throws:
ServiceException

setFilterResult

protected void setFilterResult(org.opcfoundation.ua.core.MonitoringFilterResult filterResult)
Overrides:
setFilterResult in class MonitoredItemBase
Parameters:
filterResult -

setNode

protected void setNode(UaNode node)
Parameters:
node -

setServiceContext

protected void setServiceContext(ServiceContext serviceContext)

setTimestampsToReturn

protected void setTimestampsToReturn(org.opcfoundation.ua.core.TimestampsToReturn timestampsToReturn)
Parameters:
timestampsToReturn -

unPlugNodeListener

protected void unPlugNodeListener()


Copyright © 2018. All rights reserved.