InformationModel.MakeVariableType(browseName, dataTypeId, arrayDimensions)

Create a project variable type derived from the
BaseDataVariableType
(base variable) type, which contains the data type indicated by the second argument and returns a C# object of the corresponding
IUAVariableType
type. Optionally, it is possible to create an array, specifying its size with the third argument.
static IUAVariableType MakeVariableType(QualifiedName
browseName
, NodeId
dataTypeId
, uint[]
arrayDimensions
);

Arguments

browseName
(QualifiedName)
The
BrowseName
of the new variable type.
dataTypeId
(NodeId)
The Data type contained in the new variable.
TIP: A node inside the
DataTypes
class represents the Data type. For example,
OpcUa.DataTypes.Boolean
.
arrayDimensions
(uint[ ])
Optional. The size of the Array.

Returns

IUAVariableType
A C# object matching the project variable type created.

Example

The following example shows an API that creates a
MyVarType
variable, which contains an Int32 data:
var myVar = InformationModel.MakeVariableType("MyVarType", OpcUa.DataTypes.Int32); Owner.Add(myVar);
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.