The HasStructuredComponent ReferenceTypeis a concrete ReferenceTypeand can be used directly. It is a subtype of the HasComponent ReferenceType.

The semantic of this ReferenceTypeis to indicate that a VariableTypeor Variablealso exposes its Structurefields as Variablesin the information model.

The SourceNodeof this ReferenceTypeshall be a VariableTypeor a Variablehaving a Structure DataType.

When the Valueof the SourceNodeis a scalar then the TargetNodeshall be a Variable which represents afieldoftheStructure DataType. The BrowseNameof a DataVariablewhich is exposed shall be the same as the field name oftheStructure DataType. The NamespaceIndexof the BrowseNameshall be the same as the NamespaceIndexof the Structure DataTypewhich first defines the field. The exposed fields shall be the same DataTypeand ValueRankas the field in the Structure. The Valueis expected to represent the value of the Structure’sfield.

When the Valueof the SourceNodeis an array then the BrowseNameof the TargetNodeshall be <V[N]> where ‘V’ is the BrowseName of the Parent Node and ‘N’ shall be the array index number of the DataTypeof the Structure. The NamespaceIndexof the BrowseNameshall be the same as the NamespaceIndexof the Structure DataTypewhich first defines the field. For multidimensional arrays the BrowseNameshall be <V[M][N][…]>. The Valueis expected to represent the value of the array index which the BrowseNamedescribes. An example of this is shown in Figure 36. In this example ‘MyStructuredVariable’ has a Structure DataTypewith 2 fields, ‘FieldX’ and ‘FieldY’ and an array size of 2.

image039.png

Figure 36– Example of using HasStructuredComponent ReferencyType

The ReferenceType HasStructuredComponentcan be used to expose the entries of a multi-dimensional array of a Variableas subvariables. The same is true for the ModellingRule ExposesItsArray. However, both concepts handle this differently, as described in this section.

Using the HasStructuredComponent ReferenceType, the BrowseNameof the subvariable is defined and reflects the place in the array. That is, if the order in the array is changing, e.g. by deleting the first entry, the values of the correponding subvariables change, and the subvariable with the highest index is removed. When subscribing to a subvariable, the Clientalways get the value assigned to the place in the array. The same behaviour can be achieved when subscribing to the corresponding IndexRangeon the parent Variable.

Using the ExposesItsArray ModellingRule, the BrowseNameof the subvariables are not defined and do not reflect the place in the array. That is, if the order in the array is changing, e.g. by deleting the first entry, the values of the corresponding subvariables do not change, and the subvariable containing the first entry is removed. When subscribing to a subvariable, the order of the array is not considered. Even if the order is changing, the Clientsubscribing to the subvariable will observe the original subscribed content.

In Figure 37, an example is given, visualizing the differences. VariableA uses HasStructuredComponent. When the first entry in the array is deleted, the Values of the Variablesrepresenting the first and second entry are changed accordingly, and the third Variableis deleted.

VariableB uses ExposesItsArray. When the first entry in the array is deleted, the values of the Variablesoriginally representing the second and third entry of the array do not change, but the Variablerepresenting the first entry is deleted.

image040.png

Figure 37– Difference between HasStructuredComponent and ExposesItsArray