# MTConnect C++ Agent configuration for the OtOpcUa integration-test fixture. # # ASCII ONLY. The Agent's config parser rejects the whole file on a non-ASCII byte -- # even inside a comment -- with a bare "Failed / Stopped at line: N" and exits. An em # dash in a comment is enough to make the fixture never start. # # The image's CMD is `/usr/bin/mtcagent run /mtconnect/config/agent.cfg`, so this file is # bind-mounted at exactly that path (see docker-compose.yml). Paths below are ABSOLUTE on # purpose: a relative `Devices` is resolved against the Agent's working directory # (/home/agent), not against this file, and would silently start an Agent with no device # model. Devices = /mtconnect/config/Devices.xml Port = 5000 ServiceName = OtOpcUaMTConnectFixture # 2^14 = 16384 observations retained. Generous on purpose: the driver's /sample pump # re-baselines through /current when its cursor falls out of the Agent's ring buffer, and # a small buffer would make the fixture exercise that recovery path on every run instead # of the steady-state streaming the suite is here to prove. BufferSize = 14 CheckpointFrequency = 1000 MaxAssets = 128 # Writes ARE in scope for this fixture, because the driver now implements IWritable (see # docs/plans/2026-08-05-mtconnect-writeback-design.md). The mechanism is this very key: with # AllowPut on, POST {agent}/{device}?{dataItemId}={value} sets what the Agent REPORTS for that # observation. It is injection into the Agent's buffer -- visible to every consumer of the # Agent, overwritten by the next SHDR update for the same DataItem -- and never a command to a # machine. The integration suite's write legs (round-trip, agent refusal, disabled gate) need # it on; with the driver's own write.enabled off, the shipped read-only behaviour is unchanged. # # No AllowPutFrom is set, so any host that can reach the port may write. Acceptable for a # throwaway test Agent on the fixture network; NOT acceptable for a plant Agent, where the # allow-list is the second half of the gate. AllowPut = true SchemaVersion = 2.0 MonitorConfigFiles = false Pretty = true # The block name must equal the Device name attribute in Devices.xml (OtFixtureCnc) -- # that is how the Agent binds an adapter connection to a device. "adapter" is the compose # service name of the SHDR feeder; the Agent dials OUT to it. Adapters { OtFixtureCnc { Host = adapter Port = 7878 ReconnectInterval = 2000 } } # Log to stdout rather than a file: /mtconnect/log is an image-declared VOLUME that is # created root-owned while the Agent runs as uid 1000, so file logging fails to open. # stdout also puts adapter-connect / device-model errors straight into `docker logs`, # which is how you diagnose a fixture that comes up but reports everything UNAVAILABLE. logger_config { logging_level = info output = cout }