InformationModel.MakeVariableType<T>(browseName, variableTypeId, dataTypeId, arrayDimensions)

Create a project variable type derived from the type indicated by the third argument (supertype), and which contains the data type indicated by the second argument. Returns a C# object of the specified
<T>
type corresponding to the project variable type created. Using the fourth argument (optional), it is possible to create an array, specifying its type and size.
static T MakeVariableType<T>(QualifiedName
browseName
, NodeId
variableTypeId
, NodeId
dataTypeId
, uint[]
arrayDimensions
);

Arguments

T
IUAVariableType
C# class, corresponding to the C# object class to return.
browseName
(QualifiedName)
The
BrowseName
of the new variable type.
variableTypeId
(NodeId)
The Variable type from which the new variable type is derived.
TIP: A node inside the
VariableTypes
class represents the Data type. For example,
FTOptix.CoDeSys.VariableTypes.Tag
.
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

var myCustomTagType = InformationModel.MakeVariableType<FTOptix.CoDeSys.TagType>("CustomCoDeSysTagType", FTOptix.CoDeSys.VariableTypes.Tag, OpcUa.DataTypes.UInt16);
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.