View Issue Details

IDProjectCategoryView StatusLast Update
000903110000-014: PubSubSpecpublic2023-07-25 15:37
ReporterPeter Wehrfritz Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status acknowledgedResolutionopen 
Summary0009031: RawData encoding with reversible JSON
Description

The specification is very thin when it comes to RawData encoding with Json. Without the ReversibleFieldEncoding flag, i.e., in the non-reversible case, there is probably no or little difference between DataSetFieldContentMask.None and DataSetFieldContentMask.RawData. But how does it look like for the reversible case? The only sentence I found so far related to this is the following in 7.2.4.3:

The fields in the DataSetMessage are specified by the DataSetFieldContentMask in the DataSetWriter parameters.

I studied the examples in the Appendix of 1.05.03 Draft 5, but I haven't found any example for the RawEncoding. I would expect that the value is encoded as the body of the variant. The type of the variant should be kown to the reader, so it is not needed to be re-transmitted all the time. It would look similar to the non-reversible output, but differ in some cases, e.g., enums, status codes, structures, unions, node ids, etc. The biggest difference is that it is reversible and can actually be consumed by a DataSetReader.

TagsPart 014 - PubSub
Commit Version
Fix Due Date

Activities

Peter Wehrfritz

2023-07-06 15:20

reporter   ~0019690

Here is a possible example of a message in the "JSON-NetworkMessage" format with ReversibleFieldEncoding set to true and RawData field encoding selected with the DataSetFieldContentMask.

{
"MessageId":"9279c0b3-da88-45a4-af74-451cebf82db0",
"MessageType":"ua-data",
"PublisherId":"MyPublisher",
"Messages":
[
{
"DataSetWriterId":101,
"SequenceNumber":68468,
"MetaDataVersion":{"MajorVersion":672338910,"MinorVersion":672341762},
"Timestamp":"2021-09-27T18:45:19.555Z",
"Payload":
{
"Active":true,
"Temperature":25.5,
"Counter":0,
"AdditionalInfo":"The system is running normally (1)"
}
},
{
"DataSetWriterId":102,
"SequenceNumber":25460,
"MetaDataVersion":{"MajorVersion":672338910,"MinorVersion":672341762},
"Timestamp":"2021-09-27T18:45:19.555Z",
"Status":1073741824,
"Payload":{
"LocationName":"Building A",
"Coordinate":
{
"TypeId":{"IdType":1,"Id":"CoordinateDataType","Namespace":2},
"Body":{"Y":0.2}
},
"Measurements":[20030,20020,20010]
}
},
{
"DataSetWriterId":103,
"SequenceNumber":66915,
"MetaDataVersion":{"MajorVersion":672338910,"MinorVersion":672341762},
"Timestamp":"2021-09-27T18:45:19.555Z",
"Payload":
{
"BooleanValue":false,
"Int32Value":0,
"Int64Value":"1",
"UInt32Value":1,
"UInt64Value":"1",
"DoubleValue":0.5,
"DateTimeValue":"2021-09-14T07:14:30Z",
"StringValue":"String 1",
"GuidValue":"ebfc352a-3142-4b99-9bbe-89a517d6a77e",
"StatusCodeValue":2147483648,
"LocalizedTextValue":{"Text":"Localized text 1"},
"ByteStringValue":"AAEC",
"NodeIdValue":
{
"IdType":1,
"Id":"Boilers.Boiler #1.PipeX001.ValveX001.Input",
"Namespace":3
},
"QualifiedNameValue":{"Name":"PipeX001","Uri":2}
}
}
]
}

Jim Luth

2023-07-25 15:36

administrator   ~0019722

Agreed this needs better explaination in the specs.

Issue History

Date Modified Username Field Change
2023-06-28 15:12 Peter Wehrfritz New Issue
2023-06-28 15:12 Peter Wehrfritz Tag Attached: Part 014 - PubSub
2023-06-30 15:45 Matthias Damm Project UA Specification => 10000-014: PubSub
2023-07-06 15:20 Peter Wehrfritz Note Added: 0019690
2023-07-25 15:36 Jim Luth Note Added: 0019722
2023-07-25 15:37 Jim Luth Status new => acknowledged