feat(drivers): expose ProbeTimeoutSeconds on every driver Options class
Adds a uniform [Range(1, 60)] ProbeTimeoutSeconds property to all 9 driver Options classes (Modbus 5s, AbCip 5s, AbLegacy 5s, S7 5s, TwinCAT 10s, FOCAS 10s, OpcUaClient 15s, Galaxy 30s, Historian 15s). Powers the AdminUI Test Connect button (Phase 7 of the plan).
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace ZB.MOM.WW.OtOpcUa.Driver.AbCip;
|
namespace ZB.MOM.WW.OtOpcUa.Driver.AbCip;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -74,6 +76,14 @@ public sealed class AbCipDriverOptions
|
|||||||
/// reads into one. The richer CIP Template Object path remains the long-term fix.
|
/// reads into one. The richer CIP Template Object path remains the long-term fix.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool EnableDeclarationOnlyUdtGrouping { get; init; }
|
public bool EnableDeclarationOnlyUdtGrouping { get; init; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Timeout for the AdminUI Test Connect probe, in seconds. The AdminUI clamps to a
|
||||||
|
/// 60s server-side maximum; this default is what the form pre-fills for new instances.
|
||||||
|
/// </summary>
|
||||||
|
[Display(Name = "Probe timeout (seconds)", Description = "Connection test timeout. Default 5s.", GroupName = "Diagnostics")]
|
||||||
|
[Range(1, 60)]
|
||||||
|
public int ProbeTimeoutSeconds { get; init; } = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
using ZB.MOM.WW.OtOpcUa.Driver.AbLegacy.PlcFamilies;
|
using ZB.MOM.WW.OtOpcUa.Driver.AbLegacy.PlcFamilies;
|
||||||
|
|
||||||
namespace ZB.MOM.WW.OtOpcUa.Driver.AbLegacy;
|
namespace ZB.MOM.WW.OtOpcUa.Driver.AbLegacy;
|
||||||
@@ -21,6 +22,14 @@ public sealed class AbLegacyDriverOptions
|
|||||||
|
|
||||||
/// <summary>Gets or sets the default timeout for read/write operations.</summary>
|
/// <summary>Gets or sets the default timeout for read/write operations.</summary>
|
||||||
public TimeSpan Timeout { get; init; } = TimeSpan.FromSeconds(2);
|
public TimeSpan Timeout { get; init; } = TimeSpan.FromSeconds(2);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Timeout for the AdminUI Test Connect probe, in seconds. The AdminUI clamps to a
|
||||||
|
/// 60s server-side maximum; this default is what the form pre-fills for new instances.
|
||||||
|
/// </summary>
|
||||||
|
[Display(Name = "Probe timeout (seconds)", Description = "Connection test timeout. Default 5s.", GroupName = "Diagnostics")]
|
||||||
|
[Range(1, 60)]
|
||||||
|
public int ProbeTimeoutSeconds { get; init; } = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
public sealed record AbLegacyDeviceOptions(
|
public sealed record AbLegacyDeviceOptions(
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace ZB.MOM.WW.OtOpcUa.Driver.FOCAS;
|
namespace ZB.MOM.WW.OtOpcUa.Driver.FOCAS;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -21,6 +23,14 @@ public sealed class FocasDriverOptions
|
|||||||
public FocasHandleRecycleOptions HandleRecycle { get; init; } = new();
|
public FocasHandleRecycleOptions HandleRecycle { get; init; } = new();
|
||||||
/// <summary>Gets the fixed tree options.</summary>
|
/// <summary>Gets the fixed tree options.</summary>
|
||||||
public FocasFixedTreeOptions FixedTree { get; init; } = new();
|
public FocasFixedTreeOptions FixedTree { get; init; } = new();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Timeout for the AdminUI Test Connect probe, in seconds. The AdminUI clamps to a
|
||||||
|
/// 60s server-side maximum; this default is what the form pre-fills for new instances.
|
||||||
|
/// </summary>
|
||||||
|
[Display(Name = "Probe timeout (seconds)", Description = "Connection test timeout. Default 10s.", GroupName = "Diagnostics")]
|
||||||
|
[Range(1, 60)]
|
||||||
|
public int ProbeTimeoutSeconds { get; init; } = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Config;
|
namespace ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Config;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -15,7 +17,16 @@ public sealed record GalaxyDriverOptions(
|
|||||||
GalaxyGatewayOptions Gateway,
|
GalaxyGatewayOptions Gateway,
|
||||||
GalaxyMxAccessOptions MxAccess,
|
GalaxyMxAccessOptions MxAccess,
|
||||||
GalaxyRepositoryOptions Repository,
|
GalaxyRepositoryOptions Repository,
|
||||||
GalaxyReconnectOptions Reconnect);
|
GalaxyReconnectOptions Reconnect)
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Timeout for the AdminUI Test Connect probe, in seconds. The AdminUI clamps to a
|
||||||
|
/// 60s server-side maximum; this default is what the form pre-fills for new instances.
|
||||||
|
/// </summary>
|
||||||
|
[Display(Name = "Probe timeout (seconds)", Description = "Connection test timeout. Default 30s.", GroupName = "Diagnostics")]
|
||||||
|
[Range(1, 60)]
|
||||||
|
public int ProbeTimeoutSeconds { get; init; } = 30;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Connection details for the MxAccess gateway. <see cref="ApiKeySecretRef"/> is
|
/// Connection details for the MxAccess gateway. <see cref="ApiKeySecretRef"/> is
|
||||||
|
|||||||
+10
@@ -1,3 +1,5 @@
|
|||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace ZB.MOM.WW.OtOpcUa.Driver.Historian.Wonderware.Client;
|
namespace ZB.MOM.WW.OtOpcUa.Driver.Historian.Wonderware.Client;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -30,4 +32,12 @@ public sealed record WonderwareHistorianClientOptions(
|
|||||||
|
|
||||||
/// <summary>Gets the effective call timeout, using the default if not explicitly set.</summary>
|
/// <summary>Gets the effective call timeout, using the default if not explicitly set.</summary>
|
||||||
public TimeSpan EffectiveCallTimeout => CallTimeout ?? TimeSpan.FromSeconds(30);
|
public TimeSpan EffectiveCallTimeout => CallTimeout ?? TimeSpan.FromSeconds(30);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Timeout for the AdminUI Test Connect probe, in seconds. The AdminUI clamps to a
|
||||||
|
/// 60s server-side maximum; this default is what the form pre-fills for new instances.
|
||||||
|
/// </summary>
|
||||||
|
[Display(Name = "Probe timeout (seconds)", Description = "Connection test timeout. Default 15s.", GroupName = "Diagnostics")]
|
||||||
|
[Range(1, 60)]
|
||||||
|
public int ProbeTimeoutSeconds { get; init; } = 15;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace ZB.MOM.WW.OtOpcUa.Driver.Modbus;
|
namespace ZB.MOM.WW.OtOpcUa.Driver.Modbus;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -174,6 +176,14 @@ public sealed class ModbusDriverOptions
|
|||||||
/// attempt; <see cref="ModbusReconnectOptions.MaxDelay"/> caps the geometric growth.
|
/// attempt; <see cref="ModbusReconnectOptions.MaxDelay"/> caps the geometric growth.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ModbusReconnectOptions Reconnect { get; init; } = new();
|
public ModbusReconnectOptions Reconnect { get; init; } = new();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Timeout for the AdminUI Test Connect probe, in seconds. The AdminUI clamps to a
|
||||||
|
/// 60s server-side maximum; this default is what the form pre-fills for new instances.
|
||||||
|
/// </summary>
|
||||||
|
[Display(Name = "Probe timeout (seconds)", Description = "Connection test timeout. Default 5s.", GroupName = "Diagnostics")]
|
||||||
|
[Range(1, 60)]
|
||||||
|
public int ProbeTimeoutSeconds { get; init; } = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>OS-level TCP keep-alive knobs. Set <see cref="Enabled"/>=false to skip entirely.</summary>
|
/// <summary>OS-level TCP keep-alive knobs. Set <see cref="Enabled"/>=false to skip entirely.</summary>
|
||||||
|
|||||||
+10
@@ -1,3 +1,5 @@
|
|||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient;
|
namespace ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -164,6 +166,14 @@ public sealed class OpcUaClientDriverOptions
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public IReadOnlyDictionary<string, string> UnsMappingTable { get; init; }
|
public IReadOnlyDictionary<string, string> UnsMappingTable { get; init; }
|
||||||
= new Dictionary<string, string>();
|
= new Dictionary<string, string>();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Timeout for the AdminUI Test Connect probe, in seconds. The AdminUI clamps to a
|
||||||
|
/// 60s server-side maximum; this default is what the form pre-fills for new instances.
|
||||||
|
/// </summary>
|
||||||
|
[Display(Name = "Probe timeout (seconds)", Description = "Connection test timeout. Default 15s.", GroupName = "Diagnostics")]
|
||||||
|
[Range(1, 60)]
|
||||||
|
public int ProbeTimeoutSeconds { get; init; } = 15;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace ZB.MOM.WW.OtOpcUa.Driver.S7;
|
namespace ZB.MOM.WW.OtOpcUa.Driver.S7;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -61,6 +63,14 @@ public sealed class S7DriverOptions
|
|||||||
/// Running ↔ Stopped transitions.
|
/// Running ↔ Stopped transitions.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public S7ProbeOptions Probe { get; init; } = new();
|
public S7ProbeOptions Probe { get; init; } = new();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Timeout for the AdminUI Test Connect probe, in seconds. The AdminUI clamps to a
|
||||||
|
/// 60s server-side maximum; this default is what the form pre-fills for new instances.
|
||||||
|
/// </summary>
|
||||||
|
[Display(Name = "Probe timeout (seconds)", Description = "Connection test timeout. Default 5s.", GroupName = "Diagnostics")]
|
||||||
|
[Range(1, 60)]
|
||||||
|
public int ProbeTimeoutSeconds { get; init; } = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
public sealed class S7ProbeOptions
|
public sealed class S7ProbeOptions
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace ZB.MOM.WW.OtOpcUa.Driver.TwinCAT;
|
namespace ZB.MOM.WW.OtOpcUa.Driver.TwinCAT;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -46,6 +48,14 @@ public sealed class TwinCATDriverOptions
|
|||||||
/// section 6 — was previously hard-coded to 0 (Driver.TwinCAT-014).
|
/// section 6 — was previously hard-coded to 0 (Driver.TwinCAT-014).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int NotificationMaxDelayMs { get; init; }
|
public int NotificationMaxDelayMs { get; init; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Timeout for the AdminUI Test Connect probe, in seconds. The AdminUI clamps to a
|
||||||
|
/// 60s server-side maximum; this default is what the form pre-fills for new instances.
|
||||||
|
/// </summary>
|
||||||
|
[Display(Name = "Probe timeout (seconds)", Description = "Connection test timeout. Default 10s.", GroupName = "Diagnostics")]
|
||||||
|
[Range(1, 60)]
|
||||||
|
public int ProbeTimeoutSeconds { get; init; } = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user