A DataTypeDictionaryis an entity that contains a set of type descriptions, such as an XML schema. DataTypeDictionariesare defined as Variablesof the VariableType DataTypeDictionaryType.

A DataTypeSystemspecifies the format and conventions for defining DataTypes inDataTypeDictionaries. DataTypeSystemsare defined as Objectsof the ObjectType DataTypeSystemType.

The ReferenceTypeused to relate Objectsof the ObjectType DataTypeSystemTypeto Variablesof the VariableType DataTypeDictionaryTypeis the HasComponent ReferenceType. Thus, the Variableis always the TargetNodeof a HasComponent Reference; this is a requirement for Variables. However, for DataTypeDictionariesthe Servershall always provide the inverse Reference, since it is necessary to know the DataTypeSystemwhen processing the DataTypeDictionary.

Changes may be a result of a change to a type description, but it is more likely that dictionary changes are a result of the addition or deletion of type descriptions. This includes changes made while the Serveris offline so that the new version is available when the Serverrestarts. Clientsmay subscribe to the DataTypeVersion Propertyto determine if the DataTypeDictionaryhas changed since it was last read.

The Servermay, but is not required to, make the DataTypeDictionarycontents available to Clientsthrough the Value Attribute. Clientsshould assume that DataTypeDictionarycontents are relatively large and that they will encounter performance problems if they automatically read the DataTypeDictionarycontents each time they encounter an instance of a specific DataType. The client should use the DataTypeVersion Propertyto determine whether the locally cached copy is still valid. If the client detects a change to the DataTypeVersion, then it shall re-read the DataTypeDictionary. This implies that the DataTypeVersion shall be updated by a Servereven after restart since Clientsmay persistently store the locally cached copy.

The Value Attributeof the DataTypeDictionary containing the type descriptions is a ByteString whose formatting is defined by the DataTypeSystem. For the “XML Schema” DataTypeSystem, the ByteString contains a valid XML Schema document. For the “OPC Binary” DataTypeSystem, the ByteString contains a string that is a valid XML document. The Servershall ensure that any change to the contents of the ByteString is matched with a corresponding change to the DataTypeVersion Property. In other words, the client may safely use a cached copy of the DataTypeDictionary, as long as the DataTypeVersion remains the same.

DataTypeDictionariesare complex Variableswhich expose their DataTypeDescriptionsas Variablesusing HasComponent References.A DataTypeDescriptionprovides the information necessary to find the formal description of a DataTypewithin the DataTypeDictionary. The Valueof a DataTypeDescriptiondepends on the DataTypeSystemof the DataTypeDictionary. When using “OPC Binary” dictionaries the Valueshall be the name of the TypeDescription. When using “XML Schema” dictionaries the Value shall be an Xpath expression (see XPATH) which points to an XML element in the schema document.

Like DataTypeDictionarieseach DataTypeDescriptionprovides the Property DataTypeVersionindicating whether the type description of the DataTypehas changed. Changes to the DataTypeVersionmay impact the operation of Subscriptions. If the DataTypeVersionchanges for a Variablethat is being monitored for a Subscription and that uses thisDataTypeDescription, then the next data change Notificationsent for the Variablewill contain a status that indicates the change in the DataTypeDescription.

DataTypeEncoding Objectsof the DataTypesreference their DataTypeDescriptionsof the DataTypeDictionariesusing HasDescriptionReferences.Serversshall provide the inverse Referencesthat relate the DataTypeDescriptionsback to the DataTypeEncoding Objects. If a DataType Nodeis exposed in the AddressSpace, it shall provide its DataTypeEncodingsand if a DataTypeDictionaryis exposed then it should expose all of its DataTypeDescriptions. Both of these Referencesshall be bi-directional.

Figure D.2 provides an example how DataTypesare modelled in the AddressSpace.

image029.png

Figure D.2– Example of DataType Modelling

In some scenarios an OPC UA Servermay have resource limitations which make it impractical to expose large DataTypeDictionaries. In these scenarios the Servermay be able to provide access to descriptions for individual DataTypes even if the entire dictionary cannot be read. For this reason, this standard defines a Propertyfor the DataTypeDescriptioncalled DictionaryFragment. This Propertyis a ByteString that contains a subset of the DataTypeDictionarywhich describes the format of the DataTypeassociated with the DataTypeDescription. Thus, the Serversplits the large DataTypeDictionaryinto several small parts and Clientscan access without affecting the overall system performance.

However, Serversshould provide the whole DataTypeDictionaryat once if this is possible. It is typically more efficient to read the whole DataTypeDictionaryat once instead of reading individual parts.