Skip to content

Reference

OpcNodeSet Members

Provides a static in-memory representation of an address space including its nodes their references to each other and the used types.

Reference

OpcNodeSet Members ​

Type
OpcNodeSet
Namespace
Opc.UaFx
Assembly
Opc.UaFx.Advanced.dll
Package
Opc.UaFx.Advanced v2.59.0
Also in
Opc.UaFx.Client

Properties ​

Context ​

since v2.50

Gets the OpcContext used for this OpcNodeSet.

csharp
public OpcContext Context { get; }
vbnet
Public ReadOnly Property Context As OpcContext

Property value

OpcContext

A OpcContext used to create this OpcNodeSet or a null reference (Nothing in Visual Basic) if this OpcNodeSet has been created without any specific OpcContext.

LastModified ​

since v2.9

Gets the last time the node set document was modified.

csharp
public DateTime? LastModified { get; }
vbnet
Public ReadOnly Property LastModified As Date?

Property value

Nullable<DateTime>

The last time the node set document was modified or a null reference (Nothing in Visual Basic) if there is no time of the last modification available.

Remarks

The value of this property is primarly determined by the contents of the node set document the current OpcNodeSet originates from. In case there the node set document does not provide the last modified information this property represents the LastWriteTime in case there the node set has been created from a file; otherwise a null reference (Nothing in Visual Basic).

Models ​

since v2.9

Gets a read-only collection of the models declared by the node set.

csharp
public OpcReadOnlyModelCollection Models { get; }
vbnet
Public ReadOnly Property Models As OpcReadOnlyModelCollection

Property value

OpcReadOnlyModelCollection

An instance of the OpcReadOnlyModelCollection class with an OpcModel for each model declared by the current OpcNodeSet; empty if it declares no model.

Name ​

since v2.9

Gets the name of the node set.

csharp
public string Name { get; }
vbnet
Public ReadOnly Property Name As String

Property value

String

The Name of the first model declared by the current OpcNodeSet (see Models). In case there it declares no model with a name and the OpcNodeSet has been created from a file, the name of the file without extension; otherwise a null reference (Nothing in Visual Basic).

Namespaces ​

since v2.9

Gets a read-only collection of OpcNamespaces referred to.

csharp
public OpcReadOnlyNamespaceCollection Namespaces { get; }
vbnet
Public ReadOnly Property Namespaces As OpcReadOnlyNamespaceCollection

Property value

OpcReadOnlyNamespaceCollection

An instance of the OpcReadOnlyNamespaceCollection class with the OpcNamespace information used by the current OpcNodeSet.

Methods ​

GetDataType ​

6 overloads · since v2.9

OverloadDescription
GetDataType(string)since v2.9Retrieves the OpcDataTypeInfo object which is known under the name specified.
GetDataType(OpcName)since v2.9Retrieves the OpcDataTypeInfo object which is known under the name specified.
GetDataType(OpcNodeId)since v2.9Retrieves the OpcDataTypeInfo object which declares the type which is identified by the typeId specified.
GetDataType(Type)since v2.9Retrieves the OpcDataTypeInfo object which declares the type implemented by the underlyingType specified.
GetDataType(OpcEncoding)since v2.9Retrieves the OpcDataTypeInfo object which declares the type which is identified by the encoding specified.
GetDataType(XmlQualifiedName)since v2.9Retrieves the OpcDataTypeInfo object which is known under the xmlName specified.

GetDataType(string) ​

since v2.9

Retrieves the OpcDataTypeInfo object which is known under the name specified.

csharp
public OpcDataTypeInfo GetDataType(string name)
vbnet
Public Function GetDataType(name As String) As OpcDataTypeInfo

Parameters

NameTypeDescription
nameStringThe string to use to identify the OpcDataTypeInfo object to retrieve.

Returns

OpcDataTypeInfo

The OpcDataTypeInfo object its Name is equals (regarding its Value) to the name specified; otherwise a null reference (Nothing in Visual Basic).

Exceptions

ExceptionCondition
ArgumentExceptionThe name is equals Empty.
ArgumentNullExceptionThe name is a null reference (Nothing in Visual Basic).

