JSON messages

We support two main type of messages: Json defined by OpcUa and Json_Spesial defined by Prediktor. At present time we do not support the binary message UADP..

Json_Spesial Message

The Json_Simplifies is simple and fixed Json format consist of one object with element named "data" that holds an array of VQT objects. In addition the object can be expanded by the user with a fixed string. The Italicized part is here an example of a user defined extension. This can be added in UserExtra parameter (id : 11045) for a Writer Group Item. This has to expand the object with a valid Json format.

When using this format the UaPublisherBee will autocratically split or concatenate DataSet to maximize the message size without being too large. Because of this the user do not need to tune the number of values to control the message-size.

Json_Spesial Example


{

"data": [

_"schema": "apis/schemas/vqt.json","dataType":"raw","plant":"myPlant",_

{"tag": "test2.Worker.mySignal1","time": "2019-02-09T11:44:34.8905431Z","value": 145.126114,"status": 0},

{tag": "test2.Worker.mySignal2","time": "2019-02-09T11:44:34.8895786Z","value": 126.807716,"status": 0},

. . .

]

}

Json Message defined by OPC Unified Architecture.

This format is defined in the "OPC Unified Architecture Specification Part 14: PubSub Release 1.04", and the user should look at chapter 7.2.3 Json Message Mapping where this is described in details. Below is an example where we have a WriterGroup with property JsonNetworkMessageContentMask (id:11100 ) set to NetWorkMessageHeader=true, DataSetMessageHeader=true, and PublisherId=true. The VariableDataSet Writer property DataSetFieldContent (id:12060) set to StatusCode=true, and SourceTimeStamp=true. To test how the JSON change look in documentation, or try it out by change the parameters anf write the messages to a file.

Json Message Example


{

"MessageId": "5aaf34fe-51d8-4ddc-a294-3e8d3db3b5ab",

"MessageType": "ua-data",

"PublisherId": "UaPublisherBee1",

"Message": [

{

"DataSetWriterId": "2",

"PayLoad": {

"test2.Worker.Signal1": {

"Value": 0.911874,

"SourceTimestamp": "2019-02-13T15:03:33.1637587Z"

},

"test2.Worker.Signal2": {

"Value": 426.613861,

"SourceTimestamp": "2019-02-13T15:03:33.1637587Z"

},

"test2.Worker.Signal3": {

"Value": 113.692924,

"SourceTimestamp": "2019-02-13T15:03:33.1637587Z"

}

}

},

{

"DataSetWriterId": "2",

"PayLoad": {

"test2.Worker.Signal1": {

"Value": 0.889142,

"SourceTimestamp": "2019-02-13T15:03:34.163777Z"

},

"test2.Worker.Signal2": {

"Value": 423.00354,

"SourceTimestamp": "2019-02-13T15:03:34.163777Z"

},

"test2.Worker.Signal3": {

"Value": 113.268066,

"SourceTimestamp": "2019-02-13T15:03:34.163777Z"

}

}

}

]

}