|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.prosysopc.ua.MonitoredItemBase
public abstract class MonitoredItemBase
The base class for all OPCUA MonitoredItems. It defines the necessary properties for every item.
| Field Summary | |
|---|---|
protected org.opcfoundation.ua.builtintypes.UnsignedInteger |
attributeId
|
protected org.opcfoundation.ua.builtintypes.UnsignedInteger |
clientHandle
|
protected org.opcfoundation.ua.builtintypes.QualifiedName |
dataEncoding
|
protected boolean |
discardOldest
|
protected static int |
maxQueueSize
|
protected org.opcfoundation.ua.builtintypes.UnsignedInteger |
monitoredItemId
|
protected org.opcfoundation.ua.core.MonitoringMode |
monitoringMode
|
protected org.opcfoundation.ua.builtintypes.NodeId |
nodeId
|
protected long |
queueSize
|
| Constructor Summary | |
|---|---|
MonitoredItemBase(org.opcfoundation.ua.builtintypes.UnsignedInteger clientHandle,
org.opcfoundation.ua.builtintypes.UnsignedInteger monitoredItemId,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
org.opcfoundation.ua.builtintypes.UnsignedInteger attributeId,
org.opcfoundation.ua.core.MonitoringMode monitoringMode)
Create a new monitored item in a subscription. |
|
| Method Summary | |
|---|---|
void |
close()
Close down the monitoredItem, when it is removed from the subscription. |
boolean |
equals(Object obj)
|
org.opcfoundation.ua.builtintypes.UnsignedInteger |
getAttributeId()
|
org.opcfoundation.ua.builtintypes.UnsignedInteger |
getClientHandle()
Client-supplied id of the MonitoredItem. |
org.opcfoundation.ua.builtintypes.QualifiedName |
getDataEncoding()
|
protected abstract long |
getDefaultQueueSize()
|
org.opcfoundation.ua.core.MonitoringFilter |
getFilter()
A filter used by the Server to determine if the MonitoredItem should generate a Notification. |
org.opcfoundation.ua.core.MonitoringFilterResult |
getFilterResult()
|
org.opcfoundation.ua.utils.NumericRange |
getIndexRange()
Optional subrange of an array to monitor to. |
org.opcfoundation.ua.builtintypes.UnsignedInteger |
getMonitoredItemId()
|
org.opcfoundation.ua.core.MonitoringMode |
getMonitoringMode()
See the setter for a full description. |
org.opcfoundation.ua.builtintypes.NodeId |
getNodeId()
|
long |
getQueueSize()
|
double |
getSamplingInterval()
The SamplingInterval. |
int |
hashCode()
|
boolean |
isDiscardOldest()
|
protected void |
monitoringModeChanged()
|
void |
setDiscardOldest(boolean discardOldest)
A boolean parameter that specifies the discard policy when the queue is full and a new Notification is to be enqueued. |
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)
|
protected void |
setMonitoredItemId(org.opcfoundation.ua.builtintypes.UnsignedInteger monitoredItemId)
|
void |
setMonitoringMode(org.opcfoundation.ua.core.MonitoringMode monitoringMode)
Set the monitoring mode. |
void |
setQueueSize(long queueSize)
The requested size of the MonitoredItem queue. |
void |
setQueueSize(org.opcfoundation.ua.builtintypes.UnsignedInteger queueSize)
|
String |
toString()
|
protected void |
updateFilter()
React to changes in the filter. |
protected void |
updateQueue()
Update the queue, when it's size has changed. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static int maxQueueSize
protected final org.opcfoundation.ua.builtintypes.UnsignedInteger attributeId
protected org.opcfoundation.ua.builtintypes.UnsignedInteger clientHandle
protected final org.opcfoundation.ua.builtintypes.QualifiedName dataEncoding
protected boolean discardOldest
protected org.opcfoundation.ua.builtintypes.UnsignedInteger monitoredItemId
protected volatile org.opcfoundation.ua.core.MonitoringMode monitoringMode
protected final org.opcfoundation.ua.builtintypes.NodeId nodeId
protected long queueSize
| Constructor Detail |
|---|
public MonitoredItemBase(org.opcfoundation.ua.builtintypes.UnsignedInteger clientHandle,
org.opcfoundation.ua.builtintypes.UnsignedInteger monitoredItemId,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
org.opcfoundation.ua.builtintypes.UnsignedInteger attributeId,
org.opcfoundation.ua.core.MonitoringMode monitoringMode)
clientHandle - a handle used to identify the item in the client side, assigned by the
clientmonitoredItemId - the ID used to identify the item in the server side, assigned by the
servernodeId - the NodeId of the node to monitorattributeId - the attribute to monitormonitoringMode - the initial monitoring mode for the item. Specifies whether sampling and
reporting are enabled or disabled for a MonitoredItem.| Method Detail |
|---|
public void close()
public boolean equals(Object obj)
equals in class Objectpublic org.opcfoundation.ua.builtintypes.UnsignedInteger getAttributeId()
public org.opcfoundation.ua.builtintypes.UnsignedInteger getClientHandle()
getMonitoredItemId()public org.opcfoundation.ua.builtintypes.QualifiedName getDataEncoding()
public org.opcfoundation.ua.core.MonitoringFilter getFilter()
public org.opcfoundation.ua.core.MonitoringFilterResult getFilterResult()
public org.opcfoundation.ua.utils.NumericRange getIndexRange()
public org.opcfoundation.ua.builtintypes.UnsignedInteger getMonitoredItemId()
getClientHandle()public org.opcfoundation.ua.core.MonitoringMode getMonitoringMode()
setMonitoringMode(MonitoringMode)public org.opcfoundation.ua.builtintypes.NodeId getNodeId()
public long getQueueSize()
setQueueSize(long)public double getSamplingInterval()
public int hashCode()
hashCode in class Objectpublic boolean isDiscardOldest()
setDiscardOldest(boolean)public void setDiscardOldest(boolean discardOldest)
true
| the oldest (first) Notification in the queue is discarded. The new Notification is added to
the end of the queue.
| false
| the new Notification is discarded. The queue is unchanged.
| |
discardOldest - the new value to set
public void setMonitoringMode(org.opcfoundation.ua.core.MonitoringMode monitoringMode)
throws ServiceException
The value of the publishing enabled parameter for a Subscription does not affect the value of the monitoring mode for a MonitoredItem of the Subscription
The values are
| Value | Description> |
|---|---|
| Disabled | The item is not sampled nor reported. |
| Sampling | The item is sampled, but not reported. |
| Reporting | The item is sampled and reported. |
Note: This method changes the mode of a single item. If you wish to change several items
at once from the client side, use
Subscription#setMonitoringMode(MonitoringMode, com.prosysopc.ua.client.MonitoredItem...)
instead.
monitoringMode - the new monitoring mode to set.
ServiceException - if the mode change failsgetMonitoringMode(),
SubscriptionBase.setPublishingEnabled(boolean)
public void setQueueSize(long queueSize)
throws ServiceException
The following values have special meaning:
| Value | Meaning |
|---|---|
| 1 | the queue has a single entry, effectively disabling queuing. |
| >1 | a first-in-first-out queue is to be used. |
| Max Value (UnsignedInteger.MAX_VALUE.getValue()) | the max size that the Server can support. This is used for Event Notifications. In this case the Server is responsible for the Event buffer. |
queueSize - the value must be between 0 and UnsignedInteger.MAX_VALUE.getValue(). Value of
0 is changed to 1.
ServiceException
public void setQueueSize(org.opcfoundation.ua.builtintypes.UnsignedInteger queueSize)
throws ServiceException
queueSize -
ServiceExceptionpublic String toString()
toString in class Objectprotected abstract long getDefaultQueueSize()
protected void monitoringModeChanged()
throws ServiceException
ServiceException
protected void setFilter(org.opcfoundation.ua.core.MonitoringFilter filter)
throws ServiceException
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.
| |
filter -
StatusException
ServiceExceptionprotected void setFilterResult(org.opcfoundation.ua.core.MonitoringFilterResult filterResult)
filterResult - the filterResult to setprotected void setMonitoredItemId(org.opcfoundation.ua.builtintypes.UnsignedInteger monitoredItemId)
protected void updateFilter()
throws ServiceException
StatusException
ServiceException
protected void updateQueue()
throws ServiceException
ServiceException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||