GetDataType(OpcName) ​

since v2.9

Retrieves the OpcDataTypeInfo object which is known under the name specified.

csharp
public OpcDataTypeInfo GetDataType(OpcName name)
vbnet
Public Function GetDataType(name As OpcName) As OpcDataTypeInfo

Parameters

NameTypeDescription
nameOpcNameThe OpcName of the OpcDataTypeInfo object to retrieve.

Returns

OpcDataTypeInfo

The OpcDataTypeInfo object its Name is equals to the name specified; otherwise a null reference (Nothing in Visual Basic).

Exceptions

ExceptionCondition
ArgumentNullExceptionThe name is a null reference (Nothing in Visual Basic).

GetDataType(OpcNodeId) ​

since v2.9

Retrieves the OpcDataTypeInfo object which declares the type which is identified by the typeId specified.

csharp
public OpcDataTypeInfo GetDataType(OpcNodeId typeId)
vbnet
Public Function GetDataType(typeId As OpcNodeId) As OpcDataTypeInfo

Parameters

NameTypeDescription
typeIdOpcNodeIdThe OpcNodeId which identifies the OpcDataTypeInfo to retrieve.

Returns

OpcDataTypeInfo

The OpcDataTypeInfo object which is known under the typeId specified or a null reference (Nothing in Visual Basic) if there doesn't exist a known OpcDataTypeInfo object which is associated with the typeId specified.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe typeId is a null reference (Nothing in Visual Basic).

GetDataType(Type) ​

since v2.9

Retrieves the OpcDataTypeInfo object which declares the type implemented by the underlyingType specified.

csharp
public OpcDataTypeInfo GetDataType(Type underlyingType)
vbnet
Public Function GetDataType(underlyingType As Type) As OpcDataTypeInfo

Parameters

NameTypeDescription
underlyingTypeTypeThe Type which implements the OpcDataTypeInfo to retrieve.

Returns

OpcDataTypeInfo

The OpcDataTypeInfo object which declares the underlyingType specified or a null reference (Nothing in Visual Basic) if there isn't a OpcDataTypeInfo object associated with the underlyingType specified.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe underlyingType is a null reference (Nothing in Visual Basic).

GetDataType(OpcEncoding) ​

since v2.9

Retrieves the OpcDataTypeInfo object which declares the type which is identified by the encoding specified.

csharp
public OpcDataTypeInfo GetDataType(OpcEncoding encoding)
vbnet
Public Function GetDataType(encoding As OpcEncoding) As OpcDataTypeInfo

Parameters

NameTypeDescription
encodingOpcEncodingThe OpcEncoding which identifies the OpcDataTypeInfo to retrieve.

Returns

OpcDataTypeInfo

The OpcDataTypeInfo object which is known under the encoding specified or a null reference (Nothing in Visual Basic) if there doesn't exist a known OpcDataTypeInfo which is associated with the encoding specified.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe encoding is a null reference (Nothing in Visual Basic).

GetDataType(XmlQualifiedName) ​

since v2.9

Retrieves the OpcDataTypeInfo object which is known under the xmlName specified.

csharp
public OpcDataTypeInfo GetDataType(XmlQualifiedName xmlName)
vbnet
Public Function GetDataType(xmlName As XmlQualifiedName) As OpcDataTypeInfo

Parameters

NameTypeDescription
xmlNameXmlQualifiedNameThe XmlQualifiedName of the OpcDataTypeInfo object to retrieve.

Returns

OpcDataTypeInfo

The OpcDataTypeInfo object its XmlName is equals to the xmlName specified; otherwise a null reference (Nothing in Visual Basic).

Exceptions

ExceptionCondition
ArgumentNullExceptionThe xmlName is a null reference (Nothing in Visual Basic).

GetDataTypes ​

since v2.9

Retrieves all OpcDataTypeInfo objects offered by the IOpcTypeProvider.

csharp
public OpcDataTypeInfo[] GetDataTypes()
vbnet
Public Function GetDataTypes() As OpcDataTypeInfo()

Returns

OpcDataTypeInfo[]

An array that contains all OpcDataTypeInfo objects that are offered by the IOpcTypeProvider.

