View Issue Details

IDProjectCategoryView StatusLast Update
001014610000-014: PubSubSpecpublic2025-03-13 15:05
ReporterMatthias Damm Assigned ToMatthias Damm  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version1.05.04 
Target Version1.05.06 RC1Fixed in Version1.05.06 RC1 
Summary0010146: Rules for DataSetMessage JSON encoding need more details
Description

7.2.5.4 DataSetMessage
There is text that defines special handling on top level:
If the FieldEncoding1 is FALSE in the DataSetMessageContentMask, the Variant at the top level of a field is encoded as a JSON value containing only the value of the Body field. If this Variant contains an ExtensionObject, the ExtensionObject shall be encoded as a Structure without the UaTypeId field. This also applies to the Variant in a DataValue at the top level of a field.

This does not cover the special cases of having fields with abstract type or allow subtype.
We need to describe all special cases

Additional Information

Attached is a proposal from Randy

TagsNo tags attached.
Attached Files
Commit Version1.05.06 RC1
Fix Due Date2025-04-30

Relationships

related to 0009987 closedMatthias Damm JSON field with multidimensional arrays with RawData-Flag 
related to 0010147 resolvedMatthias Damm Discovery messages do not define the JSON encoding to use 
related to 0010150 closedMatthias Damm JSON Encoding of Enumeration in a DataSetMessage field 
related to 0010154 closedMatthias Damm Describe handling of Bad and Uncertain status in JSON Variant field encoding 

Activities

Matthias Damm

2025-02-27 20:50

developer   ~0022418

7.2.5.4 DataSetMessage
Added table with examples for RawData true and false.
Replaced description of VerboseEncoding on first level with following text agreed on in MQTT meeting today:

OPC 10000-6 defines two DataEncodings: CompactEncoding and VerbosetEncoding. They have the same structure except VerbosetEncoding includes default values so verbose messages are larger.
This specification defines a DataSet field encoding for the VerbosetEncoding which simplifies the encoding of Variants and ExtensionObjects by omitting UaType and UaTypeId fields with concrete DataType defined in the FieldMetaData. In this case the Variants at the top level are collapsed.
By default, DataSet fields can only be decoded by inferring the schema from the JSON message or if the DataSetMetaData describing the DataSet fields is available (i.e. from the DataSetMetaData messages).
There are two cases where the DataSetMetaData is not sufficient to unambiguously decode messages.
• DataSet fields with BuiltInType ExtensionObject and a value which is a subtype of the DataType in the FieldMetaData. The UaTypeId is needed to decode the value.
• DataSet fields with BuiltInType Variant. The UaType is needed to decode the value.
Note that the same problem exists when a field of a nested Structure has DataType BaseDataType or AllowSubTypes=TRUE.
If RawData=FALSE, then the Publisher always include the full Variant with the UaType or ExtensionObject with UaTypeId when encoding these fields at the top level or within a nested Structure.
If RawData=TRUE the Publisher will encode the Variant but not include the UaTypeId and UaType which means a OPC UA DataSetReader is not able to the DataTypes of the original values.
Publishers should avoid publishing data that cannot be decoded with knowledge of the DataSetMetaData. They may prohibit configuration of DataSets that have fields that would be ambiguous if RawData=TRUE.
Table 186 provides examples of field encoding with the different options.

Jim Luth

2025-03-13 15:05

administrator   ~0022531

Agreed to changes in F2F meeting.

Issue History

Date Modified Username Field Change
2025-02-11 12:48 Matthias Damm New Issue
2025-02-11 12:48 Matthias Damm File Added: CompactVerboseRawDiscussion.docx
2025-02-11 12:48 Matthias Damm Relationship added related to 0009987
2025-02-11 13:54 Matthias Damm Relationship added related to 0010147
2025-02-12 09:02 Matthias Damm Relationship added related to 0010150
2025-02-12 16:18 Matthias Damm Relationship added related to 0010154
2025-02-25 17:55 Jim Luth Assigned To => Matthias Damm
2025-02-25 17:55 Jim Luth Status new => assigned
2025-02-25 17:56 Jim Luth Commit Version => 1.05.06 RC1
2025-02-25 17:56 Jim Luth Fix Due Date => 2025-04-30
2025-02-27 20:50 Matthias Damm Status assigned => resolved
2025-02-27 20:50 Matthias Damm Resolution open => fixed
2025-02-27 20:50 Matthias Damm Fixed in Version => 1.05.06 RC1
2025-02-27 20:50 Matthias Damm Note Added: 0022418
2025-03-13 15:05 Jim Luth Status resolved => closed
2025-03-13 15:05 Jim Luth Note Added: 0022531