Skip to content

Reference

OpcArgument Members

Describes an argument used by a method either as an input or an output argument.

Reference

OpcArgument Members ​

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

Constructors ​

OpcArgument ​

22 overloads

OverloadDescription
OpcArgument(string)Initializes a new instance of the OpcArgument class using the name of the argument to define an argument of the type object.
OpcArgument(string, OpcDataType)since v2.9Initializes a new instance of the OpcArgument class using the name and dataType of argument to define.
OpcArgument(string, OpcNodeId)since v2.9Initializes a new instance of the OpcArgument class using the name and dataTypeId of argument to define.
OpcArgument(string, OpcDataType, bool)since v2.9Initializes a new instance of the OpcArgument class using the name and dataType of argument to define.
OpcArgument(string, OpcDataType, params uint[])since v2.9Initializes a new instance of the OpcArgument class using the name and dataType of argument to define.
OpcArgument(string, OpcNodeId, bool)since v2.9Initializes a new instance of the OpcArgument class using the name and dataTypeId of argument to define.
OpcArgument(string, OpcNodeId, params uint[])since v2.9Initializes a new instance of the OpcArgument class using the name and dataTypeId of argument to define.
OpcArgument(string, OpcDataType, string)since v2.9Initializes a new instance of the OpcArgument class using the name, dataType and description of the argument to define.
OpcArgument(string, OpcNodeId, string)since v2.9Initializes a new instance of the OpcArgument class using the name, dataTypeId and description of the argument to define.
OpcArgument(string, OpcDataType, bool, string)since v2.9Initializes a new instance of the OpcArgument class using the name, dataType and description of the argument to define.
OpcArgument(string, OpcDataType, uint[], string)since v2.9Initializes a new instance of the OpcArgument class using the name, dataType and description of the argument to define.
OpcArgument(string, OpcNodeId, bool, string)since v2.9Initializes a new instance of the OpcArgument class using the name, dataTypeId and description of the argument to define.
OpcArgument(string, OpcNodeId, uint[], string)since v2.9Initializes a new instance of the OpcArgument class using the name, dataTypeId and description of the argument to define.
OpcArgument(string, OpcDataType, object, string)since v2.9Initializes a new instance of the OpcArgument class using the name, dataType, defaultValue and description of the argument to define.
OpcArgument(string, OpcNodeId, object, string)since v2.9Initializes a new instance of the OpcArgument class using the name, dataTypeId, defaultValue and description of the argument to define.
OpcArgument(string, OpcDataType, bool, object, string)since v2.9Initializes a new instance of the OpcArgument class using the name, dataType, defaultValue and description of the argument to define.
OpcArgument(string, OpcDataType, uint[], object, string)since v2.9Initializes a new instance of the OpcArgument class using the name, dataType, defaultValue and description of the argument to define.
OpcArgument(string, OpcNodeId, bool, object, string)since v2.9Initializes a new instance of the OpcArgument class using the name, dataTypeId, defaultValue and description of the argument to define.
OpcArgument(string, OpcNodeId, uint[], object, string)since v2.9Initializes a new instance of the OpcArgument class using the name, dataTypeId, defaultValue and description of the argument to define.
OpcArgument(string, Type)Initializes a new instance of the OpcArgument class using the name and type of argument to define.
OpcArgument(string, Type, string)Initializes a new instance of the OpcArgument class using the name, type and description of the argument to define.
OpcArgument(string, Type, object, string)Initializes a new instance of the OpcArgument class using the name, type, defaultValue and description of the argument to define.

OpcArgument(string) ​

Initializes a new instance of the OpcArgument class using the name of the argument to define an argument of the type object.

csharp
public OpcArgument(string name)
vbnet
Public Sub New(name As String)

Parameters

NameTypeDescription
nameStringThe name of the argument.

OpcArgument(string, OpcDataType) ​

since v2.9

Initializes a new instance of the OpcArgument class using the name and dataType of argument to define.

