This Structured DataTypeis used to provide the metadata for a field of a custom Structure DataType. The StructureFieldis formally defined in Table 35.

Table 35– StructureField Structure

Name

Type

Description

StructureField

Structure

Name

String

A name for the field that is unique within the StructureDefinition.

Description

LocalizedText

A localized description of the field

DataType

NodeId

The NodeIdof the DataTypefor the field. When used by a StructureDefinitionwith a structureType of Structure, StructureWithOptionalFieldsor Unionthen the datatype shall be a concrete DataType, BaseDataType DataTypeor Structure DataType

If the structureType is StructureWithSubtypedValues, or UnionWithSubtypedValuesand the isOptionalfield is TRUE then the encoding of the field shall be able to transport any subtype of the DataType. OPC 10000-6provides more details of specific encodings.

ValueRank

Int32

The value rank for the field.

It shall be Scalar (-1) or a fixed rank Array (>=1).

ArrayDimensions

UInt32[]

This field specifies the maximum supported length of each dimension. If the maximum is unknown the value shall be 0.

The number of elements shall be equal to the value of the valueRank field. This field shall be null if valueRank≤ 0.

The maximum number of elements of an array transferred on the wire is 2 147 483 647 (max Int32).

MaxStringLength

UInt32

If the dataType field is a String, LocalizedText (text field)or ByteStringthen this field specifies the maximum supported length in bytes. If the maximum is unknown the value shall be 0.

If the dataType field is not a Stringor ByteStringthe value shall be 0.

If the valueRank is greater than 0 this field applies to each element of the array.

IsOptional

Boolean

If the structureType is StructureWithOptionalFields this field indicates if a data type field in a Structureis optional. In this case a value of FALSE means the StructureFieldis always present in all occurances of the Structure DataType and a value ofTRUE means the StructureFieldmay be present in an occurance of the Structure DataType.

If the structureTypeis Structureor Unionthis field shall be FALSE and shall be ignored.

If the structureType is StructureWithSubtypedValues, or UnionWithSubTypedValuesthis field is used to indicate if the data type field allows subtyping. Subtyping is allowed when set to TRUE.

StructureFieldscan be exposed as DataVariablesthat are children of the Variablethat contains the Structure Value. In this case the BrowseNameof the DataVariableshall be the same as the StructureFieldname and the NamespaceIndexof the BrowseName shall be the same as the Structure DataType Node NamespaceIndex.