Greenfield C# app reading industrial machine data over pluggable protocols. M1 walking skeleton: MTConnect plugin polls a machine, Avalonia dashboard shows live last datum. Build 0 warn/0 err on net48 + net8.0 (Linux), 115 unit tests + 2 docker-gated integration tests. Projects: - Junction.Domain (netstandard2.0): Result<T>, models, IProtocolDriver, IMachineRepository, plugin manifest. Zero package deps. - Junction.Core (netstandard2.0): PollingEngine, PluginLoader (Assembly.LoadFrom), MachineMonitor, DI extensions. - Junction.Persistence (netstandard2.0): SqliteMachineRepository (Dapper), schema, connection factory. Provider-swap seam to SQL Server. - Junction.Protocols.MTConnect (netstandard2.0): HTTP driver + namespace- version-agnostic parser (MTConnect 1.7 + 2.0). Runtime plugin. - Junction.App (net48;net8.0): Avalonia MVVM, live dashboard, NLog, DI root. - Junction.Tests (net8.0): xUnit + Moq, 117 tests. - mock/: docker-compose MTConnect agent (ladder99/agent). Target net48 for Windows 7/8 fleet compatibility. Avalonia pinned 11.3.x. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
33 lines
1.3 KiB
Markdown
33 lines
1.3 KiB
Markdown
# MTConnect Mock Agent
|
|
|
|
DEV MOCK only. Not prod. Local MTConnect agent + built-in VMC-3Axis simulator producing LIVE CHANGING data. For testing the MTConnect protocol driver.
|
|
|
|
Image: `ladder99/agent:latest` (C++ cppagent + simulator adapter on :7878).
|
|
|
|
## Commands
|
|
|
|
```bash
|
|
docker compose up -d # start agent (detached)
|
|
docker compose down # stop + remove
|
|
docker compose logs -f agent # follow logs
|
|
```
|
|
|
|
Agent serves on http://localhost:5000
|
|
|
|
## Verify
|
|
|
|
```bash
|
|
curl http://localhost:5000/probe # device model (MTConnectDevices XML)
|
|
curl http://localhost:5000/current # latest value per data item (MTConnectStreams XML)
|
|
curl http://localhost:5000/sample # historical observations from buffer (MTConnectStreams XML)
|
|
```
|
|
|
|
## Endpoints
|
|
|
|
- `/probe` — static device model. Devices, Components, DataItems. Device `VMC-3Axis`.
|
|
- `/current` — snapshot: newest value + timestamp per DataItem. Poll repeatedly -> values change (Xact/Yact positions, SpindleSpeed, Execution, Line, Block).
|
|
- `/sample` — stream of observations from ring buffer. Params: `?from=<seq>&count=<n>&path=<xpath>`.
|
|
|
|
## Proof live
|
|
|
|
Two `/current` calls ~3s apart: `Position Xact` 0.8996 -> -0.2139, `Yact` -1.1855 -> -1.4569, `Line` 263 -> 271. Simulator runs an NC program on loop.
|