csharp
public OpcArgument(string name, OpcDataType dataType)
vbnet
Public Sub New(name As String, dataType As OpcDataType)

Parameters

NameTypeDescription
nameStringThe name of the argument.
dataTypeOpcDataTypeOne of the members defined by the OpcDataType enum to use to define the DataType and DataTypeId of the argument to define.

OpcArgument(string, OpcNodeId) ​

since v2.9

Initializes a new instance of the OpcArgument class using the name and dataTypeId of argument to define.

csharp
public OpcArgument(string name, OpcNodeId dataTypeId)
vbnet
Public Sub New(name As String, dataTypeId As OpcNodeId)

Parameters

NameTypeDescription
nameStringThe name of the argument.
dataTypeIdOpcNodeIdThe identifier (DataTypeId) of the DataType to use for the argument to define.

Exceptions

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

OpcArgument(string, OpcDataType, bool) ​

since v2.9

Initializes a new instance of the OpcArgument class using the name and dataType of argument to define.

csharp
public OpcArgument(string name, OpcDataType dataType, bool isArray)
vbnet
Public Sub New(name As String, dataType As OpcDataType, isArray As Boolean)

Parameters

NameTypeDescription
nameStringThe name of the argument.
dataTypeOpcDataTypeOne of the members defined by the OpcDataType enum to use to define the DataType and DataTypeId of the argument to define.
isArrayBooleanThe value true, if the argument shall be an array; otherwise the value false.

OpcArgument(string, OpcDataType, params uint[]) ​

since v2.9

Initializes a new instance of the OpcArgument class using the name and dataType of argument to define.

csharp
public OpcArgument(
    string name,
    OpcDataType dataType,
    params uint[] arrayDimensions)
vbnet
Public Sub New(
    name As String,
    dataType As OpcDataType,
    ParamArray arrayDimensions As UInteger())

Parameters

NameTypeDescription
nameStringThe name of the argument.
dataTypeOpcDataTypeOne of the members defined by the OpcDataType enum to use to define the DataType and DataTypeId of the argument to define.
arrayDimensionsparams UInt32[]The length for each dimension of an array value of the argument represented.

OpcArgument(string, OpcNodeId, bool) ​

since v2.9

Initializes a new instance of the OpcArgument class using the name and dataTypeId of argument to define.

csharp
public OpcArgument(string name, OpcNodeId dataTypeId, bool isArray)
vbnet
Public Sub New(name As String, dataTypeId As OpcNodeId, isArray As Boolean)

Parameters

NameTypeDescription
nameStringThe name of the argument.
dataTypeIdOpcNodeIdThe identifier (DataTypeId) of the DataType to use for the argument to define.
isArrayBooleanThe value true, if the argument shall be an array; otherwise the value false.

Exceptions

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

OpcArgument(string, OpcNodeId, params uint[]) ​

since v2.9

Initializes a new instance of the OpcArgument class using the name and dataTypeId of argument to define.

csharp
public OpcArgument(
    string name,
    OpcNodeId dataTypeId,
    params uint[] arrayDimensions)
vbnet
Public Sub New(
    name As String,
    dataTypeId As OpcNodeId,
    ParamArray arrayDimensions As UInteger())

Parameters

NameTypeDescription
nameStringThe name of the argument.
dataTypeIdOpcNodeIdThe identifier (DataTypeId) of the DataType to use for the argument to define.
arrayDimensionsparams UInt32[]The length for each dimension of an array value of the argument represented.

Exceptions

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

OpcArgument(string, OpcDataType, string) ​

since v2.9

Initializes a new instance of the OpcArgument class using the name, dataType and description of the argument to define.

csharp
public OpcArgument(string name, OpcDataType dataType, string description)
vbnet
Public Sub New(name As String, dataType As OpcDataType, description As String)

Parameters

