Ok, that make sense. Thanks for clarification!
But now, imho it make no sense to create/use some JSON messages layout which is not convertable into the UA Binary protocol.
Is this maybe a missing definition rule/restriction for the JSON message in Part 14?
How is it possible in PubSub to create message(s) like a queue from a MonitoredItems in a PublishResponse message?
Moderators-Companion
02/24/2014
The capability of adding more than one DataSetMessage from one DataSetWriter into a NetworkMessage is independent of the encoding. This is possible in JSON and UADP Message Mapping.
If it is allowed (makes sense) depende on the configuration of the DataSetWriter KeyFrameCount and the type of data source.
A KeyFrameCount of >=1 is used for cyclic communication. In this case, a DataSetWriterId is only one time in a NetworkMessage, independent of JSON or UADP. This is normally the case for cyclic sending of a variable values.
A KeyFrameCount of 0 indicates an event based data source and if there are several events in one PublishingInterval, the same DataSetWriterId can be several times (>=0) in a NetworkMessage. This would be used if the source is an OPC UA Event subscription.
Thank you for the detailed answer!
“If it is allowed (makes sense) depende on the configuration of the DataSetWriter KeyFrameCount and the type of data source.”
My understanding is “it is only valid/permitted for events”.
There is no specified way to publish the equal DataSetWriterId with same Variable value (type PublishedVariableDataType/PublishedDataItemsDataType) in one NetworkMessage. So there is no queue mechnismen like in MonitoredItem possible and the publication can only contain the latest value.
So for instance samplingIntervalHint is 100ms and PublishingInterval is 1000ms so 9 of 10 samplinged values are lost. Correct?
08/13/2019
Hi,
We are also interested in answers about this subject. From Part 14 § 6.2.5.2 (PublishingInterval), my understanding is also that a NetworkMessage can contain multiple DataSetMessages produced by a single PublishedDataSet (hence the same DataSetWriterId may appear in this NetworkMessage), but only in the case of Events. Is that correct ?
In the case of Events too, there is an implicit queue mechanism that stores pending DataSetMessages before the next PublishingInterval (in case of overflow, it adds an Event of type EventQueueOverflowEventType instead of the Event). Are there more information on this queue?
On the wire, Event and Data DataSetMessages seems to be encoded the same way (a list of fields prefixed by the number of fields, according to §7.2.2.3.5 and §7.2.2.3.7). Hence, why would there be a difference in the handling of Events and Data ?
The main question finally sums up as : can we have non-cyclic PublishedDataSets (KeyFrameCount = 0) for PublishedData ?
Thanks in advance for your answer,
Best regards
Moderators-Companion
02/24/2014
The possible number of DataSetMessages for one DataSetWriter in a NetworkMessage depends on the KeyFrameCount.
KeyFrameCount = 0 -> number is 0 to N
KeyFrameCount = 1 -> number is always 1
KeyFrameCount > 1 -> number is 0 or 1
The DataSetWriter sends DataSets. A DataSet is described by a DataSetMetaData and this is defined by a PublishedDataSet. A PublisedDataSet also defines the source of information (if visible in OPC UA).
There are two well defined sources (1) a list of OPC UA variables and (2) OPC UA events.
Other sources are application specific and also the configuration of the source is application specific.
For the two OPC UA defined sources, the allowed KeyFrameCount values are clearly defined:
(1) PublishedDataItems requires KeyFrameCount >=1
(2) PublishedEvents requires KeyFrameCount of 0
Therefore a PublishedDataItems PublishedData set can produce maximum one DataSetMessage per PublishingInterval. In UADP it produces either a Data Key Frame DataSetMessage or a Delta Frame DataSetMessage.
A PublishedEvents PublishedData set can produce one to N DataSetMessage per PublishingInterval. In UADP it produces Event DataSetMessages.
For custom sources, it is not defined what kind of KeyFrameCount they allow and also not what kind of UADP DataSetMessage they produce.
See following spec issue as clarification request:
https://apps.opcfoundation.org…..hp?id=6409
12/13/2020
Just wondering if anyone encountered such error when writing to an external mqtt broker using DataSetWriter::
———————-
The above error happens as I progressively add more fields to publish to the MQTT server:
1 Guest(s)