GetDataTypeSystem ​

2 overloads

OverloadDescription
GetDataTypeSystem()Retrieves the system used to describe the data types defined in the OpcNodeSet using Binary as the type of encoding.
GetDataTypeSystem(OpcEncodingType)Retrieves the system used to describe the data types defined in the OpcNodeSet using OpcEncodingType specified by encodingType as the type of encoding.

GetDataTypeSystem() ​

Retrieves the system used to describe the data types defined in the OpcNodeSet using Binary as the type of encoding.

csharp
public OpcDataTypeSystem GetDataTypeSystem()
vbnet
Public Function GetDataTypeSystem() As OpcDataTypeSystem

Returns

OpcDataTypeSystem

An instance of the OpcDataTypeSystem class which can be used to understand the structure of the data described for the Binary encoding.

GetDataTypeSystem(OpcEncodingType) ​

Retrieves the system used to describe the data types defined in the OpcNodeSet using OpcEncodingType specified by encodingType as the type of encoding.

csharp
public OpcDataTypeSystem GetDataTypeSystem(OpcEncodingType encodingType)
vbnet
Public Function GetDataTypeSystem(
    encodingType As OpcEncodingType) As OpcDataTypeSystem

Parameters

NameTypeDescription
encodingTypeOpcEncodingType

Returns

OpcDataTypeSystem

An instance of the OpcDataTypeSystem class which can be used to understand the structure of the data described for the encoding specified.

GetNode ​

since v2.50

Retrieves the IOpcNodeInfo which is defined within this OpcNodeSet and is known under the nodeId specified.

csharp
public IOpcNodeInfo GetNode(OpcNodeId nodeId)
vbnet
Public Function GetNode(nodeId As OpcNodeId) As IOpcNodeInfo

Parameters

NameTypeDescription
nodeIdOpcNodeIdThe OpcNodeId of the IOpcNodeInfo instance to determine.

Returns

IOpcNodeInfo

An instance implementing the IOpcNodeInfo interface its Id attribute is equals to the nodeId specified if found; otherwise a null reference (Nothing in Visual Basic).

Exceptions

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

GetNodes ​

since v2.54

Retrieves a sequence of IOpcNodeInfo of all nodes defined within this OpcNodeSet.

csharp
public IEnumerable<IOpcNodeInfo> GetNodes()
vbnet
Public Function GetNodes() As IEnumerable(Of IOpcNodeInfo)

Returns

IEnumerable<IOpcNodeInfo>

An IEnumerable<T> of instances implementing the IOpcNodeInfo interface.

GetNodeType ​

4 overloads · since v2.9

OverloadDescription
GetNodeType(string)since v2.9Retrieves the OpcNodeTypeInfo object which is known under the name specified.
GetNodeType(OpcName)since v2.9Retrieves the OpcNodeTypeInfo object which is known under the name specified.
GetNodeType(OpcNodeId)since v2.9Retrieves the OpcNodeTypeInfo object which declares the type which is identified by the typeId specified.
GetNodeType(Type)since v2.9Retrieves the OpcNodeTypeInfo object which declares the type implemented by the underlyingType specified.

GetNodeType(string) ​

since v2.9

Retrieves the OpcNodeTypeInfo object which is known under the name specified.

csharp
public OpcNodeTypeInfo GetNodeType(string name)
vbnet
Public Function GetNodeType(name As String) As OpcNodeTypeInfo

Parameters

NameTypeDescription
nameStringThe string to use to identify the OpcNodeTypeInfo object to retrieve.

Returns

OpcNodeTypeInfo

The OpcNodeTypeInfo object its Name is equals (regarding its Value) to the name specified; otherwise a null reference (Nothing in Visual Basic).

Exceptions

ExceptionCondition
ArgumentExceptionThe name is equals Empty.
ArgumentNullExceptionThe name is a null reference (Nothing in Visual Basic).

GetNodeType(OpcName) ​

since v2.9

Retrieves the OpcNodeTypeInfo object which is known under the name specified.

csharp
public OpcNodeTypeInfo GetNodeType(OpcName name)
vbnet
Public Function GetNodeType(name As OpcName) As OpcNodeTypeInfo