NameTypeDescription
nameStringThe name of the argument.
dataTypeOpcDataTypeOne of the members defined by the OpcDataType enum to use to define the DataType and DataTypeId of the argument to define.
descriptionStringThe textual description of the use of the argument.

OpcArgument(string, OpcNodeId, string) ​

since v2.9

Initializes a new instance of the OpcArgument class using the name, dataTypeId and description of the argument to define.

csharp
public OpcArgument(string name, OpcNodeId dataTypeId, string description)
vbnet
Public Sub New(name As String, dataTypeId As OpcNodeId, description As String)

Parameters

NameTypeDescription
nameStringThe name of the argument.
dataTypeIdOpcNodeIdThe identifier (DataTypeId) of the DataType to use for the argument to define.
descriptionStringThe textual description of the use of the argument.

Exceptions

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

OpcArgument(string, OpcDataType, bool, string) ​

since v2.9

Initializes a new instance of the OpcArgument class using the name, dataType and description of the argument to define.

csharp
public OpcArgument(
    string name,
    OpcDataType dataType,
    bool isArray,
    string description)
vbnet
Public Sub New(
    name As String,
    dataType As OpcDataType,
    isArray As Boolean,
    description As String)

Parameters

NameTypeDescription
nameStringThe name of the argument.
dataTypeOpcDataTypeOne of the members defined by the OpcDataType enum to use to define the DataType and DataTypeId of the argument to define.
isArrayBooleanThe value true, if the argument shall be an array; otherwise the value false.
descriptionStringThe textual description of the use of the argument.

OpcArgument(string, OpcDataType, uint[], string) ​

since v2.9

Initializes a new instance of the OpcArgument class using the name, dataType and description of the argument to define.

csharp
public OpcArgument(
    string name,
    OpcDataType dataType,
    uint[] arrayDimensions,
    string description)
vbnet
Public Sub New(
    name As String,
    dataType As OpcDataType,
    arrayDimensions As UInteger(),
    description As String)

Parameters

NameTypeDescription
nameStringThe name of the argument.
dataTypeOpcDataTypeOne of the members defined by the OpcDataType enum to use to define the DataType and DataTypeId of the argument to define.
arrayDimensionsUInt32[]The length for each dimension of an array value of the argument represented.
descriptionStringThe textual description of the use of the argument.

OpcArgument(string, OpcNodeId, bool, string) ​

since v2.9

Initializes a new instance of the OpcArgument class using the name, dataTypeId and description of the argument to define.

csharp
public OpcArgument(
    string name,
    OpcNodeId dataTypeId,
    bool isArray,
    string description)
vbnet
Public Sub New(
    name As String,
    dataTypeId As OpcNodeId,
    isArray As Boolean,
    description As String)

Parameters

NameTypeDescription
nameStringThe name of the argument.
dataTypeIdOpcNodeIdThe identifier (DataTypeId) of the DataType to use for the argument to define.
isArrayBooleanThe value true, if the argument shall be an array; otherwise the value false.
descriptionStringThe textual description of the use of the argument.

Exceptions

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

OpcArgument(string, OpcNodeId, uint[], string) ​

since v2.9

Initializes a new instance of the OpcArgument class using the name, dataTypeId and description of the argument to define.

csharp
public OpcArgument(
    string name,
    OpcNodeId dataTypeId,
    uint[] arrayDimensions,
    string description)
vbnet
Public Sub New(
    name As String,
    dataTypeId As OpcNodeId,
    arrayDimensions As UInteger(),
    description As String)

Parameters

NameTypeDescription
nameStringThe name of the argument.
dataTypeIdOpcNodeIdThe identifier (DataTypeId) of the DataType to use for the argument to define.
arrayDimensionsUInt32[]The length for each dimension of an array value of the argument represented.
descriptionStringThe textual description of the use of the argument.

Exceptions

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

OpcArgument(string, OpcDataType, object, string) ​

since v2.9

