Using OpcCmd Utility as OPC UA PubSub Sniffer: Difference between revisions

From OPC Labs Knowledge Base
No edit summary
No edit summary
Line 1: Line 1:
[[Category:Concepts]] [[Category:OPC UA PubSub]] [[Category:OPC UA PubSub Sniffing]] [[Category:OpcCmd Utility]] [[Category:Sniffing]]
[[Category:Concepts]] [[Category:OPC UA PubSub]] [[Category:OPC UA PubSub Sniffing]] [[Category:OpcCmd Utility]] [[Category:Sniffing]]
This article assumes that you have a basic knowledge of the [[OPC UA PubSub Sniffing concepts]]; please read the corresponding article first.
This article assumes that you have basic knowledge of the [[OPC UA PubSub Sniffing concepts]]; please read the corresponding article first.


(TBD)
(TBD)
Line 15: Line 15:
== Capturing message data ==
== Capturing message data ==
(TBD)
(TBD)
Binary data (UADP) are shown in hexadecimal format, textual data (JSON) are decoded first, and shown as strings.
= Typical usage scenarios =
= Typical usage scenarios =
== Show all communication ==
== Show all communication ==
Line 29: Line 30:
(TBD)
(TBD)
== Capture and show message data ==
== Capture and show message data ==
In order to view the original messages as they are being communicated on the specified PubSub connection, use the <code>--ShowCaptureData</code> option. In our example, we are not interested in future analysis of the received messages, and we therefore limit the capture to the TransportMessage type, by using the <code>--CaptureTypes</code> option. By removing this option, you can view the captured data together with their analysis as OPC UA PubSub messages.
(TBD)
(TBD)
  subscribeCapture opc.udp://239.0.0.1:4840 --CaptureTypes TransportMessage --ShowCaptureData
  subscribeCapture opc.udp://239.0.0.1:4840 --CaptureTypes TransportMessage --ShowCaptureData

Revision as of 17:44, 14 August 2022

This article assumes that you have basic knowledge of the OPC UA PubSub Sniffing concepts; please read the corresponding article first.

(TBD)

Accessing the OPC UA PubSub Sniffer

(TBD)

uaSubscriber getService uaPubSubSniffer

(TBD)

uaPubSubSniffer subscribeCapture command

(TBD)

Limiting the capture types

(TBD)

Selecting distinct headers

(TBD)

Capturing message data

(TBD) Binary data (UADP) are shown in hexadecimal format, textual data (JSON) are decoded first, and shown as strings.

Typical usage scenarios

Show all communication

(TBD)

subscribeCapture opc.udp://239.0.0.1:4840

(TBD)

subscribeCapture mqtt://opcua-pubsub.demo-this.com #

(TBD)

Discover who communicates what

(TBD)

subscribeCapture opc.udp://239.0.0.1:4840 --CaptureTypes AllPubSubMessages --DistinctHeadersOnly !wait Infinite

(TBD)

subscribeCapture mqtt://opcua-pubsub.demo-this.com # --CaptureTypes AllPubSubMessages --DistinctHeadersOnly !wait Infinite

(TBD)

Capture and show message data

In order to view the original messages as they are being communicated on the specified PubSub connection, use the --ShowCaptureData option. In our example, we are not interested in future analysis of the received messages, and we therefore limit the capture to the TransportMessage type, by using the --CaptureTypes option. By removing this option, you can view the captured data together with their analysis as OPC UA PubSub messages.

(TBD)

subscribeCapture opc.udp://239.0.0.1:4840 --CaptureTypes TransportMessage --ShowCaptureData

(TBD)

subscribeCapture mqtt://opcua-pubsub.demo-this.com # --CaptureTypes TransportMessage --ShowCaptureData

(TBD)

See also

OPC UA PubSub Sniffing concepts

Using OpcCmd Utility as OPC UA PubSub Subscriber