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>
45 lines
1.9 KiB
C#
45 lines
1.9 KiB
C#
namespace ZB.MOM.WW.OtOpcUa.Driver.Modbus.IntegrationTests.S7;
|
|
|
|
/// <summary>
|
|
/// Tag map for the Siemens SIMATIC S7-1500 device class with the <c>MB_SERVER</c> library
|
|
/// block mapping HR[0..] to DB1.DBW0+. Mirrors <c>s7_1500.json</c> in <c>Docker/profiles/</c>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Unlike DL205, S7 has no fixed Modbus memory map — every site wires MB_SERVER to a
|
|
/// different DB. The profile here models the *default* user layout documented in
|
|
/// <c>docs/v2/s7.md</c> §per-model-matrix: DB1.DBW0 = fingerprint marker, a scratch HR
|
|
/// range 200..209 for write-roundtrip tests, and ABCD-order Float32 / Int32 markers at
|
|
/// HR[100..101] and HR[300..301] to prove the driver's S7 profile default is correct.
|
|
/// </remarks>
|
|
public static class S7_1500Profile
|
|
{
|
|
/// <summary>
|
|
/// Scratch HR the smoke test writes + reads. Address 200 mirrors the DL205 /
|
|
/// standard scratch range so one smoke test pattern works across all device profiles.
|
|
/// </summary>
|
|
public const ushort SmokeHoldingRegister = 200;
|
|
|
|
/// <summary>Value the smoke test writes then reads back.</summary>
|
|
public const short SmokeHoldingValue = 4321;
|
|
|
|
public static ModbusDriverOptions BuildOptions(string host, int port) => new()
|
|
{
|
|
Host = host,
|
|
Port = port,
|
|
UnitId = 1,
|
|
Timeout = TimeSpan.FromSeconds(2),
|
|
Tags =
|
|
[
|
|
new ModbusTagDefinition(
|
|
Name: "Smoke_HReg200",
|
|
Region: ModbusRegion.HoldingRegisters,
|
|
Address: SmokeHoldingRegister,
|
|
DataType: ModbusDataType.Int16,
|
|
Writable: true),
|
|
],
|
|
// Disable the background probe loop — integration tests drive reads explicitly and
|
|
// the probe would race with assertions.
|
|
Probe = new ModbusProbeOptions { Enabled = false },
|
|
};
|
|
}
|