Reference
OpcMonitoredItem Members
Represents a node and one of its attributes (= node data) to subscribe to monitor data changes or events on the node.
Reference
OpcMonitoredItem Members
- Type
- OpcMonitoredItem
- Namespace
- Opc.UaFx.Client
- Assembly
- Opc.UaFx.Advanced.dll
- Package
- Opc.UaFx.Advanced v2.59.0
- Also in
- Opc.UaFx.Client
Constructors
OpcMonitoredItem
| Overload | Description |
|---|---|
| OpcMonitoredItem( | Initializes a new instance of the OpcMonitoredItem class using the nodeId and attribute specified. |
| OpcMonitoredItem( | Initializes a new instance of the OpcMonitoredItem class using the nodeId, attribute and filter specified. |
Exceptions (all overloads)
| Exception | Condition |
|---|---|
| Argument | The nodeId is a null reference ( |
OpcMonitoredItem(OpcNodeId, OpcAttribute)
Initializes a new instance of the OpcMonitoredItem class using the nodeId and attribute specified.
public OpcMonitoredItem(OpcNodeId nodeId, OpcAttribute attribute)Public Sub New(nodeId As OpcNodeId, attribute As OpcAttribute)Parameters
| Name | Type | Description |
|---|---|---|
nodeId | OpcNodeId | The OpcNodeId of the node to monitor. |
attribute | OpcAttribute | The OpcAttribute of the node to monitor. |
OpcMonitoredItem(OpcNodeId, OpcAttribute, OpcMonitoringFilter)
Initializes a new instance of the OpcMonitoredItem class using the nodeId, attribute and filter specified.
public OpcMonitoredItem(
OpcNodeId nodeId,
OpcAttribute attribute,
OpcMonitoringFilter filter)Public Sub New(
nodeId As OpcNodeId,
attribute As OpcAttribute,
filter As OpcMonitoringFilter)Parameters
| Name | Type | Description |
|---|---|---|
nodeId | OpcNodeId | The OpcNodeId of the node to monitor. |
attribute | OpcAttribute | The OpcAttribute of the node to monitor. |
filter | Opc | The Opc |
Properties
Attribute
Gets or sets the OpcAttribute to monitor.
public OpcAttribute Attribute { get; set; }Public Property Attribute As OpcAttributeProperty value
One of the members defined by the OpcAttribute enumeration.
CacheQueueSize
Gets or sets the total number of notifications which can be queued in the OpcMonitoredItem related notification cache.
public int CacheQueueSize { get; set; }Public Property CacheQueueSize As IntegerProperty value
The total number of notifications which can be queued.
Remarks
Using a value less than the current value of this property results into a shrink of the used queue. The queue will then delete all entries exceeding the new size.
ClientID
Gets the client-assigned unique identifier for this OpcMonitoredItem.
public long ClientID { get; }Public ReadOnly Property ClientID As LongProperty value
The client-assigned unique identifier for this OpcMonitoredItem.
Remarks
The identifier shall be unique for the entire session in order to allow received OpcNotification instances to be associated with and delegated to this OpcMonitoredItem.
DisplayName
Gets or sets the name of the OpcMonitoredItem used just for display purpose in the client application.
public string DisplayName { get; set; }Public Property DisplayName As StringProperty value
The name of the OpcMonitoredItem used just for display purpose in the client application.
Encoding
Gets or sets the name of the data encoding to use.
public OpcName Encoding { get; set; }Public Property Encoding As OpcNameProperty value
The OpcName which refers to the type of data encoding to use or a null reference (Nothing in Visual Basic) if the default encoding of the client is to be used.
Remarks
The name of the encodings supported depends on the server.
Filter
Gets or sets the filter to evaluate while generating notifications for this OpcMonitoredItem.
public OpcMonitoringFilter Filter { get; set; }Public Property Filter As OpcMonitoringFilterProperty value
An instance of the OpcDataChangeFilter class to filter data change related notifications, an instance of the OpcEventFilter class to filter events related notifications or a null reference (Nothing in Visual Basic) if no filtering is to be applied to the notifications generated for this OpcMonitoredItem.
IndexRange
Gets or sets the range of array indeces to monitor.
public string IndexRange { get; set; }Public Property IndexRange As StringProperty value
A string expressing the indeces to monitor.
IsCreated
Gets a value indicating whether this OpcMonitoredItem has been created on the server.
public bool IsCreated { get; }Public ReadOnly Property IsCreated As BooleanProperty value
The value true if the OpcMonitoredItem has been created on the server; otherwise the value false.
IsModified
Gets a value indicating whether this OpcMonitoredItem has been modified since it has been created on the server or since its previous changes has been committed to the server.
public bool IsModified { get; }Public ReadOnly Property IsModified As BooleanProperty value
The value true if the OpcMonitoredItem has been modified; otherwise the value false.
LastDataChange
Gets the last data change-related notification data received from the server.
public OpcDataChangeDataSetItem LastDataChange { get; }Public ReadOnly Property LastDataChange As OpcDataChangeDataSetItemProperty value
An instance of the OpcDataChangeDataSetItem class which represents the last data change-related notifiction data received from the server or a null reference (Nothing in Visual Basic). For more details see LastNotification.
LastEvent
Gets the last event-related notification data received from the server.
public OpcEventDataSetItem LastEvent { get; }Public ReadOnly Property LastEvent As OpcEventDataSetItemProperty value
An instance of the OpcEventDataSetItem class which represents the last event-related notifiction data received from the server or a null reference (Nothing in Visual Basic). For more details see LastNotification.
LastNotification
Gets the last notification received from the server.
public OpcNotification LastNotification { get; }Public ReadOnly Property LastNotification As OpcNotificationProperty value
An instance of the OpcNotification class which represents the last notification received from the server or a null reference (Nothing in Visual Basic) if the OpcMonitoredItem has not yet received a notification from the server or MaxMessageCount of the Subscription (this monitored item belongs to) is less or equals zero. In addition if UseMonitoredItemDataCache of the Subscription is equals to the value false this property returns a null reference (Nothing in Visual Basic) as well.
MonitoringMode
Gets or sets the monitoring mode which applies to the monitored item.
public OpcMonitoringMode MonitoringMode { get; set; }Public Property MonitoringMode As OpcMonitoringModeProperty value
One of the members defined by the OpcMonitoringMode enumeration.
NodeCategory
Gets or sets the kind of node to monitor.
public OpcNodeCategory NodeCategory { get; set; }Public Property NodeCategory As OpcNodeCategoryProperty value
One of the members defined by the OpcNodeCategory enumeration.
NodeId
Gets or sets the node identifier of the node to monitor.
public OpcNodeId NodeId { get; set; }Public Property NodeId As OpcNodeIdProperty value
An instance of the OpcNodeId class identifying the node on which a node its Attribute is to be monitored.
QueueMode
Gets or sets the mode used to enqueue and dequeue notification data items.
public OpcMonitoredItemQueueMode QueueMode { get; set; }Public Property QueueMode As OpcMonitoredItemQueueModeProperty value
One of the members defined by the OpcMonitoredItemQueueMode enumeration.
Remarks
This property maps the OpcMonitoredItemQueueMode value specified to the 'DiscardOldest' property in the foundation stack. Regarding the specification this means 'MonitoringParameters.DiscardOldest' which is configured in the foundations stack via 'MonitoredItem.DiscardOldest'.
QueueSize
Gets or sets a value which defines the requested total number of notifications the server shall queue for this OpcMonitoredItem.
public long QueueSize { get; set; }Public Property QueueSize As LongProperty value
The total number of notifications queued by the server. The default value of this property is 1000.
Remarks
In case of monitoring data changes the value zero or one means the server shall use the default queue size (which is by default one - the queuing is effectively disabled). In case of a queue overflow, the IsOverflow property of the Status in the OpcValue instances reported is set to the value true.
In case of monitoring events the value zero means the server shall use the default queue size. Using the value one means the server shall use the minimum or the value MaxValue the server shall use the maximum queue size the server requires/supports for event notifications.
The value of the underlying property is an uint which is covered using a long to assure CLS compliance. In fact this restricts the value range of this property to MinValue and MaxValue.
RelativePath
Gets or sets the relative path to the node to monitor starting at the node identified by the NodeId.
public string RelativePath { get; set; }Public Property RelativePath As StringProperty value
A string expressing the relative path to the node to monitor.
ResolvedNodeId
Gets the resolved node identifier of the node to monitor.
public OpcNodeId ResolvedNodeId { get; }Public ReadOnly Property ResolvedNodeId As OpcNodeIdProperty value
An instance of the OpcNodeId class identifying the resolved node to monitor instead of the one referred to by NodeId. In case there the RelativePath is unspecified the NodeId.
SamplingInterval
Gets or sets the requested number of milliseconds of the interval within the server have to access and evaluate this OpcMonitoredItem.
public int SamplingInterval { get; set; }Public Property SamplingInterval As IntegerProperty value
The interval within the server have to cyclical access and evaluate the Attribute of the monitored node (identified by the NodeId) regarding the Filter condition to determine the need to generate a notification for this OpcMonitoredItem.
Remarks
The value 0 indicates that the server should use the fastest practical rate. The value -1 (or less) indicates that the same interval is to be used as the Subscription uses for the PublishingInterval (this is default sampling interval for the monitored items of the Subscription).
The used sampling interval is not changed if the publishing interval is changed by a subsequent modification of the Subscription.
Status
Gets the status information which defines the servers ability to define/provide a monitored item configured like this OpcMonitoredItem.
public OpcMonitoredItemStatus Status { get; }Public ReadOnly Property Status As OpcMonitoredItemStatusProperty value
An instance of the OpcMonitoredItemStatus class representing the status information assoicated with this OpcMonitoredItem.
Subscription
Gets the OpcSubscription this OpcMonitoredItem belongs to.
public OpcSubscription Subscription { get; }Public ReadOnly Property Subscription As OpcSubscriptionProperty value
An instance of the OpcSubscription which owns this OpcMonitoredItem and it is part of its MonitoredItems.
Tag
Gets or sets the object that contains additional user data about the monitored item.
public object Tag { get; set; }Public Property Tag As ObjectProperty value
An object that contains additional user data about the monitored item. The default is null (Nothing in Visual Basic).
Methods
OnDataChangeReceived
Raises the DataChangeReceived event of the OpcMonitoredItem.
protected virtual void OnDataChangeReceived(OpcDataChangeReceivedEventArgs e)Protected Overridable Sub OnDataChangeReceived(
e As OpcDataChangeReceivedEventArgs)Parameters
| Name | Type | Description |
|---|---|---|
e | Opc | The event data. |
OnEventReceived
Raises the EventReceived event of the OpcMonitoredItem.
protected virtual void OnEventReceived(OpcEventReceivedEventArgs e)Protected Overridable Sub OnEventReceived(e As OpcEventReceivedEventArgs)Parameters
| Name | Type | Description |
|---|---|---|
e | Opc | The event data. |
ToString
Returns a string that represents the current OpcMonitoredItem.
public override string ToString()Public Overrides Function ToString() As StringReturns
A string that represents the current OpcMonitoredItem including the used DisplayName, the NodeId, ResolvedNodeId and the Attribute.
Overrides
Events
DataChangeReceived
Occurs when a data change notification has been received.
public event OpcDataChangeReceivedEventHandler DataChangeReceivedPublic Event DataChangeReceived As OpcDataChangeReceivedEventHandlerEvent type
OpcDataChangeReceivedEventHandler
EventReceived
Occurs when an event notification has been received.
public event OpcEventReceivedEventHandler EventReceivedPublic Event EventReceived As OpcEventReceivedEventHandlerEvent type

