A DataTypeRefinement refines the usage of a concrete Structured DataType. It can restrict the usage of fields of the Structured DataType and add meta data to fields of the Structured DataType, like providing the EngineeringUnits or EURange.
In order to restrict the usage for each field of a Structured DataType, the following can be defined:
- What DataType can be used, including the maximum array length and maximum string length
- If an optional field shall become mandatory or shall not be provided
- If a certain subtype of the DataType is allowed or not
The general rules for inheritance apply, as defined in 6.3, i.e., the DataType of a field can only be restricted to subtypes of the original DataType, mandatory fields cannot become optional, etc. If a concrete maximum array length or maximum string length has already been defined, it shall not be changed. If a field is defined that does not allow subtypes, this shall not be changed. If a field is defined that does allow subtypes, this can be changed to disallow subtypes.
Any restrictions on the Structured DataType only affect the usage, not the encoding of the DataType. It is still encoded according to the rules of the Structured DataType.
In addition to the restrictions, the DataTypeRefinement also allows meta data for fields to be added to a Structured DataType.