Initializes a new instance of the OpcArgument class using the name, dataType, defaultValue and description of the argument to define.

csharp
public OpcArgument(
    string name,
    OpcDataType dataType,
    object defaultValue,
    string description)
vbnet
Public Sub New(
    name As String,
    dataType As OpcDataType,
    defaultValue As Object,
    description As String)

Parameters

NameTypeDescription
nameStringThe name of the argument.
dataTypeOpcDataTypeOne of the members defined by the OpcDataType enum to use to define the DataType and DataTypeId of the argument to define.
defaultValueObjectThe value used in case there is no custom value specified for the argument.
descriptionStringThe textual description of the use of the argument.

OpcArgument(string, OpcNodeId, object, string) ​

since v2.9

Initializes a new instance of the OpcArgument class using the name, dataTypeId, defaultValue and description of the argument to define.

csharp
public OpcArgument(
    string name,
    OpcNodeId dataTypeId,
    object defaultValue,
    string description)
vbnet
Public Sub New(
    name As String,
    dataTypeId As OpcNodeId,
    defaultValue As Object,
    description As String)

Parameters

NameTypeDescription
nameStringThe name of the argument.
dataTypeIdOpcNodeIdThe identifier (DataTypeId) of the DataType to use for the argument to define.
defaultValueObjectThe value used in case there is no custom value specified for the argument.
descriptionStringThe textual description of the use of the argument.

Exceptions

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

OpcArgument(string, OpcDataType, bool, object, string) ​

since v2.9

Initializes a new instance of the OpcArgument class using the name, dataType, defaultValue and description of the argument to define.

csharp
public OpcArgument(
    string name,
    OpcDataType dataType,
    bool isArray,
    object defaultValue,
    string description)
vbnet
Public Sub New(
    name As String,
    dataType As OpcDataType,
    isArray As Boolean,
    defaultValue As Object,
    description As String)

Parameters

NameTypeDescription
nameStringThe name of the argument.
dataTypeOpcDataTypeOne of the members defined by the OpcDataType enum to use to define the DataType and DataTypeId of the argument to define.
isArrayBooleanThe value true, if the argument shall be an array; otherwise the value false.
defaultValueObjectThe value used in case there is no custom value specified for the argument.
descriptionStringThe textual description of the use of the argument.

OpcArgument(string, OpcDataType, uint[], object, string) ​

since v2.9

Initializes a new instance of the OpcArgument class using the name, dataType, defaultValue and description of the argument to define.

csharp
public OpcArgument(
    string name,
    OpcDataType dataType,
    uint[] arrayDimensions,
    object defaultValue,
    string description)
vbnet
Public Sub New(
    name As String,
    dataType As OpcDataType,
    arrayDimensions As UInteger(),
    defaultValue As Object,
    description As String)

Parameters

NameTypeDescription
nameStringThe name of the argument.
dataTypeOpcDataTypeOne of the members defined by the OpcDataType enum to use to define the DataType and DataTypeId of the argument to define.
arrayDimensionsUInt32[]The length for each dimension of an array value of the argument represented.
defaultValueObjectThe value used in case there is no custom value specified for the argument.
descriptionStringThe textual description of the use of the argument.

OpcArgument(string, OpcNodeId, bool, object, string) ​

since v2.9

Initializes a new instance of the OpcArgument class using the name, dataTypeId, defaultValue and description of the argument to define.

csharp
public OpcArgument(
    string name,
    OpcNodeId dataTypeId,
    bool isArray,
    object defaultValue,
    string description)
vbnet
Public Sub New(
    name As String,
    dataTypeId As OpcNodeId,
    isArray As Boolean,
    defaultValue As Object,
    description As String)

Parameters

NameTypeDescription
nameStringThe name of the argument.
dataTypeIdOpcNodeIdThe identifier (DataTypeId) of the DataType to use for the argument to define.
isArrayBooleanThe value true, if the argument shall be an array; otherwise the value false.
defaultValueObjectThe value used in case there is no custom value specified for the argument.
descriptionStringThe textual description of the use of the argument.

