Skip to content

feat(seeder): serve the demo writer's values over OPC UA - #144

Merged
mrcsin merged 1 commit into
masterfrom
opc-demo-server
Oct 20, 2026
Merged

mrcsin merged 1 commit into
masterfrom
opc-demo-server

Conversation

@mrcsin

@mrcsin mrcsin commented Oct 20, 2026

Copy link
Copy Markdown
Member

Problem

The OPC UA live edge (#116) needs an OPC UA server shaped like Simple-Scada's, for the integration
tests and for the demo stand. A developer machine runs the real SCADA on 49875, so the stand cannot
use that port.

What changed

  • DemoScadaServer and DemoScadaNodeManager in SemiPlot.Tools.ArchiveSeeder, on the
    OPCFoundation.NetStandard.Opc.Ua.Server 2.0.1 stack. The address space follows the measured
    Simple-Scada shape:
    • namespace http://simple-scada.com/UA at index 3;
    • folder 5E4D0C1A0Broot_2, then group folders from _3;
    • node ns=3;s=5E4D0C1A0B<id>;
    • None + Anonymous with the stock token policy.
  • The --follow run hosts the server. Each served value is the lattice change the archive writer
    produces (LiveTailGenerator.ChangesAt, pinned by SharedLatticeTests), stamped in true UTC. The
    first notification after a start carries the start instant.
  • --opc-port is required for a follow run. --archive-lag (0 to 86400 s) holds the archive inserts
    back. FollowEdge keeps the write edge monotonic, and a graceful stop writes the held-back span.
  • SemiPlot.AppHost passes --opc-port 55875.
  • Packages: OPC Client and Server pinned at 2.0.1, the central Microsoft.Extensions.* pins raised to
    10.0.12, Logging.Console added.
  • Tests: DemoScadaCollection in SemiPlot.Tests.Integration runs the server in process on a free
    port that is never 4840 or 49875, under Asia/Tokyo. FollowEdgeTests and the seeder command tests
    are unit tests.
  • Docs: bench.md, testing-strategy.md, docs/architecture/README.md, AGENTS.md.

Measured differences from the real server, recorded in bench.md:

  • The stock stack puts #None on the anonymous token only at the None endpoint; Simple-Scada puts
    it on all seven endpoints.
  • The stack logs the per-session host-name line at Error.

How it was verified

  • dotnet build SemiPlot.slnx: 0 errors, only the AppHost's two NU1902.
  • dotnet format --verify-no-changes: exit 0. dotnet terse over the 24 touched .cs files: exit 0.
  • SemiPlot.Tests.Unit: 2326/2326. SemiPlot.Tests.Integration: 216/216. The DemoScada filter
    passed 16/16 on every rerun.
  • git grep -n "Opc.Ua" over UI, Core and SemiPlot.DataSource.Postgres prints nothing.
  • The seeder refuses a follow run without --opc-port, --opc-port 0, and a seeding run with
    --archive-lag.
  • Not run: the plan's manual stand checks (the AppHost on 55875, a browse with an external client,
    --archive-lag 60). The automated suites stand in for them in this unattended roadmap run.
Per-task commits before collapse
5901786 docs(plan): record the exec run and its checks
7b67cbd fix(seeder): address comment audit findings
f18647f fix(seeder): address review findings
83442f0 fix(seeder): address review findings
6c84be6 docs(bench): describe the OPC UA demo server
78ea497 docs(plan): verify the OPC demo server acceptance
656600c feat(apphost): serve the stand's OPC UA on 55875
b648e02 feat(seeder): host the OPC server in the follow run
7ab9cd2 feat(seeder): serve the pens and publish each change
2f9a5fb feat(seeder): start and stop the OPC UA demo server
6106b7f feat(seeder): serve the change at a lattice instant
a6b0990 feat(seeder): add the follow-only lag and OPC port
3517699 build(deps): pin the OPC UA 2.0.1 package line

The OPC UA live edge needs a server shaped like Simple-Scada's for the
integration tests and the demo stand, and a real SCADA on a developer
machine already holds 49875.

The seeder's --follow run now hosts DemoScadaServer on the 2.0.1
OPC Foundation stack. It serves every pen under namespace
http://simple-scada.com/UA, folder 5E4D0C1A0Broot_2 and group folders
from _3, node ns=3;s=5E4D0C1A0B<id>, None + Anonymous with the stock
token policy. Each value is the lattice change the archive writer
produces, stamped in true UTC; the first notification after a start
carries the start instant. --opc-port is required for a follow run,
and --archive-lag holds the archive inserts back by up to 86400 s so
the stand shows a span the archive has not reached. The AppHost passes
--opc-port 55875.

The central Microsoft.Extensions.* pins move to 10.0.12, which the
stack requires. The server keeps its certificate under
%TEMP%\SemiPlot\OpcDemoServer.
@mrcsin
mrcsin marked this pull request as ready for review October 20, 2026 17:13
@mrcsin
mrcsin merged commit a92c12f into master Oct 20, 2026
2 checks passed
@mrcsin
mrcsin deleted the opc-demo-server branch October 20, 2026 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant