Group all 69 projects into category subfolders under src/ and tests/ so the Rider Solution Explorer mirrors the module structure. Folders: Core, Server, Drivers (with a nested Driver CLIs subfolder), Client, Tooling. - Move every project folder on disk with git mv (history preserved as renames). - Recompute relative paths in 57 .csproj files: cross-category ProjectReferences, the lib/ HintPath+None refs in Driver.Historian.Wonderware, and the external mxaccessgw refs in Driver.Galaxy and its test project. - Rebuild ZB.MOM.WW.OtOpcUa.slnx with nested solution folders. - Re-prefix project paths in functional scripts (e2e, compliance, smoke SQL, integration, install). Build green (0 errors); unit tests pass. Docs left for a separate pass. 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),
|
|
],
|
|
};
|
|
}
|