Questions regarding the use of the ANSI C SDK for Server or Client development or integration into customer products ...
- Full Member
- Posts: 5
- Joined: 08 Feb 2013, 08:11
we're are looking for a way to define an unnamed complex structure under a defined complex structure. In other words we want to have a structure in a structure without to define the data type of the substructure by itself, e.g. as it is possible in XML schemas. Is this possible by using the ANSI C SDK or is it not supported by OPC UA at all?
We did try out the following data structure:
Code: Select all
<opc:StructuredType BaseType="ua:ExtensionObject" Name="TestDataType">
<opc:Field TypeName="ua:ExtensionObject" Name="TestStruct">
<opc:Field TypeName="opc:String" Name="AxisName"/>
<opc:Field TypeName="opc:Double" Name="Position"/>
<opc:Field TypeName="opc:String" Name="Unit"/>
Thanks and greetz
- Hero Member
- Posts: 2529
- Joined: 18 Mar 2011, 15:09
OPC UA allows to define structured DataTypes that have fields with another structured DataType. This structure definition needs not to be exposed by an own OPC UA DataType node in addressspace.
However, in the DataType dictionary the nested structured DataType must be exposed by an own <opc:StructuredType> node.
UaModeler does not support this feature.
So you have to add the DataType node, the encoding methods and the dictionary by hand.
Or you decide to add the nested structure definition as a second DataType and create the DataType code and the dictionary by UaModeler.