Files touched — docs/drivers/Modbus-Test-Fixture.md dropped the key-files pointer at deleted Pymodbus/ + flipped "primary launcher is Docker, native fallback retained" framing to "Docker is the only supported launch path" (matching the code). docs/v2/dev-environment.md dropped the "skips both Docker + native-binary paths" parenthetical from AB_SERVER_ENDPOINT + flipped the "Native fallbacks" subsection to a one-liner that says Docker is the only supported path. docs/v2/modbus-test-plan.md rewrote §Harness from "pip install pymodbus + serve.ps1" setup pattern to "docker compose --profile <…> up" + updated the §PR 43 status bullet to point at Docker/profiles/. docs/v2/test-data-sources.md §"CI fixture (task #180)" rewrote the AB CIP section from "LocateBinary() picks binary off PATH" + GitHub Actions zip-download step to "Docker is the only supported reproducible build path" + docker compose GitHub Actions step; dropped the pinned-version SHA256 table + lock-file reference because the Dockerfile's LIBPLCTAG_TAG build-arg is the new pin. Code docstrings + error messages — these are developer-facing operational text too. ModbusSimulatorFixture SkipReason strings (both branches) now point at `docker compose -f Docker/docker-compose.yml --profile standard up -d` instead of the deleted `Pymodbus\serve.ps1`; doc-comment at the top references Docker/docker-compose.yml. Snap7ServerFixture SkipReason strings + doc-comment point at Docker/docker-compose.yml instead of PythonSnap7/serve.ps1. S7_1500Profile.cs docstring updated. Modbus Dockerfile comment pointing at deleted tests/.../Pymodbus/README.md redirected to docs/drivers/Modbus-Test-Fixture.md. DL205Profile.cs + DL205StringQuirkTests.cs + S7_1500Profile.cs (in Modbus project) docstrings flipped from Pymodbus/*.json references to Docker/profiles/*.json. Left untouched deliberately: docs/v2/implementation/exit-gate-phase-2-closed.md — that's a historical as-of-2026-04-18 snapshot documenting what was skipped at Phase 2 closure; rewriting would lose the date-stamped context. Its "oitc/modbus-server Docker container not started" + "ab_server binary not on PATH" lines describe the fixture landscape that existed at close time, not current operational guidance. Final sweep confirms zero remaining `Pymodbus/` / `PythonSnap7/` / `LocateBinary` / `AbServerSeedTag` / `BuildCliArgs` / `AbServerPlcArg` mentions anywhere in tracked files outside that historical exit-gate doc. Whole-solution build still 0 errors. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
54 lines
2.1 KiB
C#
54 lines
2.1 KiB
C#
using S7NetCpuType = global::S7.Net.CpuType;
|
|
|
|
namespace ZB.MOM.WW.OtOpcUa.Driver.S7.IntegrationTests.S7_1500;
|
|
|
|
/// <summary>
|
|
/// Driver-side configuration matching what <c>Docker/profiles/s7_1500.json</c> seeds
|
|
/// into the simulator's DB1 + MB areas. Tag names here become the full references
|
|
/// the smoke tests read/write against; addresses map 1:1 to the JSON profile's
|
|
/// seed offsets so a seed drift in the JSON surfaces as a driver-side read
|
|
/// mismatch, not a mystery test failure.
|
|
/// </summary>
|
|
public static class S7_1500Profile
|
|
{
|
|
public const string ProbeTag = "ProbeProbeWord";
|
|
public const int ProbeSeedValue = 4242;
|
|
|
|
public const string SmokeI16Tag = "SmokeI16";
|
|
public const short SmokeI16SeedValue = -12345;
|
|
|
|
public const string SmokeI32Tag = "SmokeI32";
|
|
public const int SmokeI32SeedValue = 1234567890;
|
|
|
|
public const string SmokeF32Tag = "SmokeF32";
|
|
public const float SmokeF32SeedValue = 3.14159f;
|
|
|
|
public const string SmokeBoolTag = "SmokeBool";
|
|
|
|
public const string WriteScratchTag = "WriteScratch";
|
|
|
|
public static S7DriverOptions BuildOptions(string host, int port) => new()
|
|
{
|
|
Host = host,
|
|
Port = port,
|
|
CpuType = S7NetCpuType.S71500,
|
|
Rack = 0,
|
|
Slot = 0,
|
|
Timeout = TimeSpan.FromSeconds(5),
|
|
// Disable the probe loop — the integration tests run their own reads +
|
|
// a background probe would race with them for the S7netplus mailbox
|
|
// gate, injecting flakiness that has nothing to do with the code
|
|
// under test.
|
|
Probe = new S7ProbeOptions { Enabled = false },
|
|
Tags =
|
|
[
|
|
new S7TagDefinition(ProbeTag, "DB1.DBW0", S7DataType.UInt16),
|
|
new S7TagDefinition(SmokeI16Tag, "DB1.DBW10", S7DataType.Int16),
|
|
new S7TagDefinition(SmokeI32Tag, "DB1.DBD20", S7DataType.Int32),
|
|
new S7TagDefinition(SmokeF32Tag, "DB1.DBD30", S7DataType.Float32),
|
|
new S7TagDefinition(SmokeBoolTag, "DB1.DBX50.3", S7DataType.Bool),
|
|
new S7TagDefinition(WriteScratchTag, "DB1.DBW100", S7DataType.UInt16),
|
|
],
|
|
};
|
|
}
|