merge wt/t0-3 into v3/batch2-raw-ui (Track 0)
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
namespace ZB.MOM.WW.OtOpcUa.Core.Abstractions;
|
||||
|
||||
/// <summary>
|
||||
/// Single source of truth for the driver-type identifier strings the runtime
|
||||
/// dispatches on. Each constant's <b>value</b> is the exact <c>DriverTypeName</c>
|
||||
/// that the corresponding driver factory registers under in the process
|
||||
/// <c>DriverFactoryRegistry</c> — the string the deploy pipeline stores in
|
||||
/// <c>DriverInstance.DriverType</c> and every dispatch map keys by.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Historically several dispatch maps hand-authored these strings and drifted from
|
||||
/// the authoritative factory names (e.g. <c>"TwinCat"</c> vs the real
|
||||
/// <c>"TwinCAT"</c>, <c>"Focas"</c> vs <c>"FOCAS"</c>). Consumers should reference
|
||||
/// these constants instead of literals so the drift can never recur.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// The reflection guard test
|
||||
/// (<c>DriverTypeNamesGuardTests</c>) asserts bidirectional parity between these
|
||||
/// constants and the set the driver factories actually register, so a rename on
|
||||
/// either side breaks the build's test gate. Only constants for
|
||||
/// <b>currently-registered</b> factories belong here — a not-yet-registered driver
|
||||
/// (e.g. the Calculation driver landing in a later Batch 2 package) adds its own
|
||||
/// constant when its factory is wired in.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public static class DriverTypeNames
|
||||
{
|
||||
/// <summary>Modbus TCP / RTU-over-TCP driver.</summary>
|
||||
public const string Modbus = "Modbus";
|
||||
|
||||
/// <summary>Siemens S7 driver.</summary>
|
||||
public const string S7 = "S7";
|
||||
|
||||
/// <summary>Allen-Bradley CIP (ControlLogix / CompactLogix) driver.</summary>
|
||||
public const string AbCip = "AbCip";
|
||||
|
||||
/// <summary>Allen-Bradley legacy (PCCC / DF1-over-TCP) driver.</summary>
|
||||
public const string AbLegacy = "AbLegacy";
|
||||
|
||||
/// <summary>Beckhoff TwinCAT ADS driver.</summary>
|
||||
public const string TwinCAT = "TwinCAT";
|
||||
|
||||
/// <summary>FANUC FOCAS CNC driver.</summary>
|
||||
public const string FOCAS = "FOCAS";
|
||||
|
||||
/// <summary>OPC UA client (upstream-server) driver.</summary>
|
||||
public const string OpcUaClient = "OpcUaClient";
|
||||
|
||||
/// <summary>AVEVA System Platform (Wonderware) Galaxy driver, via the mxaccessgw gateway.</summary>
|
||||
public const string Galaxy = "GalaxyMxGateway";
|
||||
|
||||
/// <summary>
|
||||
/// Every driver-type string declared above, for callers that need to enumerate
|
||||
/// the full set (e.g. validation of an authored <c>DriverType</c>).
|
||||
/// </summary>
|
||||
public static IReadOnlyCollection<string> All { get; } =
|
||||
[
|
||||
Modbus,
|
||||
S7,
|
||||
AbCip,
|
||||
AbLegacy,
|
||||
TwinCAT,
|
||||
FOCAS,
|
||||
OpcUaClient,
|
||||
Galaxy,
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user