OpcMonitoredItem Members

Namespace: Opc.UaFx.Client
Assemblies: Opc.UaFx.Advanced.dll, Opc.UaFx.Advanced.dll
The OpcMonitoredItem type exposes the following members.

OpcMonitoredItem(OpcNodeId, OpcAttribute)

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

ArgumentNullException

The nodeId is a null reference (Nothing in Visual Basic).

OpcMonitoredItem(OpcNodeId, OpcAttribute, OpcMonitoringFilter)

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

ArgumentNullException

The nodeId is a null reference (Nothing in Visual Basic).

DataChangeReceived

Occurs when a data change notification has been received.

C#

public event OpcDataChangeReceivedEventHandler DataChangeReceived

EventReceived

Occurs when an event notification has been received.

C#

public event OpcEventReceivedEventHandler EventReceived

Attribute

Gets or sets the OpcAttribute to monitor.

C#

public OpcAttribute Attribute { get; set; }


Property Value

OpcAttribute

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.

C#

public int CacheQueueSize { get; set; }


Property Value

Int32

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.

C#

public long ClientID { get; }


Property Value

Int64

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.

C#

public string DisplayName { get; set; }


Property Value

String

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.

C#

public OpcName Encoding { get; set; }


Property Value

OpcName

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.

C#

public OpcMonitoringFilter Filter { get; set; }


Property Value

OpcMonitoringFilter

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.

C#

public string IndexRange { get; set; }


Property Value

String

A String expressing the indeces to monitor.

IsCreated

Gets a value indicating whether this OpcMonitoredItem has been created on the server.

C#

public bool IsCreated { get; }


Property Value

Boolean

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.

C#

public bool IsModified { get; }


Property Value

Boolean

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.

C#

public OpcDataChangeDataSetItem LastDataChange { get; }


Property Value

OpcDataChangeDataSetItem

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.

C#

public OpcEventDataSetItem LastEvent { get; }


Property Value

OpcEventDataSetItem

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.

C#

public OpcNotification LastNotification { get; }


Property Value

OpcNotification

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.

C#

public OpcMonitoringMode MonitoringMode { get; set; }


Property Value

OpcMonitoringMode

One of the members defined by the OpcMonitoringMode enumeration.

NodeCategory

Gets or sets the kind of node to monitor.

C#

public OpcNodeCategory NodeCategory { get; set; }


Property Value

OpcNodeCategory

One of the members defined by the OpcNodeCategory enumeration.

NodeId

Gets or sets the node identifier of the node to monitor.

C#

public OpcNodeId NodeId { get; set; }


Property Value

OpcNodeId

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.

C#

public OpcMonitoredItemQueueMode QueueMode { get; set; }


Property Value

OpcMonitoredItemQueueMode

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.

C#

public long QueueSize { get; set; }


Property Value

Int64

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.

RelativePath

Gets or sets the relative path to the node to monitor starting at the node identified by the NodeId.

C#

public string RelativePath { get; set; }


Property Value

String

A String expressing the relative path to the node to monitor.

ResolvedNodeId

Gets the resolved node identifier of the node to monitor.

C#

public OpcNodeId ResolvedNodeId { get; }


Property Value

OpcNodeId

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.

C#

public int SamplingInterval { get; set; }


Property Value

Int32

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.

C#

public OpcMonitoredItemStatus Status { get; }


Property Value

OpcMonitoredItemStatus

An instance of the OpcMonitoredItemStatus class representing the status information assoicated with this OpcMonitoredItem.

Subscription

Gets the OpcSubscription this OpcMonitoredItem belongs to.

C#

public OpcSubscription Subscription { get; }


Property Value

OpcSubscription

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.

C#

public object Tag { get; set; }


Property Value

Object

An Object that contains additional user data about the monitored item. The default is null (Nothing in Visual Basic).

OnDataChangeReceived(OpcDataChangeReceivedEventArgs)

Raises the DataChangeReceived event of the OpcMonitoredItem.

C#

protected virtual void OnDataChangeReceived(OpcDataChangeReceivedEventArgs e)


Parameters

e OpcDataChangeReceivedEventArgs

The event data.

OnEventReceived(OpcEventReceivedEventArgs)

Raises the EventReceived event of the OpcMonitoredItem.

C#

protected virtual void OnEventReceived(OpcEventReceivedEventArgs e)


Parameters

e OpcEventReceivedEventArgs

The event data.

ToString()

Returns a string that represents the current OpcMonitoredItem.

C#

public override string ToString()


Returns

String

A string that represents the current OpcMonitoredItem including the used DisplayName, the NodeId, ResolvedNodeId and the Attribute.