Exceptions

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

OpcArgument(string, OpcNodeId, uint[], object, string) ​

since v2.9

Initializes a new instance of the OpcArgument class using the name, dataTypeId, defaultValue and description of the argument to define.

csharp
public OpcArgument(
    string name,
    OpcNodeId dataTypeId,
    uint[] arrayDimensions,
    object defaultValue,
    string description)
vbnet
Public Sub New(
    name As String,
    dataTypeId As OpcNodeId,
    arrayDimensions As UInteger(),
    defaultValue As Object,
    description As String)

Parameters

NameTypeDescription
nameStringThe name of the argument.
dataTypeIdOpcNodeIdThe identifier (DataTypeId) of the DataType to use for the argument to define.
arrayDimensionsUInt32[]The length for each dimension of an array value of the argument represented.
defaultValueObjectThe value used in case there is no custom value specified for the argument.
descriptionStringThe textual description of the use of the argument.

Exceptions

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

OpcArgument(string, Type) ​

Initializes a new instance of the OpcArgument class using the name and type of argument to define.

csharp
public OpcArgument(string name, Type type)
vbnet
Public Sub New(name As String, type As Type)

Parameters

NameTypeDescription
nameStringThe name of the argument.
typeTypeThe Type of argument.

Exceptions

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

OpcArgument(string, Type, string) ​

Initializes a new instance of the OpcArgument class using the name, type and description of the argument to define.

csharp
public OpcArgument(string name, Type type, string description)
vbnet
Public Sub New(name As String, type As Type, description As String)

Parameters

NameTypeDescription
nameStringThe name of the argument.
typeTypeThe Type of argument.
descriptionStringThe textual description of the use of the argument.

Exceptions

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

OpcArgument(string, Type, object, string) ​

Initializes a new instance of the OpcArgument class using the name, type, defaultValue and description of the argument to define.

csharp
public OpcArgument(
    string name,
    Type type,
    object defaultValue,
    string description)
vbnet
Public Sub New(
    name As String,
    type As Type,
    defaultValue As Object,
    description As String)

Parameters

NameTypeDescription
nameStringThe name of the argument.
typeTypeThe Type of argument.
defaultValueObjectThe value used in case there is no custom value specified for the argument.
descriptionStringThe textual description of the use of the argument.

Exceptions

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

Properties ​

ArrayDimensions ​

since v2.8

Gets the length for each dimension of an array value of the argument represented.

csharp
public uint[] ArrayDimensions { get; }
vbnet
Public ReadOnly Property ArrayDimensions As UInteger()

Property value

UInt32[]

An empty array in case there the value of the argument represented is a scalar value; otherwise an uint array there each entry indicates a single dimension while the value of the entry defines the length of that dimension or a null reference (Nothing in Visual Basic) if ArrayRank is less or equals zero.

ArrayLength ​

since v2.8

Gets the total number of elements in all the dimensions of the array value of the argument represented.

csharp
public long ArrayLength { get; }
vbnet
Public ReadOnly Property ArrayLength As Long

Property value

Int64

The total number of elements in all the dimensions of the array value of the argument represented; zero if there are no elements in the array.

ArrayRank ​

since v2.8

Gets the rank (number of dimensions) of the array value of the argument represented. For example, a one-dimensional array returns 1, a two-dimensional array returns 2, and so on.

csharp
public int ArrayRank { get; }
vbnet
Public ReadOnly Property ArrayRank As Integer

Property value

Int32

The rank (number of dimensions) of the array value of the argument represented.

DataType ​

Gets the underlying built-in data type used by the argument.

csharp
public OpcDataType DataType { get; }
vbnet
Public ReadOnly Property DataType As OpcDataType

Property value

OpcDataType

One of the members defined by the OpcDataType enumeration which defines the data type of the argument.

