Namespace: Opc.UaFx
Assemblies: Opc.UaFx.Advanced.dll, Opc.UaFx.Advanced.dll
The OpcNode type exposes the following members.
Occurs after one or more changes on the node has been notified.
C#
public event OpcNodeChangesEventHandler AfterApplyChanges
Remarks
The changes notified either belong to the PendingChanges or to changes on behalf of the node.
Occurs before one or more changes on the node are notified.
C#
public event OpcNodeChangesEventHandler BeforeApplyChanges
Remarks
The changes notified either belong to the PendingChanges or to changes on behalf of the node.
Gets the NodeCategoryOpcAttribute which identifies the kind of node and is therefore used to classify the node regarding its use and purpose.
C#
public OpcNodeCategory Category { get; }
Property Value
One of the members defined by the OpcNodeCategory enumeration.
Gets or sets the value of the optional DescriptionOpcAttribute which shall explain the meaning of the node.
C#
public OpcText Description { get; set; }
Property Value
A localizable instance of the OpcText class which optionally explains the meaning of the node or a null reference (Nothing in Visual Basic) if there is no description associated with the node.
Remarks
The menaning of the node defines the usage, the context and the purpose of the node.
Gets the OpcNodeGlobalization instance used to control the localization and other globalization related tasks for the Description attribute of the current node.
C#
public OpcNodeGlobalization Descriptions { get; }
Property Value
An instance of the OpcNodeGlobalization class used by the current OpcNode to perform localization tasks for its Description.
Gets or sets the value of the DisplayNameOpcAttribute which defines the localizable name of the node.
C#
public OpcText DisplayName { get; set; }
Property Value
An instance of the OpcText class which defines the localizable name of the node.
Remarks
Client application should use this attribute if they want to display the name of the node to the user. The String part of the DisplayName is restricted to 512 characters.
Gets the OpcNodeGlobalization instance used to control the localization and other globalization related tasks for the DisplayName attribute of the current node.
C#
public OpcNodeGlobalization DisplayNames { get; }
Property Value
An instance of the OpcNodeGlobalization class used by the current OpcNode to perform localization tasks for its DisplayName.
Gets a value indiciating whether there exists any pending change on the node.
C#
public bool HasPendingChanges { get; }
Property Value
The value true if PendingChanges is not equals to None; otherwise the value false.
Gets the value of the NodeIdOpcAttribute which unambiguously identifies the node.
C#
public OpcNodeId Id { get; }
Property Value
An instance of the OpcNodeId class representing the unambiguously identifier of the node.
Remarks
Some servers may accept alternative node identifiers in addition to the canonical node identifier represented by this attribute.
A server shall persist the node identifier of a node, that is, it shall not generate new node identifiers when rebooting.
Gets or sets the value of the BrowseNameOpcAttribute which defines the non-localizable human-readable name used when browsing the address space.
C#
public OpcName Name { get; set; }
Property Value
Remarks
The Name should never be used to display the name of the a node. Use the DisplayName instead for this purpose.
Unlike node identifiers the Name cannot be used to unambiguously identify the node. Different nodes may have the same browse name. The namespace is provided to make the browse name unique in some cases in the context of a node (e.g. properties of a node) although not unique in the context of the server. If different organizations define browse names for properties, the namespace of the Name provided by the organization makes the Name unique, although different organizations may use the same string having a slightly different meaning. Servers may often choose to use the same namespace for the node identifier and the browse name. However, if they want to provide a standard property, its browse name shall have the namespace of the standards body although the namespace of the node identifier reflects something else, for example the local server.
It is recommended that standard bodies defining standard type definitions use their namespace for the node identifier of the type definition node as well as for the browse name of the type definition node.
The String-part of the browse name is case sensitive. That is, clients shall consider them case sensitive. Server are allowed to handle browse names passed in service requests as case insensitive.
Use the value of this property to construct browse paths (see OpcNamePath).
Gets the parent node of the node.
C#
public virtual IOpcNode Parent { get; }
Property Value
An instance implementing the IOpcNode interface which represents the phyiscal parent of the node. In general a node can have multiple (logical) parent nodes, but this property provides the only physical parent node of the node. The value can also be a null reference (Nothing in Visual Basic) in case there the node does only have logical parent nodes.
Gets a value indicating the most recent changes performed on the node since their last notification.
C#
public OpcNodeChanges PendingChanges { get; }
Property Value
A bitwise combination of OpcNodeChanges members identifying the changes made on the node or None if there was no change on the node since the last change notification.
Remarks
Use one of the ApplyChanges(OpcContext) overloads to reset the value of this property to None or use one of the UpdateChanges(OpcContext, OpcNodeChanges) overloads to partially reset the pending changes.
Gets or sets a callback used to query any event information which belongs to the node.
C#
public OpcQueryEventsCallback QueryEventsCallback { get; set; }
Property Value
A OpcQueryEventsCallback used to query any event information which belongs to the node. The value can also be a null reference (Nothing in Visual Basic).
C#
public OpcReadAttributeValueCallback<OpcText> ReadDescriptionCallback { get; set; }
Property Value
C#
public OpcReadAttributeValueCallback<OpcText> ReadDisplayNameCallback { get; set; }
Property Value
C#
public OpcReadAttributeValueCallback<OpcAttributeWriteAccess> ReadUserWriteAccessCallback { get; set; }
Property Value
C#
public OpcReadAttributeValueCallback<OpcAttributeWriteAccess> ReadWriteAccessCallback { get; set; }
Property Value
Gets or sets the value of the optional UserWriteAccessOpcAttribute which exposes the possibilities of a client to write the attributes of the node taking user access rights into account.
C#
public OpcAttributeWriteAccess UserWriteAccess { get; set; }
Property Value
A combination of the members defined by the OpcAttributeWriteAccess enumeration.
Remarks
The mask value of this attribute can only further restrict the WriteAccess attribute, when it is set to not writable in the general case that applies for every user.
Gets or sets the value of the optional WriteAccessOpcAttribute which exposes the posibilities of a client to write the attributes of the node.
C#
public OpcAttributeWriteAccess WriteAccess { get; set; }
Property Value
A combination of the members defined by the OpcAttributeWriteAccess enumeration.
Remarks
The mask value of this attribute does not take any user access rights into account, that is, altough an attribute is writable this may be restricted to a certain user / user group.
If a server does not have the ability to get the write mask information for a specific attribute from the underlying system, it should state that it is writable. If a write opertation is called on the attribute, the server should transfer this request and return the corresponding OpcStatusCode if such a request is rejected.
Only in case there a corresponding attribute is set in the mask of this attribute the according attribute is writable; otherwise it can not accessed for writing.
C#
public OpcWriteAttributeValueCallback<OpcText> WriteDescriptionCallback { get; set; }
Property Value
C#
public OpcWriteAttributeValueCallback<OpcText> WriteDisplayNameCallback { get; set; }
Property Value
C#
public OpcWriteAttributeValueCallback<OpcAttributeWriteAccess> WriteUserWriteAccessCallback { get; set; }
Property Value
C#
public OpcWriteAttributeValueCallback<OpcAttributeWriteAccess> WriteWriteAccessCallback { get; set; }
Property Value
C#
public virtual void AddNotifier(OpcContext context, IOpcNode node)
Parameters
context
OpcContext
node
IOpcNode
Exceptions
Notifies about changes performed on the node since the last notification and resets the pending changes to None.
C#
public virtual void ApplyChanges(OpcContext context)
Parameters
context
OpcContext
The OpcContext to use to notify about changes performed on the node.
Exceptions
The context
is a null reference (Nothing in Visual Basic).
Remarks
This method influences the value of the properties PendingChanges and HasPendingChanges. After a call to ApplyChanges(OpcContext) the PendingChanges property returns None and the HasPendingChanges the value false.
Notifies about changes performed on the node (and optionally on its children) since the last notification and resets the pending changes to None.
C#
public virtual void ApplyChanges(OpcContext context, bool recursive)
Parameters
context
OpcContext
The OpcContext to use to notify about changes performed on the node.
recursive
Boolean
The value true if pending changes are to be notified for all children as well; otherwise the value false.
Exceptions
The context
is a null reference (Nothing in Visual Basic).
Remarks
This method influences the value of the properties PendingChanges and HasPendingChanges. After a call to ApplyChanges(OpcContext, Boolean) the PendingChanges property returns None and the HasPendingChanges the value false.
Retrieves the value of the attribute
specified.
C#
public object AttributeValue(OpcAttribute attribute)
Parameters
attribute
OpcAttribute
One of the members defined by the OpcAttribute enumeration which identifies the attribute its value is queried.
Returns
The value of the attribute
specified or a null reference (Nothing in Visual Basic) in case there the value of the attribute is a null reference or it is not supported by the current OpcNode.
Retrieves the value of the attribute
specified.
C#
public T AttributeValue<T>(OpcAttribute attribute)
Parameters
attribute
OpcAttribute
One of the members defined by the OpcAttribute enumeration which identifies the attribute its value is queried.
Returns
The value of the attribute
as the type T
specified or the default value of the type T
in case there the value of the attribute is a null reference (Nothing in Visual Basic) or it is not supported by the current OpcNode.
Retrieves the child node its Name property matches exactly the name
specified.
C#
public IOpcNode Child(OpcContext context, OpcName name)
Parameters
context
OpcContext
The OpcContext to use to lookup the requested child node.
name
OpcName
The full qualified OpcName of the node to lookup.
Returns
An instance implementing the IOpcNode interface its Name exactly matches the name
specified, if such a node is a known child node of this node. Otherwise a null reference (Nothing in Visual Basic).
Exceptions
The context
or name
is a null reference (Nothing in Visual Basic).
Retrieves a sequence of all nodes organized as children of this node.
C#
public IEnumerable<IOpcNode> Children(OpcContext context)
Parameters
context
OpcContext
The OpcContext to use to lookup the child nodes.
Returns
A sequence of instances implementing the IOpcNode interface which representing the nodes organized as child nodes of this node.
Exceptions
The context
is a null reference (Nothing in Visual Basic).
Initializes the default values used by the node implementation represented / required.
C#
protected virtual void InitializeDefaults()
Remarks
This method is always called by the lowest constructor of the OpcNode constructor chain to initialize all default values which are explicitly necessary before the node is (for example) added as a child node of another node. In case there a parent node is passed to constructor this becomes essential to ensure that the node is initialized appropriately before it is added to the parent.
Only implement this method in case there is a custom node setup required (typically performed within the custom constructor). Any code for member field initialization or additional logic can be kept in the constructor.
Raises the AfterApplyChanges event using the event data specified.
C#
protected virtual void OnAfterApplyChanges(OpcNodeChangesEventArgs e)
Parameters
The OpcNodeChangesEventArgs with the event data.
Raises the BeforeApplyChanges event using the event data specified.
C#
protected virtual void OnBeforeApplyChanges(OpcNodeChangesEventArgs e)
Parameters
The OpcNodeChangesEventArgs with the event data.
C#
protected virtual void QueryEventsCore(OpcNodeContext context, OpcEventCollection events)
Parameters
context
OpcNodeContext
events
OpcEventCollection
C#
protected virtual OpcAttributeValue<T> ReadAttributeValueCore<T>(OpcReadAttributeValueContext context, OpcAttributeValue<T> value)
Parameters
context
OpcReadAttributeValueContext
value
OpcAttributeValue<T>
Returns
C#
public virtual void RemoveNotifier(OpcContext context, IOpcNode node)
Parameters
context
OpcContext
node
IOpcNode
Exceptions
C#
public void ReportEvent(OpcContext context, OpcEvent eventData)
Parameters
context
OpcContext
eventData
OpcEvent
Exceptions
Notifies about the changes
on behalf of the node and removes pending changes which intersect with the changes
specified.
C#
public void UpdateChanges(OpcContext context, OpcNodeChanges changes)
Parameters
context
OpcContext
The OpcContext to use to notify about the changes
.
changes
OpcNodeChanges
A bitwise combination of OpcNodeChanges members to use to notify changes on behalf of the node.
Exceptions
The context
is a null reference (Nothing in Visual Basic).
Remarks
This method influences the value of the properties PendingChanges and HasPendingChanges.
Notifies about the changes
on behalf of the node (and optionally on its children) and removes pending changes which intersect with the changes
specified.
C#
public void UpdateChanges(OpcContext context, OpcNodeChanges changes, bool recursive)
Parameters
context
OpcContext
The OpcContext to use to notify about changes performed on the node.
changes
OpcNodeChanges
A bitwise combination of OpcNodeChanges members to use to notify changes on behalf of the node (and its children).
recursive
Boolean
The value true if the changes
are to be notified for all children as well; otherwise the value false.
Exceptions
The context
is a null reference (Nothing in Visual Basic).
Remarks
This method influences the value of the properties PendingChanges and HasPendingChanges.
C#
protected virtual OpcAttributeValue<T> WriteAttributeValueCore<T>(OpcWriteAttributeValueContext context, OpcAttributeValue<T> value)
Parameters
context
OpcWriteAttributeValueContext
value
OpcAttributeValue<T>
Returns