question

VivekSagarPandey-9638 avatar image
1 Vote"
VivekSagarPandey-9638 asked JehonaMorina-1507 answered

Does OPCPublisher 2.8 supports status and statuscode for each and every message?

Hi There,

I was using OPC Publisher 2.5 with telemetry configuration file to format the payloads. I am planning to update the version to the latest one, that is 2.8. While doing a POC I noticed that OPCPublisher is not sending status code every time. It only sends the error as status when there is error. We also need status(code) as 'good' if there is no issues in opc-ua server, is it possible?

Here are the messages I am getting:

  1. When there is no error:

{"NodeId":"nsu=xxxx;s="xxxxx">","ApplicationUri":"urn:xxxxx","DisplayName":"Line1-Tag1","Value":{"Value":-7,"SourceTimestamp":"2021-09-29T12:53:59.501023Z"}

  1. When there is error with the node:

{"NodeId":"nsu=xxxx;s=xxxxx","ApplicationUri":"urn:xxxxx","DisplayName":"Line1-Tag1","Value":{"StatusCode":{"Symbol":"BadConfigurationError","Code":2156462080},"SourceTimestamp":"2021-09-29T12:54:00.7040711Z"}





azure-iot-hubazure-iot-edge
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

JehonaMorina-1507 avatar image
2 Votes"
JehonaMorina-1507 answered

Hi!
The StatusCode is only sent when there is an error and omitted when it's good. This is conform to the OPC UA PubSub spec. It decreases the size and therefore reduces the payload.
Could you please explain why you need the StatusCode to be sent when it's "good"?

Thanks,
Jehona

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.