Skip to content

Add OPC UA demo drift mode and controls#202

Merged
smithaldon1 merged 1 commit into
mainfrom
feature/issue-190-drift-control
May 23, 2026
Merged

Add OPC UA demo drift mode and controls#202
smithaldon1 merged 1 commit into
mainfrom
feature/issue-190-drift-control

Conversation

@smithaldon1
Copy link
Copy Markdown
Member

Summary

Closes #190.

  • Adds deterministic gradual drift mode to the local OPC UA demo simulator.
  • Adds explicit demo-only StartDrift and ResetDemo OPC UA methods on the State object.
  • Keeps the server in normal mode at startup; drift starts only when StartDrift is called.
  • Makes repeated StartDrift calls safe by returning already_active without resetting the drift clock.
  • Updates fill-weight, nozzle-pressure, and final-fill-weight values once per second after drift starts, compressed for an 8-10 minute demo.
  • Documents trigger behavior, expected timing, reset behavior, and the demo-only/no-arbitrary-write boundary.

Test Evidence

  • .venv/bin/python -m pytest services/simulator/tests/test_opcua_demo_server.py services/simulator/tests/test_opc_ua_demo_namespace_docs.py - 9 passed
  • make test - 204 passed
  • make lint - All checks passed
  • make typecheck - compileall completed successfully
  • make docs - Markdown-only docs target completed
  • docker compose -f infra/docker/docker-compose.yml config - passed
  • git diff --check - passed
  • git diff --cached --check - passed

Docker runtime note:

  • docker compose -f infra/docker/docker-compose.yml up --build -d opcua-simulator could not be completed in this environment because the Docker daemon/socket is unavailable: failed to connect to the docker API at unix:///Users/aldonsmith/.docker/run/docker.sock.
  • docker version shows the Docker client is installed, but daemon connection fails with the same socket error.
  • The local asyncua server/client test verifies normal-mode values, StartDrift, repeated start behavior, drift value changes, state tag changes, and reset behavior outside Docker.

Docs Impact

  • Updated services/simulator/README.md with StartDrift, ResetDemo, compressed drift timing, idempotent start behavior, and reset behavior.
  • Updated docs/demo/OPC_UA_DEMO_NAMESPACE.md with demo control methods and demo-only control boundaries.
  • Updated docs/LEARNING_LOG.md with the learning summary.

Follow-up Work

  • Run the Dockerized service on a machine with Docker Desktop/daemon running to verify container startup logs end-to-end.
  • Wire a future UI or smoke-test control path to call these explicit demo methods in a separate issue.

Copy link
Copy Markdown
Member Author

@smithaldon1 smithaldon1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed and approved for merge

@smithaldon1 smithaldon1 merged commit 05c1d7a into main May 23, 2026
3 checks passed
@smithaldon1 smithaldon1 deleted the feature/issue-190-drift-control branch May 23, 2026 01:05
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.

Demo: Add simulator drift mode and Start Drift control

1 participant