Parameters

NameTypeDescription
nameOpcNameThe OpcName of the OpcNodeTypeInfo object to retrieve.

Returns

OpcNodeTypeInfo

The OpcNodeTypeInfo object its Name is equals to the name specified; otherwise a null reference (Nothing in Visual Basic).

Exceptions

ExceptionCondition
ArgumentNullExceptionThe name is a null reference (Nothing in Visual Basic).

GetNodeType(OpcNodeId) ​

since v2.9

Retrieves the OpcNodeTypeInfo object which declares the type which is identified by the typeId specified.

csharp
public OpcNodeTypeInfo GetNodeType(OpcNodeId typeId)
vbnet
Public Function GetNodeType(typeId As OpcNodeId) As OpcNodeTypeInfo

Parameters

NameTypeDescription
typeIdOpcNodeIdThe OpcNodeId which identifies the OpcNodeTypeInfo to retrieve.

Returns

OpcNodeTypeInfo

The OpcNodeTypeInfo object which is known under the typeId specified or a null reference (Nothing in Visual Basic) if there doesn't exist a known OpcNodeTypeInfo object which is associated with the typeId specified.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe typeId is a null reference (Nothing in Visual Basic).

GetNodeType(Type) ​

since v2.9

Retrieves the OpcNodeTypeInfo object which declares the type implemented by the underlyingType specified.

csharp
public OpcNodeTypeInfo GetNodeType(Type underlyingType)
vbnet
Public Function GetNodeType(underlyingType As Type) As OpcNodeTypeInfo

Parameters

NameTypeDescription
underlyingTypeTypeThe Type which implements the OpcNodeTypeInfo to retrieve.

Returns

OpcNodeTypeInfo

The OpcNodeTypeInfo object which declares the underlyingType specified or a null reference (Nothing in Visual Basic) if there isn't a OpcNodeTypeInfo object associated with the underlyingType specified.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe underlyingType is a null reference (Nothing in Visual Basic).

GetNodeTypes ​

since v2.9

Retrieves all OpcNodeTypeInfo objects offered by the IOpcTypeProvider.

csharp
public OpcNodeTypeInfo[] GetNodeTypes()
vbnet
Public Function GetNodeTypes() As OpcNodeTypeInfo()

Returns

OpcNodeTypeInfo[]

An array that contains all OpcNodeTypeInfo objects that are offered by the IOpcTypeProvider.

GetNodeTypeSystem ​

since v2.9

Retrieves the system used to describe the node types defined in the OpcNodeSet.

csharp
public OpcNodeTypeSystem GetNodeTypeSystem()
vbnet
Public Function GetNodeTypeSystem() As OpcNodeTypeSystem

Returns

OpcNodeTypeSystem

An instance of the OpcNodeTypeSystem class which can be used to understand the structure of the nodes defined.

Load ​

static · 6 overloads

OverloadDescription
Load(string)staticCreates a new OpcNodeSet instance from the file specified by filePath.
Load(OpcContext, string)static · since v2.50Creates a new OpcNodeSet instance within the context from the file specified by filePath.
Load(string, OpcNodeSetLoadOptions)static · since v2.40Creates a new OpcNodeSet instance from the file specified by filePath using the further defined load options.
Load(OpcContext, string, OpcNodeSetLoadOptions)static · since v2.50Creates a new OpcNodeSet instance within the context from the file specified by filePath using the further defined load options.
Load(Stream)staticCreates a new OpcNodeSet instance from the contents in the stream specified.
Load(OpcContext, Stream)static · since v2.50Creates a new OpcNodeSet instance within the context from the contents in the stream specified.

Exceptions (all overloads)

ExceptionCondition
InvalidDataExceptionThe node set specified does not provide any namespace information.

Load(string) ​

static

Creates a new OpcNodeSet instance from the file specified by filePath.

csharp
public static OpcNodeSet Load(string filePath)
vbnet
Public Shared Function Load(filePath As String) As OpcNodeSet

Parameters

NameTypeDescription
filePathStringThe path to the file from which the OpcNodeSet is to be created.

Returns

OpcNodeSet

A new instance of the OpcNodeSet class that represents the contents of the file.

Exceptions

ExceptionCondition
ArgumentExceptionThe filePath is an empty string.
ArgumentNullExceptionThe filePath is a null reference (Nothing in Visual Basic).

Load(OpcContext, string) ​

static · since v2.50

Creates a new OpcNodeSet instance within the context from the file specified by filePath.

csharp
public static OpcNodeSet Load(OpcContext context, string filePath)
vbnet
Public Shared Function Load(
    context As OpcContext,
    filePath As String) As OpcNodeSet

Parameters

NameTypeDescription
contextOpcContextThe OpcContext to use to load the OpcNodeSet.
filePathStringThe path to the file from which the OpcNodeSet is to be created.

Returns

OpcNodeSet

A new instance of the OpcNodeSet class that represents the contents of the file.

Exceptions

ExceptionCondition
ArgumentExceptionThe filePath is an empty string.
ArgumentNullExceptionThe context or filePath is a null reference (Nothing in Visual Basic).

Load(string, OpcNodeSetLoadOptions) ​

static · since v2.40

Creates a new OpcNodeSet instance from the file specified by filePath using the further defined load options.

csharp
public static OpcNodeSet Load(string filePath, OpcNodeSetLoadOptions options)
vbnet
Public Shared Function Load(
    filePath As String,
    options As OpcNodeSetLoadOptions) As OpcNodeSet

Parameters

NameTypeDescription
filePathStringThe path to the file from which the OpcNodeSet is to be created.
optionsOpcNodeSetLoadOptionsA combination of different OpcNodeSetLoadOptions to use to load the node-set file.

Returns

OpcNodeSet

A new instance of the OpcNodeSet class that represents the contents of the file.

Exceptions

ExceptionCondition
ArgumentExceptionThe filePath is an empty string.
ArgumentNullExceptionThe filePath is a null reference (Nothing in Visual Basic).

Load(OpcContext, string, OpcNodeSetLoadOptions) ​

static · since v2.50

Creates a new OpcNodeSet instance within the context from the file specified by filePath using the further defined load options.

csharp
public static OpcNodeSet Load(
    OpcContext context,
    string filePath,
    OpcNodeSetLoadOptions options)
vbnet
Public Shared Function Load(
    context As OpcContext,
    filePath As String,
    options As OpcNodeSetLoadOptions) As OpcNodeSet

Parameters

NameTypeDescription
contextOpcContextThe OpcContext to use to load the OpcNodeSet.
filePathStringThe path to the file from which the OpcNodeSet is to be created.
optionsOpcNodeSetLoadOptionsA combination of different OpcNodeSetLoadOptions to use to load the node-set file.

Returns

OpcNodeSet

A new instance of the OpcNodeSet class that represents the contents of the file.

Exceptions

ExceptionCondition
ArgumentExceptionThe filePath is an empty string.
ArgumentNullExceptionThe context or filePath is a null reference (Nothing in Visual Basic).

Load(Stream) ​

static

Creates a new OpcNodeSet instance from the contents in the stream specified.

csharp
public static OpcNodeSet Load(Stream stream)
vbnet
Public Shared Function Load(stream As Stream) As OpcNodeSet

Parameters

NameTypeDescription
streamStreamThe Stream which contains the data from which the OpcNodeSet is to be created.

Returns

OpcNodeSet

A new instance of the OpcNodeSet class that represents the contents of the stream.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe stream is a null reference (Nothing in Visual Basic).

Load(OpcContext, Stream) ​

static · since v2.50

Creates a new OpcNodeSet instance within the context from the contents in the stream specified.

csharp
public static OpcNodeSet Load(OpcContext context, Stream stream)
vbnet
Public Shared Function Load(
    context As OpcContext,
    stream As Stream) As OpcNodeSet

Parameters

NameTypeDescription
contextOpcContextThe OpcContext to use to load the OpcNodeSet.
streamStreamThe Stream which contains the data from which the OpcNodeSet is to be created.

Returns

OpcNodeSet

A new instance of the OpcNodeSet class that represents the contents of the stream.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe context or stream is a null reference (Nothing in Visual Basic).

