mirror of
https://github.com/OPCFoundation/UA-.NETStandard.git
synced 2026-10-21 17:16:16 +08:00
f061c2d7da
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Klaus Landsdorf <kl@iniationware.com> Co-authored-by: Marc Schier <marcschier@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: marcschier <11168470+marcschier@users.noreply.github.com> Co-authored-by: romanett <7413710+romanett@users.noreply.github.com>
MachineryClient
A console client for any OPC 40001 server. It starts at the Machines folder,
so it needs no NodeIds configured and works against a server it has never seen.
dotnet run --project samples/Machinery/MachineryClient -- --insecure
| Option | Meaning |
|---|---|
--url <endpoint> |
The endpoint to connect to (default opc.tcp://localhost:62546/MachineryServer) |
--insecure |
Accept any server certificate. Demo only. |
--seconds <n> |
How long to stream state transitions (default 12; 0 skips) |
--no-download |
Skip the OPC 40001-101 result download |
What it does
- Enumerates the machines below the
Machinesfolder. - Reads each machine's OPC 40001-1 identification and its components.
- Reads
MachineryItemStateandMachineryOperationMode. - Asks
ResultManagement.GetLatestResultfor the newest result, downloads its payload through the OPC 40001-101 transfer path, and releases the result handle it was given. - Streams
MachineryItemStatetransitions for a while.
Every step degrades rather than failing when the server publishes less: a
machine without a Monitoring add-in simply reports no state.