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>(QualifiedNamebrowseName, NodeIdvariableTypeId, NodeIddataTypeId, uint[]arrayDimensions);
Arguments
- T
- IUAVariableTypeC# class, corresponding to the C# object class to return.
- browseName(QualifiedName)
- TheBrowseNameof the new variable type.
- variableTypeId(NodeId)
- The Variable type from which the new variable type is derived.TIP: The Data type is represented by a node inside theVariableTypesclasses. For example,FTOptix.CoDeSys.VariableTypes.Tag.
- dataTypeId(NodeId)
- The Data type contained in the new variable.TIP: The Data type is represented by a node inside theDataTypesclasses. 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