Search code examples
publish-subscribeopc-ua

How to identify DataSet in NetworkMessage if DataSetWriterId is not set?


By opc-ua pubsub specifications, DataSetWriterId in DataSetMessage header is optional, and DataSetMessage ordering can be set to Undefined_0, which is when we can't guarantee an order of DataSetMessages in NetworkMessage. How to identify which DataSetMessage we received if there are multiple ones in the WriterGroup?


Solution

  • The OPC UA PubSub specification makes many things optional. Whoever configures the system is then responsible for making choices that make sense. What you have described is just one example of such case. The idea is that if you cannot identify what you need "on the wire", you should not do it. So if you wanted to leave out DataSetWriterId and there would be no other way of getting the same information, you then have to put just one enabled DataSetWriter into the WriterGroup.

    There are/will be profiles ("header layouts") in the UA spec that will combine the reasonable and most commonly used options together, with the expectation that most systems will stick to one of the profiles (while still allowing to do something else as long as it conforms with the text of the spec and makes sense).