Parse ​

static · 2 overloads

OverloadDescription
Parse(string)staticCreates a new OpcNodeSet instance from the string specified by data.
Parse(OpcContext, string)static · since v2.50Creates a new OpcNodeSet instance within the context from the string specified by data.

Exceptions (all overloads)

ExceptionCondition
ArgumentExceptionThe data is an empty string.
ArgumentNullExceptionThe data is a null reference (Nothing in Visual Basic).
InvalidDataExceptionThe node set specified does not provide any namespace information.

Parse(string) ​

static

Creates a new OpcNodeSet instance from the string specified by data.

csharp
public static OpcNodeSet Parse(string data)
vbnet
Public Shared Function Parse(data As String) As OpcNodeSet

Parameters

NameTypeDescription
dataStringThe string that contains the node set data.

Returns

OpcNodeSet

Parse(OpcContext, string) ​

static · since v2.50

Creates a new OpcNodeSet instance within the context from the string specified by data.

csharp
public static OpcNodeSet Parse(OpcContext context, string data)
vbnet
Public Shared Function Parse(
    context As OpcContext,
    data As String) As OpcNodeSet

Parameters

NameTypeDescription
contextOpcContextThe OpcContext to use to load the OpcNodeSet.
dataStringThe string that contains the node set data.

Returns

OpcNodeSet

Save ​

2 overloads · since v2.11

OverloadDescription
Save(string)since v2.11Writes this OpcNodeSet as a node set XML document to the file specified by the filePath.
Save(Stream)since v2.11Writes this OpcNodeSet as a node set XML document to the stream specified.

Save(string) ​

since v2.11

Writes this OpcNodeSet as a node set XML document to the file specified by the filePath.

csharp
public void Save(string filePath)
vbnet
Public Sub Save(filePath As String)

Parameters

NameTypeDescription
filePathStringThe path to the file this OpcNodeSet is to be written to.

Exceptions

ExceptionCondition
ArgumentExceptionThe filePath is an empty string.
ArgumentNullExceptionThe filePath is a null reference (Nothing in Visual Basic).

Remarks

An existing file is overwritten.

Save(Stream) ​

since v2.11

Writes this OpcNodeSet as a node set XML document to the stream specified.

csharp
public void Save(Stream stream)
vbnet
Public Sub Save(stream As Stream)

Parameters

NameTypeDescription
streamStreamThe Stream this OpcNodeSet is to be written to.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe stream is a null reference (Nothing in Visual Basic).

TryParse ​

static · 2 overloads

OverloadDescription
TryParse(string, out OpcNodeSet)staticDetermines whether a string is a valid OpcNodeSet.
TryParse(OpcContext, string, out OpcNodeSet)static · since v2.50Determines whether a string within the context is a valid OpcNodeSet.

TryParse(string, out OpcNodeSet) ​

static

Determines whether a string is a valid OpcNodeSet.

csharp
public static bool TryParse(string data, out OpcNodeSet nodeSet)
vbnet
Public Shared Function TryParse(
    data As String,
    nodeSet As OpcNodeSet) As Boolean

Parameters

NameTypeDescription
dataStringThe string to validate.
nodeSetout OpcNodeSetThe OpcNodeSet version of the string.

Returns

Boolean

The value true if the specified data is a valid OpcNodeSet; otherwise the value false.

TryParse(OpcContext, string, out OpcNodeSet) ​

static · since v2.50

Determines whether a string within the context is a valid OpcNodeSet.

csharp
public static bool TryParse(
    OpcContext context,
    string data,
    out OpcNodeSet nodeSet)
vbnet
Public Shared Function TryParse(
    context As OpcContext,
    data As String,
    nodeSet As OpcNodeSet) As Boolean

Parameters

NameTypeDescription
contextOpcContextThe OpcContext to use to load the OpcNodeSet.
dataStringThe string to validate.
nodeSetout OpcNodeSetThe OpcNodeSet version of the string.

Returns

Boolean

The value true if the specified data is a valid OpcNodeSet; otherwise the value false.

Exceptions

ExceptionCondition
ArgumentExceptionThe context is a null reference (Nothing in Visual Basic).