04/02/2014
Hi All,
I need to send same Tags with different time stamp in a Single Network message.
As specification says, the Payload object is a name-value pair, here the name is a Tag/node name in the Dataset.
Is it valid to have duplicate name with different timestamp in a Network message?
Please share your inputs on this.
Thank you in advance.
04/02/2014
Thank you Randy.
The use case which I am trying to address here is, we have Publisher components which fetch data from the UA Server and sent to Mqtt broker.
So, if the publisher is subscribed to a server monitored item, where Queue size is greater than 1 (Say 5).
For every publishing interval, Publishing response may have 5 values for the monitored item.
How to send all the 5 values received from the server, in the Payload to the Broker.
04/02/2014
Hi Randy,
Thanks for your Inputs.
So i created multiple DatasetMessage for a Tag/Item for every Sampling Interval. The Network Message looks as given below:
{"MessageId":"1287f24d-8229-4580-874f-0eaf142526f9","MessageType":"ua-data","PublisherId":"Publisher","DataSetClassId":"6a4379ac-0adb-4000-8b7e-b57eaca01826",
"Messages":{"DataSetWriterId":1,"SequenceNumber":15,"MetaDataVersion":{"MajorVersion":1,"MinorVersion":1},"Payload":{"DataSetId":{"Value":{"Type":12,"Body":"DataSetId#01"},"SourceTimestamp":"2021-07-26T01:30:40.1811213Z","ServerTimestamp":"2021-07-26T01:30:40.181122Z"},"NS4|Numeric|1003":{"Value":{"Type":4,"Body":9},"SourceTimestamp":"2021-07-26T01:29:56.4537117Z","ServerTimestamp":"2021-07-26T01:29:56.5847112Z"}}},
"Messages":{"DataSetWriterId":1,"SequenceNumber":16,"MetaDataVersion":{"MajorVersion":1,"MinorVersion":1},"Payload":{"NS4|Numeric|1003":{"Value":{"Type":4,"Body":10},"SourceTimestamp":"2021-07-26T01:29:59.0757308Z","ServerTimestamp":"2021-07-26T01:29:59.184747Z"}}},
"Messages":{"DataSetWriterId":1,"SequenceNumber":17,"MetaDataVersion":{"MajorVersion":1,"MinorVersion":1},"Payload":{"NS4|Numeric|1003":{"Value":{"Type":4,"Body":11},"SourceTimestamp":"2021-07-26T01:30:01.3107239Z","ServerTimestamp":"2021-07-26T01:30:01.3847107Z"}}}}
The problem here is, the JSON validator is failing, with Error "Duplicate key 'Messages'.
Any inputs on this?
Thank you.
05/30/2017
Make sure the message complies with:
https://reference.opcfoundatio.....t14/7.2.3/
Should be a JSON array not a JSON object.
02/24/2014
Here is (my) tool that will show you how the possible formats should look like: OPC UA PubSub Formatter, https://kb.opclabs.com/Tool_Do....._Formatter .
Best regards
1 Guest(s)