DataTypeId ​

Gets the node identifier of the data type node identifying the type of argument.

csharp
public OpcNodeId DataTypeId { get; }
vbnet
Public ReadOnly Property DataTypeId As OpcNodeId

Property value

OpcNodeId

An instance of the OpcNodeId which identifies the data type node representing the type of argument.

DefaultValue ​

Gets the value of the argument that is by default used in case there is no custom value specified for the argument.

csharp
public object DefaultValue { get; }
vbnet
Public ReadOnly Property DefaultValue As Object

Property value

Object

The default value used by argument by definition.

Description ​

Gets the textual description of the use of the argument represented.

csharp
public OpcText Description { get; }
vbnet
Public ReadOnly Property Description As OpcText

Property value

OpcText

A string which describes the use of the argument.

Descriptions ​

since v2.12

Gets the OpcArgumentGlobalization instance used to control the localization and other globalization related tasks for the Description of the current attribute.

csharp
public OpcArgumentGlobalization Descriptions { get; }
vbnet
Public ReadOnly Property Descriptions As OpcArgumentGlobalization

Property value

OpcArgumentGlobalization

An instance of the OpcArgumentGlobalization class used for the current OpcArgument to perform localization tasks for its Description.

IsArray ​

since v2.8

Gets a value indicating whether the value of the argument represented is an array.

csharp
public bool IsArray { get; }
vbnet
Public ReadOnly Property IsArray As Boolean

Property value

Boolean

The value true if the value of the argument represented is an array; otherwise the false.

Name ​

Gets the name of the argument.

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

Property value

String

A value which identifies the argument using a simple name.

Remarks

The string used as the name of the argument does not rely on any naming-rules which typically apply to names in programming languages. Therefore it is possible to use whitespaces and special characters as well. There exists no restriction regarding the naming of an argument.

Methods ​

GetArrayLength ​

since v2.8

Gets a 32-bit integer that represents the number of elements in the specified dimension of the array value of the argument.

csharp
public long GetArrayLength(int dimension)
vbnet
Public Function GetArrayLength(dimension As Integer) As Long

Parameters

NameTypeDescription
dimensionInt32A zero-based dimension of the array value whose length needs to be determined.

Returns

Int64

A 32-bit integer that represents the number of elements in the specified dimension of the array value.

Exceptions

ExceptionCondition
ArgumentOutOfRangeExceptionThe dimension is less than zero or equals to or greater than ArrayRank.
InvalidOperationExceptionThe value of the argument represented is not an array (see IsArray).

GetArrayLowerBound ​

since v2.8

Gets the index of the first element of the specified dimension in the array value of the argument.

csharp
public long GetArrayLowerBound(int dimension)
vbnet
Public Function GetArrayLowerBound(dimension As Integer) As Long

Parameters

NameTypeDescription
dimensionInt32A zero-based dimension of the array value whose starting index needs to be determined.

Returns

Int64

The index of the first element of the specified dimension in the array value.

Exceptions

ExceptionCondition
ArgumentOutOfRangeExceptionThe dimension is less than zero or equals to or greater than ArrayRank.
InvalidOperationExceptionThe value of the argument represented is not an array (see IsArray).

GetArrayUpperBound ​

since v2.8

Gets the index of the last element of the specified dimension in the array value of the argument.

csharp
public long GetArrayUpperBound(int dimension)
vbnet
Public Function GetArrayUpperBound(dimension As Integer) As Long

Parameters

NameTypeDescription
dimensionInt32A zero-based dimension of the array value whose upper bound needs to be determined.

Returns

Int64

The index of the last element of the specified dimension in the array value, or -1 if the specified dimension is empty.

Exceptions

ExceptionCondition
ArgumentOutOfRangeExceptionThe dimension is less than zero or equals to or greater than ArrayRank.
InvalidOperationExceptionThe value of the argument represented is not an array (see IsArray).