Namespace: Opc.UaFx.Client
Assemblies: Opc.UaFx.Advanced.dll, Opc.UaFx.Advanced.dll
The OpcMonitoredItem type exposes the following members.
Initializes a new instance of the OpcMonitoredItem class using the nodeId
and attribute
specified.
C#
public OpcMonitoredItem(OpcNodeId nodeId, OpcAttribute attribute)
Parameters
nodeId
OpcNodeId
The OpcNodeId of the node to monitor.
attribute
OpcAttribute
The OpcAttribute of the node to monitor.
Exceptions
The nodeId
is a null reference (Nothing in Visual Basic).
Initializes a new instance of the OpcMonitoredItem class using the nodeId
, attribute
and filter
specified.
C#
public OpcMonitoredItem(OpcNodeId nodeId, OpcAttribute attribute, OpcMonitoringFilter filter)
Parameters
nodeId
OpcNodeId
The OpcNodeId of the node to monitor.
attribute
OpcAttribute
The OpcAttribute of the node to monitor.
filter
OpcMonitoringFilter
The OpcMonitoringFilter which can be either a OpcDataChangeFilter or a OpcEventFilter instance. This filter is used by the server to pre-filter the notification data passed to the client. This can be also a null reference (Nothing in Visual Basic).
Exceptions
The nodeId
is a null reference (Nothing in Visual Basic).
Occurs when a data change notification has been received.
C#
public event OpcDataChangeReceivedEventHandler DataChangeReceived
Occurs when an event notification has been received.
C#
public event OpcEventReceivedEventHandler EventReceived
Gets or sets the OpcAttribute to monitor.
C#
public OpcAttribute Attribute { get; set; }
Property Value
One of the members defined by the OpcAttribute enumeration.
Gets or sets the total number of notifications which can be queued in the OpcMonitoredItem related notification cache.
C#
public int CacheQueueSize { get; set; }
Property 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.
Gets the client-assigned unique identifier for this OpcMonitoredItem.
C#
public long ClientID { get; }
Property 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.
Gets or sets the name of the OpcMonitoredItem used just for display purpose in the client application.
C#
public string DisplayName { get; set; }
Property Value
The name of the OpcMonitoredItem used just for display purpose in the client application.
Gets or sets the name of the data encoding to use.
C#
public OpcName Encoding { get; set; }
Property 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.
Gets or sets the filter to evaluate while generating notifications for this OpcMonitoredItem.
C#
public OpcMonitoringFilter Filter { get; set; }
Property 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.
Gets a value indicating whether this OpcMonitoredItem has been created on the server.
C#
public bool IsCreated { get; }
Property Value
The value true if the OpcMonitoredItem has been created on the server; otherwise the value false.
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.
C#
public bool IsModified { get; }
Property Value
The value true if the OpcMonitoredItem has been modified; otherwise the value false.
Gets the last data change-related notification data received from the server.
C#
public OpcDataChangeDataSetItem LastDataChange { get; }
Property 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.
Gets the last event-related notification data received from the server.
C#
public OpcEventDataSetItem LastEvent { get; }
Property 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.
Gets the last notification received from the server.
C#
public OpcNotification LastNotification { get; }
Property 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.
Gets or sets the monitoring mode which applies to the monitored item.
C#
public OpcMonitoringMode MonitoringMode { get; set; }
Property Value
One of the members defined by the OpcMonitoringMode enumeration.
Gets or sets the kind of node to monitor.
C#
public OpcNodeCategory NodeCategory { get; set; }
Property Value
One of the members defined by the OpcNodeCategory enumeration.
Gets or sets the mode used to enqueue and dequeue notification data items.
C#
public OpcMonitoredItemQueueMode QueueMode { get; set; }
Property 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'.
Gets or sets a value which defines the requested total number of notifications the server shall queue for this OpcMonitoredItem.
C#
public long QueueSize { get; set; }
Property 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 UInt32 which is covered using a Int64 to assure CLS compliance. In fact this restricts the value range of this property to MinValue and MaxValue.
Gets the resolved node identifier of the node to monitor.
C#
public OpcNodeId ResolvedNodeId { get; }
Property 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.
Gets or sets the requested number of milliseconds of the interval within the server have to access and evaluate this OpcMonitoredItem.
C#
public int SamplingInterval { get; set; }
Property 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.
Gets the status information which defines the servers ability to define/provide a monitored item configured like this OpcMonitoredItem.
C#
public OpcMonitoredItemStatus Status { get; }
Property Value
An instance of the OpcMonitoredItemStatus class representing the status information assoicated with this OpcMonitoredItem.
Gets the OpcSubscription this OpcMonitoredItem belongs to.
C#
public OpcSubscription Subscription { get; }
Property Value
An instance of the OpcSubscription which owns this OpcMonitoredItem and it is part of its MonitoredItems.
Raises the DataChangeReceived event of the OpcMonitoredItem.
C#
protected virtual void OnDataChangeReceived(OpcDataChangeReceivedEventArgs e)
Parameters
e
OpcDataChangeReceivedEventArgs
The event data.
Raises the EventReceived event of the OpcMonitoredItem.
C#
protected virtual void OnEventReceived(OpcEventReceivedEventArgs e)
Parameters
The event data.
Returns a string that represents the current OpcMonitoredItem.
C#
public override string ToString()
Returns
A string that represents the current OpcMonitoredItem including the used DisplayName, the NodeId, ResolvedNodeId and the Attribute.