Associate Galaxy Heidenhain and Modbus driver fields

This commit is contained in:
Joseph Doherty
2026-11-13 20:23:31 -05:00
parent 9be717c0d7
commit c70bc44cd9
9 changed files with 707 additions and 173 deletions
@@ -0,0 +1,143 @@
[
{
"tag": "InputText",
"key": "field-01",
"labelsAdded": [
"Gateway endpoint"
]
},
{
"tag": "InputText",
"key": "field-02",
"labelsAdded": [
"API key secret ref"
]
},
{
"tag": "InputCheckbox",
"key": "gwTls",
"labelsAdded": []
},
{
"tag": "InputText",
"key": "field-04",
"labelsAdded": [
"CA certificate path (optional)"
]
},
{
"tag": "InputNumber",
"key": "field-05",
"labelsAdded": [
"Connect timeout (s)"
]
},
{
"tag": "InputNumber",
"key": "field-06",
"labelsAdded": [
"Call timeout (s)"
]
},
{
"tag": "InputNumber",
"key": "field-07",
"labelsAdded": [
"Stream timeout (s, 0 = unlimited)"
]
},
{
"tag": "InputText",
"key": "field-08",
"labelsAdded": [
"Client name"
]
},
{
"tag": "InputNumber",
"key": "field-09",
"labelsAdded": [
"Publishing interval (ms)"
]
},
{
"tag": "InputNumber",
"key": "field-10",
"labelsAdded": [
"Write user ID"
]
},
{
"tag": "InputNumber",
"key": "field-11",
"labelsAdded": [
"Event pump channel capacity"
]
},
{
"tag": "InputText",
"key": "field-12",
"labelsAdded": [
"Fallback user"
]
},
{
"tag": "InputText",
"key": "field-13",
"labelsAdded": [
"Fallback domain (optional)"
]
},
{
"tag": "InputText",
"key": "field-14",
"labelsAdded": [
"Fallback password secret ref"
]
},
{
"tag": "InputNumber",
"key": "field-15",
"labelsAdded": [
"Ack confirm timeout (ms)"
]
},
{
"tag": "InputNumber",
"key": "field-16",
"labelsAdded": [
"Discover page size"
]
},
{
"tag": "InputCheckbox",
"key": "watchDeploy",
"labelsAdded": []
},
{
"tag": "InputNumber",
"key": "field-18",
"labelsAdded": [
"Initial backoff (ms)"
]
},
{
"tag": "InputNumber",
"key": "field-19",
"labelsAdded": [
"Max backoff (ms)"
]
},
{
"tag": "InputCheckbox",
"key": "replayOnLost",
"labelsAdded": []
},
{
"tag": "InputNumber",
"key": "field-21",
"labelsAdded": [
"Admin UI probe timeout (seconds)"
]
}
]
@@ -0,0 +1,82 @@
[
{
"tag": "InputNumber",
"key": "hhTimeout",
"labelsAdded": []
},
{
"tag": "InputNumber",
"key": "hhReconnect",
"labelsAdded": []
},
{
"tag": "InputNumber",
"key": "hhReconnectMax",
"labelsAdded": []
},
{
"tag": "InputNumber",
"key": "hhProbe",
"labelsAdded": []
},
{
"tag": "InputCheckbox",
"key": "hhTelemetry",
"labelsAdded": []
},
{
"tag": "InputCheckbox",
"key": "hhDnc",
"labelsAdded": []
},
{
"tag": "InputCheckbox",
"key": "hhData",
"labelsAdded": []
},
{
"tag": "InputText",
"key": "hhInspectPw",
"labelsAdded": []
},
{
"tag": "InputText",
"key": "hhDncPw",
"labelsAdded": []
},
{
"tag": "InputText",
"key": "hhDataPw",
"labelsAdded": []
},
{
"tag": "InputNumber",
"key": "hhStatus",
"labelsAdded": []
},
{
"tag": "InputNumber",
"key": "hhCustom",
"labelsAdded": []
},
{
"tag": "InputNumber",
"key": "hhSlow",
"labelsAdded": []
},
{
"tag": "InputNumber",
"key": "hhAlarmMs",
"labelsAdded": []
},
{
"tag": "InputNumber",
"key": "hhAlarms",
"labelsAdded": []
},
{
"tag": "InputCheckbox",
"key": "hhTimers",
"labelsAdded": []
}
]
@@ -0,0 +1,187 @@
[
{
"tag": "InputNumber",
"key": "field-01",
"labelsAdded": [
"Timeout (seconds)"
]
},
{
"tag": "InputSelect",
"key": "field-02",
"labelsAdded": [
"PLC family"
]
},
{
"tag": "InputSelect",
"key": "field-03",
"labelsAdded": [
"Transport"
]
},
{
"tag": "InputSelect",
"key": "field-04",
"labelsAdded": [
"MELSEC sub-family"
]
},
{
"tag": "InputCheckbox",
"key": "autoReconnect",
"labelsAdded": []
},
{
"tag": "InputNumber",
"key": "field-06",
"labelsAdded": [
"Max registers per read"
]
},
{
"tag": "InputNumber",
"key": "field-07",
"labelsAdded": [
"Max registers per write"
]
},
{
"tag": "InputNumber",
"key": "field-08",
"labelsAdded": [
"Max coils per read"
]
},
{
"tag": "InputNumber",
"key": "field-09",
"labelsAdded": [
"Max read gap (coalescing)"
]
},
{
"tag": "InputCheckbox",
"key": "disableCoalescing",
"labelsAdded": []
},
{
"tag": "InputCheckbox",
"key": "useFC15",
"labelsAdded": []
},
{
"tag": "InputCheckbox",
"key": "useFC16",
"labelsAdded": []
},
{
"tag": "InputCheckbox",
"key": "disableFC23",
"labelsAdded": []
},
{
"tag": "InputCheckbox",
"key": "useFC23",
"labelsAdded": []
},
{
"tag": "InputCheckbox",
"key": "writeOnChangeOnly",
"labelsAdded": []
},
{
"tag": "InputCheckbox",
"key": "kaEnabled",
"labelsAdded": []
},
{
"tag": "InputNumber",
"key": "field-17",
"labelsAdded": [
"Time (seconds)"
]
},
{
"tag": "InputNumber",
"key": "field-18",
"labelsAdded": [
"Interval (seconds)"
]
},
{
"tag": "InputNumber",
"key": "field-19",
"labelsAdded": [
"Retry count"
]
},
{
"tag": "InputNumber",
"key": "field-20",
"labelsAdded": [
"Initial delay (seconds)"
]
},
{
"tag": "InputNumber",
"key": "field-21",
"labelsAdded": [
"Max delay (seconds)"
]
},
{
"tag": "InputNumber",
"key": "field-22",
"labelsAdded": [
"Backoff multiplier"
]
},
{
"tag": "InputNumber",
"key": "field-23",
"labelsAdded": [
"Idle disconnect (seconds, 0 = off)"
]
},
{
"tag": "InputCheckbox",
"key": "probeEnabled",
"labelsAdded": []
},
{
"tag": "InputNumber",
"key": "field-25",
"labelsAdded": [
"Probe interval (seconds)"
]
},
{
"tag": "InputNumber",
"key": "field-26",
"labelsAdded": [
"Probe timeout (seconds)"
]
},
{
"tag": "InputNumber",
"key": "field-27",
"labelsAdded": [
"Probe register address"
]
},
{
"tag": "InputNumber",
"key": "field-28",
"labelsAdded": [
"Admin UI probe timeout (seconds)"
]
},
{
"tag": "InputNumber",
"key": "field-29",
"labelsAdded": [
"Auto-prohibit re-probe interval (seconds, 0 = off)"
]
}
]
@@ -5,3 +5,5 @@ Root owns12 driver forms (excluding Calculation),10 device forms and13 tag edito
The initial35 real component cases render two simultaneous instances with actual controls, positive NativeAlarm fields and a mutation-refusing script-list fake. Only common resilience is explicitly stubbed because it has a separate owner/contract suite. Initial result:34failed/1passed; GalaxyDevice intentionally has no per-device endpoint and requires no invented field. No tests are skipped. Native IDs/names and referenced descriptions are checked on rendered DOM, not source declarations. Default/conditional protocol serialization tests remain required for each batch.
Batch1: AbCip, AbLegacy and Focas driver forms now have scoped label/control IDs, existing hint relationships and existing InputNumber parser feedback. AbCip's existing browse-delay domain message joins the persistent field feedback container without changing its reject-before-emit behavior. Batch contract/parity results:59passed/0failed, including actual standalone/parser-feedback cases for these three forms; remaining protocol failures are expected until their own migration batch.
Batch2: Galaxy, Heidenhain and Modbus driver forms:30focused field/parser/standalone and existing model/parity tests pass. Protocol C# bodies and existing event/bind expressions remain byte-for-byte unchanged across the35-file owned inventory; check-protocol-boundaries.py verifies that boundary independently of rendered field tests. Conditional aggregate model errors retain their original scope, rather than being attributed to unrelated controls.
@@ -0,0 +1,52 @@
ZB.MOM.WW.OtOpcUa.Analyzers -> /Users/dohertj2/Desktop/OtOpcUa/src/Tooling/ZB.MOM.WW.OtOpcUa.Analyzers/bin/Debug/netstandard2.0/ZB.MOM.WW.OtOpcUa.Analyzers.dll
ZB.MOM.WW.OtOpcUa.Core.Abstractions -> /Users/dohertj2/Desktop/OtOpcUa/src/Core/ZB.MOM.WW.OtOpcUa.Core.Abstractions/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Core.Abstractions.dll
ZB.MOM.WW.OtOpcUa.Driver.Calculation.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Calculation.Contracts/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Calculation.Contracts.dll
ZB.MOM.WW.OtOpcUa.Driver.Modbus.Addressing -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Modbus.Addressing/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Modbus.Addressing.dll
ZB.MOM.WW.OtOpcUa.Driver.Ab.Transport -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Ab.Transport/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Ab.Transport.dll
ZB.MOM.WW.OtOpcUa.Core.AlarmHistorian -> /Users/dohertj2/Desktop/OtOpcUa/src/Core/ZB.MOM.WW.OtOpcUa.Core.AlarmHistorian/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Core.AlarmHistorian.dll
ZB.MOM.WW.OtOpcUa.Driver.TwinCAT.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.TwinCAT.Contracts/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.TwinCAT.Contracts.dll
ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Contracts/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Contracts.dll
ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Contracts/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Contracts.dll
ZB.MOM.WW.OtOpcUa.Driver.FOCAS.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.FOCAS.Contracts/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.FOCAS.Contracts.dll
ZB.MOM.WW.OtOpcUa.Driver.Heidenhain.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Heidenhain.Contracts/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Heidenhain.Contracts.dll
ZB.MOM.WW.OtOpcUa.Driver.AbCip.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.AbCip.Contracts/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.AbCip.Contracts.dll
ZB.MOM.WW.OtOpcUa.Driver.S7.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.S7.Contracts/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.S7.Contracts.dll
ZB.MOM.WW.OtOpcUa.Driver.AbLegacy.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.AbLegacy.Contracts/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.AbLegacy.Contracts.dll
ZB.MOM.WW.OtOpcUa.Core.Scripting.Abstractions -> /Users/dohertj2/Desktop/OtOpcUa/src/Core/ZB.MOM.WW.OtOpcUa.Core.Scripting.Abstractions/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Core.Scripting.Abstractions.dll
ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Contracts/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Contracts.dll
ZB.MOM.WW.OtOpcUa.Driver.Sql.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Sql.Contracts/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Sql.Contracts.dll
ZB.MOM.WW.OtOpcUa.Driver.Modbus.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Modbus.Contracts/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Modbus.Contracts.dll
ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Session -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Session/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Session.dll
ZB.MOM.WW.OtOpcUa.Driver.Sql.Dialect -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Sql.Dialect/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Sql.Dialect.dll
ZB.MOM.WW.OtOpcUa.Driver.MTConnect.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.MTConnect.Contracts/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.MTConnect.Contracts.dll
ZB.MOM.WW.OtOpcUa.Commons -> /Users/dohertj2/Desktop/OtOpcUa/src/Core/ZB.MOM.WW.OtOpcUa.Commons/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Commons.dll
ZB.MOM.WW.OtOpcUa.Driver.Sql.Browser -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Sql.Browser/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Sql.Browser.dll
ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Browser -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Browser/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Browser.dll
ZB.MOM.WW.OtOpcUa.Cluster -> /Users/dohertj2/Desktop/OtOpcUa/src/Core/ZB.MOM.WW.OtOpcUa.Cluster/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Cluster.dll
ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Browser -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Browser/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Browser.dll
ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Transport -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Transport/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Transport.dll
ZB.MOM.WW.OtOpcUa.Core.Scripting -> /Users/dohertj2/Desktop/OtOpcUa/src/Core/ZB.MOM.WW.OtOpcUa.Core.Scripting/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Core.Scripting.dll
ZB.MOM.WW.OtOpcUa.Core.VirtualTags -> /Users/dohertj2/Desktop/OtOpcUa/src/Core/ZB.MOM.WW.OtOpcUa.Core.VirtualTags/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Core.VirtualTags.dll
ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Browser -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Browser/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Browser.dll
ZB.MOM.WW.OtOpcUa.Core.ScriptedAlarms -> /Users/dohertj2/Desktop/OtOpcUa/src/Core/ZB.MOM.WW.OtOpcUa.Core.ScriptedAlarms/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Core.ScriptedAlarms.dll
ZB.MOM.WW.OtOpcUa.Configuration -> /Users/dohertj2/Desktop/OtOpcUa/src/Core/ZB.MOM.WW.OtOpcUa.Configuration/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Configuration.dll
ZB.MOM.WW.OtOpcUa.Core -> /Users/dohertj2/Desktop/OtOpcUa/src/Core/ZB.MOM.WW.OtOpcUa.Core/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Core.dll
ZB.MOM.WW.OtOpcUa.Security -> /Users/dohertj2/Desktop/OtOpcUa/src/Server/ZB.MOM.WW.OtOpcUa.Security/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Security.dll
ZB.MOM.WW.OtOpcUa.Driver.Heidenhain -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Heidenhain/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Heidenhain.dll
ZB.MOM.WW.OtOpcUa.Driver.Galaxy -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Galaxy/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Galaxy.dll
ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.dll
ZB.MOM.WW.OtOpcUa.Driver.Sql -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Sql/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Sql.dll
ZB.MOM.WW.OtOpcUa.Driver.MTConnect -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.MTConnect/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.MTConnect.dll
ZB.MOM.WW.OtOpcUa.Driver.FOCAS -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.FOCAS/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.FOCAS.dll
ZB.MOM.WW.OtOpcUa.Driver.AbLegacy -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.AbLegacy/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.AbLegacy.dll
ZB.MOM.WW.OtOpcUa.Driver.AbCip -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.AbCip/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.AbCip.dll
ZB.MOM.WW.OtOpcUa.OpcUaServer -> /Users/dohertj2/Desktop/OtOpcUa/src/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.OpcUaServer.dll
ZB.MOM.WW.OtOpcUa.ControlPlane -> /Users/dohertj2/Desktop/OtOpcUa/src/Server/ZB.MOM.WW.OtOpcUa.ControlPlane/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.ControlPlane.dll
ZB.MOM.WW.OtOpcUa.Runtime -> /Users/dohertj2/Desktop/OtOpcUa/src/Server/ZB.MOM.WW.OtOpcUa.Runtime/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Runtime.dll
ZB.MOM.WW.OtOpcUa.AdminUI -> /Users/dohertj2/Desktop/OtOpcUa/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.AdminUI.dll
ZB.MOM.WW.OtOpcUa.AdminUI.Tests -> /Users/dohertj2/Desktop/OtOpcUa/tests/Server/ZB.MOM.WW.OtOpcUa.AdminUI.Tests/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.AdminUI.Tests.dll
Test run for /Users/dohertj2/Desktop/OtOpcUa/tests/Server/ZB.MOM.WW.OtOpcUa.AdminUI.Tests/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.AdminUI.Tests.dll (.NETCoreApp,Version=v10.0)
A total of 1 test files matched the specified pattern.
Passed! - Failed: 0, Passed: 30, Skipped: 0, Total: 30, Duration: 341 ms - ZB.MOM.WW.OtOpcUa.AdminUI.Tests.dll (net10.0)
@@ -0,0 +1,16 @@
"""Guard protocol C# and event/bind expressions while associating native fields."""
from pathlib import Path
import subprocess,re,json
ROOT=Path(__file__).resolve().parents[3]
BASE=ROOT/'src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Shared'
files=[p for p in (BASE/'Drivers/Forms').glob('*DriverForm.razor') if p.stem!='CalculationDriverForm']+list((BASE/'Drivers/DeviceForms').glob('*DeviceForm.razor'))+list((BASE/'Uns/TagEditors').glob('*.razor'))
expr=re.compile(r'@(?:bind(?:-[\w]+)?(?::[\w]+)?|on[\w]+(?::[\w]+)?)\s*=\s*"[^"]*"')
rows=[]
for p in files:
old=subprocess.check_output(['git','show','a47ffb91:'+str(p.relative_to(ROOT))],cwd=ROOT,text=True);new=p.read_text();ob=old.split('@code {',1)[1];nb=new.split('@code {',1)[1]
assert nb.endswith(ob),p.name+' protocol C# changed'
prefix=nb[:-len(ob)]
assert all(line.strip().startswith(('private readonly string _fieldScope','private string FieldId','[CascadingParameter]')) for line in prefix.splitlines() if line.strip()),p.name+' unexpected new C#'
assert expr.findall(old.split('@code {')[0])==expr.findall(new.split('@code {')[0]),p.name+' binding/event expression changed'
rows.append({'component':p.stem,'protocolCSharpUnchanged':True,'eventAndBindExpressionsUnchanged':True,'migrated':bool(prefix)})
print(json.dumps(rows,indent=2))
@@ -13,42 +13,45 @@
<div style="padding:1rem">
<div class="row g-3">
<div class="col-md-6">
<label class="form-label">Gateway endpoint</label>
<InputText @bind-Value="_form.Galaxy.GatewayEndpoint" @bind-Value:after="EmitAsync" class="form-control form-control-sm mono"
<label for="@FieldId("field-01")" class="form-label">Gateway endpoint</label>
<InputText aria-describedby="@FieldIds("field-01-hint")" id="@FieldId("field-01")" @bind-Value="_form.Galaxy.GatewayEndpoint" @bind-Value:after="EmitAsync" class="form-control form-control-sm mono"
placeholder="https://localhost:5001" />
<div class="form-text">gRPC endpoint of the mxaccessgw process.</div>
<div id="@FieldId("field-01-hint")" class="form-text">gRPC endpoint of the mxaccessgw process.</div>
</div>
<div class="col-md-6">
<label class="form-label">API key secret ref</label>
<InputText @bind-Value="_form.Galaxy.GatewayApiKeySecretRef" @bind-Value:after="EmitAsync" class="form-control form-control-sm mono"
<label for="@FieldId("field-02")" class="form-label">API key secret ref</label>
<InputText aria-describedby="@FieldIds("field-02-hint")" id="@FieldId("field-02")" @bind-Value="_form.Galaxy.GatewayApiKeySecretRef" @bind-Value:after="EmitAsync" class="form-control form-control-sm mono"
placeholder="env:OTOPCUA_GALAXY_API_KEY" />
<div class="form-text">Forms: <code>secret:galaxy/NAME</code>, <code>env:OTOPCUA_GALAXY_NAME</code> (or legacy <code>env:GALAXY_MXGW_NAME</code>), <code>dev:KEY</code>. Cleartext is accepted but triggers a startup warning. References outside the Galaxy namespace and <code>file:</code> are refused (#815).</div>
<div id="@FieldId("field-02-hint")" class="form-text">Forms: <code>secret:galaxy/NAME</code>, <code>env:OTOPCUA_GALAXY_NAME</code> (or legacy <code>env:GALAXY_MXGW_NAME</code>), <code>dev:KEY</code>. Cleartext is accepted but triggers a startup warning. References outside the Galaxy namespace and <code>file:</code> are refused (#815).</div>
</div>
<div class="col-md-3">
<div class="form-check form-switch mt-4">
<InputCheckbox @bind-Value="_form.Galaxy.GatewayUseTls" @bind-Value:after="EmitAsync" class="form-check-input" id="gwTls" />
<label class="form-check-label" for="gwTls">Use TLS</label>
<InputCheckbox @bind-Value="_form.Galaxy.GatewayUseTls" @bind-Value:after="EmitAsync" class="form-check-input" id="@FieldId("gwTls")" />
<label class="form-check-label" for="@FieldId("gwTls")">Use TLS</label>
</div>
</div>
<div class="col-md-5">
<label class="form-label">CA certificate path (optional)</label>
<InputText @bind-Value="_form.Galaxy.GatewayCaCertificatePath" @bind-Value:after="EmitAsync" class="form-control form-control-sm mono"
<label for="@FieldId("field-04")" class="form-label">CA certificate path (optional)</label>
<InputText id="@FieldId("field-04")" @bind-Value="_form.Galaxy.GatewayCaCertificatePath" @bind-Value:after="EmitAsync" class="form-control form-control-sm mono"
placeholder="C:\certs\ca.pem" />
</div>
<div class="col-md-2">
<label class="form-label">Connect timeout (s)</label>
<InputNumber @bind-Value="_form.Galaxy.GatewayConnectTimeoutSeconds" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div class="form-text">Default 10 s.</div>
<label for="@FieldId("field-05")" class="form-label">Connect timeout (s)</label>
<InputNumber aria-describedby="@FieldIds("field-05-error", "field-05-hint")" id="@FieldId("field-05")" @bind-Value="_form.Galaxy.GatewayConnectTimeoutSeconds" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div id="@FieldId("field-05-error")" class="field-error">@if (_fieldEditContext is not null) { <ValidationMessage For="@(() => _form.Galaxy.GatewayConnectTimeoutSeconds)" /> }</div>
<div id="@FieldId("field-05-hint")" class="form-text">Default 10 s.</div>
</div>
<div class="col-md-2">
<label class="form-label">Call timeout (s)</label>
<InputNumber @bind-Value="_form.Galaxy.GatewayDefaultCallTimeoutSeconds" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div class="form-text">Default 30 s.</div>
<label for="@FieldId("field-06")" class="form-label">Call timeout (s)</label>
<InputNumber aria-describedby="@FieldIds("field-06-error", "field-06-hint")" id="@FieldId("field-06")" @bind-Value="_form.Galaxy.GatewayDefaultCallTimeoutSeconds" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div id="@FieldId("field-06-error")" class="field-error">@if (_fieldEditContext is not null) { <ValidationMessage For="@(() => _form.Galaxy.GatewayDefaultCallTimeoutSeconds)" /> }</div>
<div id="@FieldId("field-06-hint")" class="form-text">Default 30 s.</div>
</div>
<div class="col-md-2">
<label class="form-label">Stream timeout (s, 0 = unlimited)</label>
<InputNumber @bind-Value="_form.Galaxy.GatewayStreamTimeoutSeconds" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div class="form-text">Default 0 (lifetime of driver).</div>
<label for="@FieldId("field-07")" class="form-label">Stream timeout (s, 0 = unlimited)</label>
<InputNumber aria-describedby="@FieldIds("field-07-error", "field-07-hint")" id="@FieldId("field-07")" @bind-Value="_form.Galaxy.GatewayStreamTimeoutSeconds" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div id="@FieldId("field-07-error")" class="field-error">@if (_fieldEditContext is not null) { <ValidationMessage For="@(() => _form.Galaxy.GatewayStreamTimeoutSeconds)" /> }</div>
<div id="@FieldId("field-07-hint")" class="form-text">Default 0 (lifetime of driver).</div>
</div>
</div>
</div>
@@ -60,25 +63,28 @@
<div style="padding:1rem">
<div class="row g-3">
<div class="col-md-4">
<label class="form-label">Client name</label>
<InputText @bind-Value="_form.Galaxy.MxClientName" @bind-Value:after="EmitAsync" class="form-control form-control-sm"
<label for="@FieldId("field-08")" class="form-label">Client name</label>
<InputText aria-describedby="@FieldIds("field-08-hint")" id="@FieldId("field-08")" @bind-Value="_form.Galaxy.MxClientName" @bind-Value:after="EmitAsync" class="form-control form-control-sm"
placeholder="OtOpcUa-Primary" />
<div class="form-text">Must be unique per OtOpcUa instance — redundancy pairs each get a distinct name.</div>
<div id="@FieldId("field-08-hint")" class="form-text">Must be unique per OtOpcUa instance — redundancy pairs each get a distinct name.</div>
</div>
<div class="col-md-3">
<label class="form-label">Publishing interval (ms)</label>
<InputNumber @bind-Value="_form.Galaxy.MxPublishingIntervalMs" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div class="form-text">Default 1000 ms.</div>
<label for="@FieldId("field-09")" class="form-label">Publishing interval (ms)</label>
<InputNumber aria-describedby="@FieldIds("field-09-error", "field-09-hint")" id="@FieldId("field-09")" @bind-Value="_form.Galaxy.MxPublishingIntervalMs" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div id="@FieldId("field-09-error")" class="field-error">@if (_fieldEditContext is not null) { <ValidationMessage For="@(() => _form.Galaxy.MxPublishingIntervalMs)" /> }</div>
<div id="@FieldId("field-09-hint")" class="form-text">Default 1000 ms.</div>
</div>
<div class="col-md-2">
<label class="form-label">Write user ID</label>
<InputNumber @bind-Value="_form.Galaxy.MxWriteUserId" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div class="form-text">0 = anonymous.</div>
<label for="@FieldId("field-10")" class="form-label">Write user ID</label>
<InputNumber aria-describedby="@FieldIds("field-10-error", "field-10-hint")" id="@FieldId("field-10")" @bind-Value="_form.Galaxy.MxWriteUserId" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div id="@FieldId("field-10-error")" class="field-error">@if (_fieldEditContext is not null) { <ValidationMessage For="@(() => _form.Galaxy.MxWriteUserId)" /> }</div>
<div id="@FieldId("field-10-hint")" class="form-text">0 = anonymous.</div>
</div>
<div class="col-md-3">
<label class="form-label">Event pump channel capacity</label>
<InputNumber @bind-Value="_form.Galaxy.MxEventPumpChannelCapacity" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div class="form-text">Default 50000. Raise if events.dropped appears.</div>
<label for="@FieldId("field-11")" class="form-label">Event pump channel capacity</label>
<InputNumber aria-describedby="@FieldIds("field-11-error", "field-11-hint")" id="@FieldId("field-11")" @bind-Value="_form.Galaxy.MxEventPumpChannelCapacity" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div id="@FieldId("field-11-error")" class="field-error">@if (_fieldEditContext is not null) { <ValidationMessage For="@(() => _form.Galaxy.MxEventPumpChannelCapacity)" /> }</div>
<div id="@FieldId("field-11-hint")" class="form-text">Default 50000. Raise if events.dropped appears.</div>
</div>
</div>
</div>
@@ -95,24 +101,25 @@
</div>
<div class="row g-3">
<div class="col-md-3">
<label class="form-label">Fallback user</label>
<InputText @bind-Value="_form.Galaxy.AckFallbackUser" @bind-Value:after="EmitAsync" class="form-control form-control-sm"
<label for="@FieldId("field-12")" class="form-label">Fallback user</label>
<InputText id="@FieldId("field-12")" @bind-Value="_form.Galaxy.AckFallbackUser" @bind-Value:after="EmitAsync" class="form-control form-control-sm"
placeholder="(none — refuse)" />
</div>
<div class="col-md-3">
<label class="form-label">Fallback domain (optional)</label>
<InputText @bind-Value="_form.Galaxy.AckFallbackDomain" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<label for="@FieldId("field-13")" class="form-label">Fallback domain (optional)</label>
<InputText id="@FieldId("field-13")" @bind-Value="_form.Galaxy.AckFallbackDomain" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
</div>
<div class="col-md-6">
<label class="form-label">Fallback password secret ref</label>
<InputText @bind-Value="_form.Galaxy.AckFallbackPasswordSecretRef" @bind-Value:after="EmitAsync" class="form-control form-control-sm mono"
<label for="@FieldId("field-14")" class="form-label">Fallback password secret ref</label>
<InputText aria-describedby="@FieldIds("field-14-hint")" id="@FieldId("field-14")" @bind-Value="_form.Galaxy.AckFallbackPasswordSecretRef" @bind-Value:after="EmitAsync" class="form-control form-control-sm mono"
placeholder="secret:otopcua/galaxy/ack-fallback-password" />
<div class="form-text">Forms: <code>secret:galaxy/NAME</code> or <code>secret:otopcua/galaxy/NAME</code> (production), <code>env:OTOPCUA_GALAXY_NAME</code>, <code>dev:VALUE</code>. A bare literal, <code>file:</code>, or a reference outside the Galaxy namespace is refused (#815).</div>
<div id="@FieldId("field-14-hint")" class="form-text">Forms: <code>secret:galaxy/NAME</code> or <code>secret:otopcua/galaxy/NAME</code> (production), <code>env:OTOPCUA_GALAXY_NAME</code>, <code>dev:VALUE</code>. A bare literal, <code>file:</code>, or a reference outside the Galaxy namespace is refused (#815).</div>
</div>
<div class="col-md-3">
<label class="form-label">Ack confirm timeout (ms)</label>
<InputNumber @bind-Value="_form.Galaxy.AckConfirmTimeoutMs" @bind-Value:after="EmitAsync" min="0" max="120000" class="form-control form-control-sm" />
<div class="form-text">When the gateway sends an ack but cannot confirm it, wait this long for Galaxy's acknowledged transition before reverting the condition to unacknowledged (#869). Default 10000; 0 = do not wait.</div>
<label for="@FieldId("field-15")" class="form-label">Ack confirm timeout (ms)</label>
<InputNumber aria-describedby="@FieldIds("field-15-error", "field-15-hint")" id="@FieldId("field-15")" @bind-Value="_form.Galaxy.AckConfirmTimeoutMs" @bind-Value:after="EmitAsync" min="0" max="120000" class="form-control form-control-sm" />
<div id="@FieldId("field-15-error")" class="field-error">@if (_fieldEditContext is not null) { <ValidationMessage For="@(() => _form.Galaxy.AckConfirmTimeoutMs)" /> }</div>
<div id="@FieldId("field-15-hint")" class="form-text">When the gateway sends an ack but cannot confirm it, wait this long for Galaxy's acknowledged transition before reverting the condition to unacknowledged (#869). Default 10000; 0 = do not wait.</div>
</div>
</div>
</div>
@@ -124,16 +131,17 @@
<div style="padding:1rem">
<div class="row g-3">
<div class="col-md-3">
<label class="form-label">Discover page size</label>
<InputNumber @bind-Value="_form.Galaxy.RepositoryDiscoverPageSize" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div class="form-text">Objects per DiscoverHierarchy page the driver asks the gateway for. Default 5000.</div>
<label for="@FieldId("field-16")" class="form-label">Discover page size</label>
<InputNumber aria-describedby="@FieldIds("field-16-error", "field-16-hint")" id="@FieldId("field-16")" @bind-Value="_form.Galaxy.RepositoryDiscoverPageSize" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div id="@FieldId("field-16-error")" class="field-error">@if (_fieldEditContext is not null) { <ValidationMessage For="@(() => _form.Galaxy.RepositoryDiscoverPageSize)" /> }</div>
<div id="@FieldId("field-16-hint")" class="form-text">Objects per DiscoverHierarchy page the driver asks the gateway for. Default 5000.</div>
</div>
<div class="col-md-3">
<div class="form-check form-switch mt-4">
<InputCheckbox @bind-Value="_form.Galaxy.RepositoryWatchDeployEvents" @bind-Value:after="EmitAsync" class="form-check-input" id="watchDeploy" />
<label class="form-check-label" for="watchDeploy">Watch deploy events</label>
<InputCheckbox aria-describedby="@FieldIds("watchDeploy-hint")" @bind-Value="_form.Galaxy.RepositoryWatchDeployEvents" @bind-Value:after="EmitAsync" class="form-check-input" id="@FieldId("watchDeploy")" />
<label class="form-check-label" for="@FieldId("watchDeploy")">Watch deploy events</label>
</div>
<div class="form-text mt-0">Triggers address-space rebuild on Galaxy re-deploy.</div>
<div id="@FieldId("watchDeploy-hint")" class="form-text mt-0">Triggers address-space rebuild on Galaxy re-deploy.</div>
</div>
</div>
</div>
@@ -145,19 +153,21 @@
<div style="padding:1rem">
<div class="row g-3">
<div class="col-md-3">
<label class="form-label">Initial backoff (ms)</label>
<InputNumber @bind-Value="_form.Galaxy.ReconnectInitialBackoffMs" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div class="form-text">Default 500 ms.</div>
<label for="@FieldId("field-18")" class="form-label">Initial backoff (ms)</label>
<InputNumber aria-describedby="@FieldIds("field-18-error", "field-18-hint")" id="@FieldId("field-18")" @bind-Value="_form.Galaxy.ReconnectInitialBackoffMs" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div id="@FieldId("field-18-error")" class="field-error">@if (_fieldEditContext is not null) { <ValidationMessage For="@(() => _form.Galaxy.ReconnectInitialBackoffMs)" /> }</div>
<div id="@FieldId("field-18-hint")" class="form-text">Default 500 ms.</div>
</div>
<div class="col-md-3">
<label class="form-label">Max backoff (ms)</label>
<InputNumber @bind-Value="_form.Galaxy.ReconnectMaxBackoffMs" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div class="form-text">Default 30000 ms.</div>
<label for="@FieldId("field-19")" class="form-label">Max backoff (ms)</label>
<InputNumber aria-describedby="@FieldIds("field-19-error", "field-19-hint")" id="@FieldId("field-19")" @bind-Value="_form.Galaxy.ReconnectMaxBackoffMs" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div id="@FieldId("field-19-error")" class="field-error">@if (_fieldEditContext is not null) { <ValidationMessage For="@(() => _form.Galaxy.ReconnectMaxBackoffMs)" /> }</div>
<div id="@FieldId("field-19-hint")" class="form-text">Default 30000 ms.</div>
</div>
<div class="col-md-3">
<div class="form-check form-switch mt-4">
<InputCheckbox @bind-Value="_form.Galaxy.ReconnectReplayOnSessionLost" @bind-Value:after="EmitAsync" class="form-check-input" id="replayOnLost" />
<label class="form-check-label" for="replayOnLost">Replay subscriptions on session lost</label>
<InputCheckbox @bind-Value="_form.Galaxy.ReconnectReplayOnSessionLost" @bind-Value:after="EmitAsync" class="form-check-input" id="@FieldId("replayOnLost")" />
<label class="form-check-label" for="@FieldId("replayOnLost")">Replay subscriptions on session lost</label>
</div>
</div>
</div>
@@ -170,9 +180,10 @@
<div style="padding:1rem">
<div class="row g-3">
<div class="col-md-3">
<label class="form-label">Admin UI probe timeout (seconds)</label>
<InputNumber @bind-Value="_form.Galaxy.ProbeTimeoutSeconds" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div class="form-text">The Test Connect probe budget (1–60 s). Default 30.</div>
<label for="@FieldId("field-21")" class="form-label">Admin UI probe timeout (seconds)</label>
<InputNumber aria-describedby="@FieldIds("field-21-error", "field-21-hint")" id="@FieldId("field-21")" @bind-Value="_form.Galaxy.ProbeTimeoutSeconds" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div id="@FieldId("field-21-error")" class="field-error">@if (_fieldEditContext is not null) { <ValidationMessage For="@(() => _form.Galaxy.ProbeTimeoutSeconds)" /> }</div>
<div id="@FieldId("field-21-hint")" class="form-text">The Test Connect probe budget (1–60 s). Default 30.</div>
</div>
</div>
</div>
@@ -181,6 +192,11 @@
<DriverResilienceSection ResilienceConfig="@ResilienceConfig" ResilienceConfigChanged="OnResilienceChanged" />
@code {
private readonly string _fieldScope = "galaxy-driver-form-" + Guid.NewGuid().ToString("N");
private string FieldIds(params string[] names) => string.Join(" ", names.Select(FieldId));
private string FieldId(string name) => $"{_fieldScope}-{name}";
[CascadingParameter] private Microsoft.AspNetCore.Components.Forms.EditContext? _fieldEditContext { get; set; }
[Parameter] public string DriverConfigJson { get; set; } = "{}";
[Parameter] public EventCallback<string> DriverConfigJsonChanged { get; set; }
[Parameter] public string? ResilienceConfig { get; set; }
@@ -9,22 +9,26 @@
<div style="padding:1rem">
<div class="row">
<div class="col-md-3 mb-3">
<label class="form-label" for="hhTimeout">Transaction timeout (ms)</label>
<InputNumber id="hhTimeout" @bind-Value="_m.TimeoutMs" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div class="form-text">100–60000. Bounds connect and each complete response. Default 5000.</div>
<label class="form-label" for="@FieldId("hhTimeout")">Transaction timeout (ms)</label>
<InputNumber aria-describedby="@FieldIds("hhTimeout-error", "hhTimeout-hint")" id="@FieldId("hhTimeout")" @bind-Value="_m.TimeoutMs" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div id="@FieldId("hhTimeout-error")" class="field-error">@if (_fieldEditContext is not null) { <ValidationMessage For="@(() => _m.TimeoutMs)" /> }</div>
<div id="@FieldId("hhTimeout-hint")" class="form-text">100–60000. Bounds connect and each complete response. Default 5000.</div>
</div>
<div class="col-md-3 mb-3">
<label class="form-label" for="hhReconnect">Reconnect initial delay (ms)</label>
<InputNumber id="hhReconnect" @bind-Value="_m.ReconnectInitialMs" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<label class="form-label" for="@FieldId("hhReconnect")">Reconnect initial delay (ms)</label>
<InputNumber aria-describedby="@FieldId("hhReconnect-error")" id="@FieldId("hhReconnect")" @bind-Value="_m.ReconnectInitialMs" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div id="@FieldId("hhReconnect-error")" class="field-error">@if (_fieldEditContext is not null) { <ValidationMessage For="@(() => _m.ReconnectInitialMs)" /> }</div>
</div>
<div class="col-md-3 mb-3">
<label class="form-label" for="hhReconnectMax">Reconnect max delay (ms)</label>
<InputNumber id="hhReconnectMax" @bind-Value="_m.ReconnectMaxMs" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div class="form-text">Backoff doubles from the initial delay up to this ceiling.</div>
<label class="form-label" for="@FieldId("hhReconnectMax")">Reconnect max delay (ms)</label>
<InputNumber aria-describedby="@FieldIds("hhReconnectMax-error", "hhReconnectMax-hint")" id="@FieldId("hhReconnectMax")" @bind-Value="_m.ReconnectMaxMs" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div id="@FieldId("hhReconnectMax-error")" class="field-error">@if (_fieldEditContext is not null) { <ValidationMessage For="@(() => _m.ReconnectMaxMs)" /> }</div>
<div id="@FieldId("hhReconnectMax-hint")" class="form-text">Backoff doubles from the initial delay up to this ceiling.</div>
</div>
<div class="col-md-3 mb-3">
<label class="form-label" for="hhProbe">Test Connect timeout (s)</label>
<InputNumber id="hhProbe" @bind-Value="_m.ProbeTimeoutSeconds" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<label class="form-label" for="@FieldId("hhProbe")">Test Connect timeout (s)</label>
<InputNumber aria-describedby="@FieldId("hhProbe-error")" id="@FieldId("hhProbe")" @bind-Value="_m.ProbeTimeoutSeconds" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div id="@FieldId("hhProbe-error")" class="field-error">@if (_fieldEditContext is not null) { <ValidationMessage For="@(() => _m.ProbeTimeoutSeconds)" /> }</div>
</div>
</div>
</div>
@@ -36,38 +40,38 @@
<div class="row">
<div class="col-md-4 mb-3">
<div class="form-check form-switch mt-2">
<InputCheckbox id="hhTelemetry" @bind-Value="_m.TelemetryEnabled" @bind-Value:after="EmitAsync" class="form-check-input" />
<label class="form-check-label" for="hhTelemetry">Telemetry reads</label>
<InputCheckbox aria-describedby="@FieldIds("hhTelemetry-hint")" id="@FieldId("hhTelemetry")" @bind-Value="_m.TelemetryEnabled" @bind-Value:after="EmitAsync" class="form-check-input" />
<label class="form-check-label" for="@FieldId("hhTelemetry")">Telemetry reads</label>
</div>
<div class="form-text">Execution/program state, program, overrides, axes, tool, alarms. Off = no runtime-info requests.</div>
<div id="@FieldId("hhTelemetry-hint")" class="form-text">Execution/program state, program, overrides, axes, tool, alarms. Off = no runtime-info requests.</div>
</div>
<div class="col-md-4 mb-3">
<div class="form-check form-switch mt-2">
<InputCheckbox id="hhDnc" @bind-Value="_m.DncLoginEnabled" @bind-Value:after="EmitAsync" class="form-check-input" />
<label class="form-check-label" for="hhDnc">Optional DNC login</label>
<InputCheckbox aria-describedby="@FieldIds("hhDnc-hint")" id="@FieldId("hhDnc")" @bind-Value="_m.DncLoginEnabled" @bind-Value:after="EmitAsync" class="form-check-input" />
<label class="form-check-label" for="@FieldId("hhDnc")">Optional DNC login</label>
</div>
<div class="form-text">A refused DNC login never blocks reads the control permits under INSPECT.</div>
<div id="@FieldId("hhDnc-hint")" class="form-text">A refused DNC login never blocks reads the control permits under INSPECT.</div>
</div>
<div class="col-md-4 mb-3">
<div class="form-check form-switch mt-2">
<InputCheckbox id="hhData" @bind-Value="_m.DataEnabled" @bind-Value:after="EmitAsync" class="form-check-input" />
<label class="form-check-label" for="hhData">DATA path reads</label>
<InputCheckbox aria-describedby="@FieldIds("hhData-hint")" id="@FieldId("hhData")" @bind-Value="_m.DataEnabled" @bind-Value:after="EmitAsync" class="form-check-input" />
<label class="form-check-label" for="@FieldId("hhData")">DATA path reads</label>
</div>
<div class="form-text">Opt-in DATA login, only when a <span class="mono">DATA:</span> binding needs it (reference-derived; iTNC only).</div>
<div id="@FieldId("hhData-hint")" class="form-text">Opt-in DATA login, only when a <span class="mono">DATA:</span> binding needs it (reference-derived; iTNC only).</div>
</div>
</div>
<div class="row">
<div class="col-md-4 mb-3">
<label class="form-label" for="hhInspectPw">INSPECT password ref</label>
<InputText id="hhInspectPw" @bind-Value="_m.InspectPassword" @bind-Value:after="EmitAsync" class="form-control form-control-sm mono" placeholder="secret:heidenhain/inspect" />
<label class="form-label" for="@FieldId("hhInspectPw")">INSPECT password ref</label>
<InputText id="@FieldId("hhInspectPw")" @bind-Value="_m.InspectPassword" @bind-Value:after="EmitAsync" class="form-control form-control-sm mono" placeholder="secret:heidenhain/inspect" />
</div>
<div class="col-md-4 mb-3">
<label class="form-label" for="hhDncPw">DNC password ref</label>
<InputText id="hhDncPw" @bind-Value="_m.DncPassword" @bind-Value:after="EmitAsync" class="form-control form-control-sm mono" placeholder="secret:heidenhain/dnc" />
<label class="form-label" for="@FieldId("hhDncPw")">DNC password ref</label>
<InputText id="@FieldId("hhDncPw")" @bind-Value="_m.DncPassword" @bind-Value:after="EmitAsync" class="form-control form-control-sm mono" placeholder="secret:heidenhain/dnc" />
</div>
<div class="col-md-4 mb-3">
<label class="form-label" for="hhDataPw">DATA password ref</label>
<InputText id="hhDataPw" @bind-Value="_m.DataPassword" @bind-Value:after="EmitAsync" class="form-control form-control-sm mono" placeholder="env:OTOPCUA_HEIDENHAIN_DATA_PASSWORD" />
<label class="form-label" for="@FieldId("hhDataPw")">DATA password ref</label>
<InputText id="@FieldId("hhDataPw")" @bind-Value="_m.DataPassword" @bind-Value:after="EmitAsync" class="form-control form-control-sm mono" placeholder="env:OTOPCUA_HEIDENHAIN_DATA_PASSWORD" />
</div>
</div>
<div class="form-text">References only: blank, <span class="mono">secret:heidenhain/&lt;name&gt;</span> (node secret store) or <span class="mono">env:OTOPCUA_HEIDENHAIN_&lt;NAME&gt;</span>. Resolved at each login; a literal password is refused.</div>
@@ -79,31 +83,36 @@
<div style="padding:1rem">
<div class="row">
<div class="col-md-2 mb-3">
<label class="form-label" for="hhStatus">Status (ms)</label>
<InputNumber id="hhStatus" @bind-Value="_m.StatusMs" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<label class="form-label" for="@FieldId("hhStatus")">Status (ms)</label>
<InputNumber aria-describedby="@FieldId("hhStatus-error")" id="@FieldId("hhStatus")" @bind-Value="_m.StatusMs" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div id="@FieldId("hhStatus-error")" class="field-error">@if (_fieldEditContext is not null) { <ValidationMessage For="@(() => _m.StatusMs)" /> }</div>
</div>
<div class="col-md-2 mb-3">
<label class="form-label" for="hhCustom">Custom (ms)</label>
<InputNumber id="hhCustom" @bind-Value="_m.CustomMs" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<label class="form-label" for="@FieldId("hhCustom")">Custom (ms)</label>
<InputNumber aria-describedby="@FieldId("hhCustom-error")" id="@FieldId("hhCustom")" @bind-Value="_m.CustomMs" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div id="@FieldId("hhCustom-error")" class="field-error">@if (_fieldEditContext is not null) { <ValidationMessage For="@(() => _m.CustomMs)" /> }</div>
</div>
<div class="col-md-2 mb-3">
<label class="form-label" for="hhSlow">Slow (ms)</label>
<InputNumber id="hhSlow" @bind-Value="_m.SlowMs" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<label class="form-label" for="@FieldId("hhSlow")">Slow (ms)</label>
<InputNumber aria-describedby="@FieldId("hhSlow-error")" id="@FieldId("hhSlow")" @bind-Value="_m.SlowMs" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div id="@FieldId("hhSlow-error")" class="field-error">@if (_fieldEditContext is not null) { <ValidationMessage For="@(() => _m.SlowMs)" /> }</div>
</div>
<div class="col-md-2 mb-3">
<label class="form-label" for="hhAlarmMs" title="Cadence of the alarm-list walk behind ALARM: Part 9 conditions; only polled when the control carries an ALARM: tag">Alarm conditions (ms)</label>
<InputNumber id="hhAlarmMs" @bind-Value="_m.AlarmMs" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<label class="form-label" for="@FieldId("hhAlarmMs")" title="Cadence of the alarm-list walk behind ALARM: Part 9 conditions; only polled when the control carries an ALARM: tag">Alarm conditions (ms)</label>
<InputNumber aria-describedby="@FieldId("hhAlarmMs-error")" id="@FieldId("hhAlarmMs")" @bind-Value="_m.AlarmMs" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div id="@FieldId("hhAlarmMs-error")" class="field-error">@if (_fieldEditContext is not null) { <ValidationMessage For="@(() => _m.AlarmMs)" /> }</div>
</div>
<div class="col-md-2 mb-3">
<label class="form-label" for="hhAlarms">Max alarms</label>
<InputNumber id="hhAlarms" @bind-Value="_m.MaxAlarms" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<label class="form-label" for="@FieldId("hhAlarms")">Max alarms</label>
<InputNumber aria-describedby="@FieldId("hhAlarms-error")" id="@FieldId("hhAlarms")" @bind-Value="_m.MaxAlarms" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div id="@FieldId("hhAlarms-error")" class="field-error">@if (_fieldEditContext is not null) { <ValidationMessage For="@(() => _m.MaxAlarms)" /> }</div>
</div>
<div class="col-md-4 mb-3">
<div class="form-check form-switch mt-4">
<InputCheckbox id="hhTimers" @bind-Value="_m.TimersEnabled" @bind-Value:after="EmitAsync" class="form-check-input" />
<label class="form-check-label" for="hhTimers">Experimental timer reads</label>
<InputCheckbox aria-describedby="@FieldIds("hhTimers-hint")" id="@FieldId("hhTimers")" @bind-Value="_m.TimersEnabled" @bind-Value:after="EmitAsync" class="form-check-input" />
<label class="form-check-label" for="@FieldId("hhTimers")">Experimental timer reads</label>
</div>
<div class="form-text">Selectors 30–34. Units/semantics unverified on real controls — confirm before using as durations.</div>
<div id="@FieldId("hhTimers-hint")" class="form-text">Selectors 30–34. Units/semantics unverified on real controls — confirm before using as durations.</div>
</div>
</div>
<div class="form-text">Intervals 100–3600000 ms. OPC reads and subscriptions are served from the cache; sampling cannot exceed these cadences.</div>
@@ -117,6 +126,11 @@
<DriverResilienceSection ResilienceConfig="@ResilienceConfig" ResilienceConfigChanged="OnResilienceChanged" />
@code {
private readonly string _fieldScope = "heidenhain-driver-form-" + Guid.NewGuid().ToString("N");
private string FieldIds(params string[] names) => string.Join(" ", names.Select(FieldId));
private string FieldId(string name) => $"{_fieldScope}-{name}";
[CascadingParameter] private Microsoft.AspNetCore.Components.Forms.EditContext? _fieldEditContext { get; set; }
/// <summary>The driver-level DriverConfig JSON.</summary>
[Parameter] public string DriverConfigJson { get; set; } = "{}";
/// <summary>Fired whenever a field changes — enables @bind-DriverConfigJson.</summary>
@@ -14,13 +14,14 @@
<div style="padding:1rem">
<div class="row g-3">
<div class="col-md-3">
<label class="form-label">Timeout (seconds)</label>
<InputNumber @bind-Value="_form.TimeoutSeconds" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div class="form-text">Default 2 s.</div>
<label for="@FieldId("field-01")" class="form-label">Timeout (seconds)</label>
<InputNumber aria-describedby="@FieldIds("field-01-error", "field-01-hint")" id="@FieldId("field-01")" @bind-Value="_form.TimeoutSeconds" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div id="@FieldId("field-01-error")" class="field-error">@if (_fieldEditContext is not null) { <ValidationMessage For="@(() => _form.TimeoutSeconds)" /> }</div>
<div id="@FieldId("field-01-hint")" class="form-text">Default 2 s.</div>
</div>
<div class="col-md-3">
<label class="form-label">PLC family</label>
<InputSelect @bind-Value="_form.Family" @bind-Value:after="EmitAsync" class="form-select form-select-sm">
<label for="@FieldId("field-02")" class="form-label">PLC family</label>
<InputSelect id="@FieldId("field-02")" @bind-Value="_form.Family" @bind-Value:after="EmitAsync" class="form-select form-select-sm">
@foreach (var e in Enum.GetValues<ModbusFamily>())
{
<option value="@e">@e</option>
@@ -28,29 +29,29 @@
</InputSelect>
</div>
<div class="col-md-3">
<label class="form-label">Transport</label>
<InputSelect @bind-Value="_form.Transport" @bind-Value:after="EmitAsync" class="form-select form-select-sm">
<label for="@FieldId("field-03")" class="form-label">Transport</label>
<InputSelect aria-describedby="@FieldIds("field-03-hint")" id="@FieldId("field-03")" @bind-Value="_form.Transport" @bind-Value:after="EmitAsync" class="form-select form-select-sm">
@foreach (var e in Enum.GetValues<ModbusTransportMode>())
{
<option value="@e">@e</option>
}
</InputSelect>
<div class="form-text">RtuOverTcp = talk raw RTU frames to a serial→Ethernet gateway; must match the gateway's mode.</div>
<div id="@FieldId("field-03-hint")" class="form-text">RtuOverTcp = talk raw RTU frames to a serial→Ethernet gateway; must match the gateway's mode.</div>
</div>
<div class="col-md-3">
<label class="form-label">MELSEC sub-family</label>
<InputSelect @bind-Value="_form.MelsecSubFamily" @bind-Value:after="EmitAsync" class="form-select form-select-sm">
<label for="@FieldId("field-04")" class="form-label">MELSEC sub-family</label>
<InputSelect aria-describedby="@FieldIds("field-04-hint")" id="@FieldId("field-04")" @bind-Value="_form.MelsecSubFamily" @bind-Value:after="EmitAsync" class="form-select form-select-sm">
@foreach (var e in Enum.GetValues<MelsecFamily>())
{
<option value="@e">@e</option>
}
</InputSelect>
<div class="form-text">Only used when Family = MELSEC.</div>
<div id="@FieldId("field-04-hint")" class="form-text">Only used when Family = MELSEC.</div>
</div>
<div class="col-md-3">
<div class="form-check form-switch mt-4">
<InputCheckbox @bind-Value="_form.AutoReconnect" @bind-Value:after="EmitAsync" class="form-check-input" id="autoReconnect" />
<label class="form-check-label" for="autoReconnect">Auto-reconnect</label>
<InputCheckbox @bind-Value="_form.AutoReconnect" @bind-Value:after="EmitAsync" class="form-check-input" id="@FieldId("autoReconnect")" />
<label class="form-check-label" for="@FieldId("autoReconnect")">Auto-reconnect</label>
</div>
</div>
</div>
@@ -63,29 +64,33 @@
<div style="padding:1rem">
<div class="row g-3">
<div class="col-md-3">
<label class="form-label">Max registers per read</label>
<InputNumber @bind-Value="_form.MaxRegistersPerRead" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div class="form-text">Spec max 125. Reduce for limited devices.</div>
<label for="@FieldId("field-06")" class="form-label">Max registers per read</label>
<InputNumber aria-describedby="@FieldIds("field-06-error", "field-06-hint")" id="@FieldId("field-06")" @bind-Value="_form.MaxRegistersPerRead" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div id="@FieldId("field-06-error")" class="field-error">@if (_fieldEditContext is not null) { <ValidationMessage For="@(() => _form.MaxRegistersPerRead)" /> }</div>
<div id="@FieldId("field-06-hint")" class="form-text">Spec max 125. Reduce for limited devices.</div>
</div>
<div class="col-md-3">
<label class="form-label">Max registers per write</label>
<InputNumber @bind-Value="_form.MaxRegistersPerWrite" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div class="form-text">Spec max 123.</div>
<label for="@FieldId("field-07")" class="form-label">Max registers per write</label>
<InputNumber aria-describedby="@FieldIds("field-07-error", "field-07-hint")" id="@FieldId("field-07")" @bind-Value="_form.MaxRegistersPerWrite" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div id="@FieldId("field-07-error")" class="field-error">@if (_fieldEditContext is not null) { <ValidationMessage For="@(() => _form.MaxRegistersPerWrite)" /> }</div>
<div id="@FieldId("field-07-hint")" class="form-text">Spec max 123.</div>
</div>
<div class="col-md-3">
<label class="form-label">Max coils per read</label>
<InputNumber @bind-Value="_form.MaxCoilsPerRead" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div class="form-text">Spec max 2000.</div>
<label for="@FieldId("field-08")" class="form-label">Max coils per read</label>
<InputNumber aria-describedby="@FieldIds("field-08-error", "field-08-hint")" id="@FieldId("field-08")" @bind-Value="_form.MaxCoilsPerRead" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div id="@FieldId("field-08-error")" class="field-error">@if (_fieldEditContext is not null) { <ValidationMessage For="@(() => _form.MaxCoilsPerRead)" /> }</div>
<div id="@FieldId("field-08-hint")" class="form-text">Spec max 2000.</div>
</div>
<div class="col-md-3">
<label class="form-label">Max read gap (coalescing)</label>
<InputNumber @bind-Value="_form.MaxReadGap" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div class="form-text">0 = no coalescing. Default 8. Refused ranges fall back per tag.</div>
<label for="@FieldId("field-09")" class="form-label">Max read gap (coalescing)</label>
<InputNumber aria-describedby="@FieldIds("field-09-error", "field-09-hint")" id="@FieldId("field-09")" @bind-Value="_form.MaxReadGap" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div id="@FieldId("field-09-error")" class="field-error">@if (_fieldEditContext is not null) { <ValidationMessage For="@(() => _form.MaxReadGap)" /> }</div>
<div id="@FieldId("field-09-hint")" class="form-text">0 = no coalescing. Default 8. Refused ranges fall back per tag.</div>
</div>
<div class="col-md-3">
<div class="form-check form-switch mt-4">
<InputCheckbox @bind-Value="_form.DisableReadCoalescing" @bind-Value:after="EmitAsync" class="form-check-input" id="disableCoalescing" />
<label class="form-check-label" for="disableCoalescing">Disable read coalescing</label>
<InputCheckbox @bind-Value="_form.DisableReadCoalescing" @bind-Value:after="EmitAsync" class="form-check-input" id="@FieldId("disableCoalescing")" />
<label class="form-check-label" for="@FieldId("disableCoalescing")">Disable read coalescing</label>
</div>
</div>
</div>
@@ -99,32 +104,32 @@
<div class="row g-3">
<div class="col-md-4">
<div class="form-check form-switch">
<InputCheckbox @bind-Value="_form.UseFC15ForSingleCoilWrites" @bind-Value:after="EmitAsync" class="form-check-input" id="useFC15" />
<label class="form-check-label" for="useFC15">Use FC15 for single coil writes</label>
<InputCheckbox @bind-Value="_form.UseFC15ForSingleCoilWrites" @bind-Value:after="EmitAsync" class="form-check-input" id="@FieldId("useFC15")" />
<label class="form-check-label" for="@FieldId("useFC15")">Use FC15 for single coil writes</label>
</div>
</div>
<div class="col-md-4">
<div class="form-check form-switch">
<InputCheckbox @bind-Value="_form.UseFC16ForSingleRegisterWrites" @bind-Value:after="EmitAsync" class="form-check-input" id="useFC16" />
<label class="form-check-label" for="useFC16">Use FC16 for single register writes</label>
<InputCheckbox @bind-Value="_form.UseFC16ForSingleRegisterWrites" @bind-Value:after="EmitAsync" class="form-check-input" id="@FieldId("useFC16")" />
<label class="form-check-label" for="@FieldId("useFC16")">Use FC16 for single register writes</label>
</div>
</div>
<div class="col-md-4">
<div class="form-check form-switch">
<InputCheckbox @bind-Value="_form.DisableFC23" @bind-Value:after="EmitAsync" class="form-check-input" id="disableFC23" />
<label class="form-check-label" for="disableFC23">Disable FC23 (never send FC23, even when opted in below)</label>
<InputCheckbox @bind-Value="_form.DisableFC23" @bind-Value:after="EmitAsync" class="form-check-input" id="@FieldId("disableFC23")" />
<label class="form-check-label" for="@FieldId("disableFC23")">Disable FC23 (never send FC23, even when opted in below)</label>
</div>
</div>
<div class="col-md-4">
<div class="form-check form-switch">
<InputCheckbox @bind-Value="_form.UseFC23ForMultiRegisterWrites" @bind-Value:after="EmitAsync" class="form-check-input" id="useFC23" />
<label class="form-check-label" for="useFC23">Use FC23 write + read-back for multi-register writes (opt-in; default FC16)</label>
<InputCheckbox @bind-Value="_form.UseFC23ForMultiRegisterWrites" @bind-Value:after="EmitAsync" class="form-check-input" id="@FieldId("useFC23")" />
<label class="form-check-label" for="@FieldId("useFC23")">Use FC23 write + read-back for multi-register writes (opt-in; default FC16)</label>
</div>
</div>
<div class="col-md-4">
<div class="form-check form-switch">
<InputCheckbox @bind-Value="_form.WriteOnChangeOnly" @bind-Value:after="EmitAsync" class="form-check-input" id="writeOnChangeOnly" />
<label class="form-check-label" for="writeOnChangeOnly">Write on change only</label>
<InputCheckbox @bind-Value="_form.WriteOnChangeOnly" @bind-Value:after="EmitAsync" class="form-check-input" id="@FieldId("writeOnChangeOnly")" />
<label class="form-check-label" for="@FieldId("writeOnChangeOnly")">Write on change only</label>
</div>
</div>
</div>
@@ -138,24 +143,27 @@
<div class="row g-3">
<div class="col-md-3">
<div class="form-check form-switch mt-4">
<InputCheckbox @bind-Value="_form.KeepAliveEnabled" @bind-Value:after="EmitAsync" class="form-check-input" id="kaEnabled" />
<label class="form-check-label" for="kaEnabled">Enabled</label>
<InputCheckbox @bind-Value="_form.KeepAliveEnabled" @bind-Value:after="EmitAsync" class="form-check-input" id="@FieldId("kaEnabled")" />
<label class="form-check-label" for="@FieldId("kaEnabled")">Enabled</label>
</div>
</div>
<div class="col-md-3">
<label class="form-label">Time (seconds)</label>
<InputNumber @bind-Value="_form.KeepAliveTimeSeconds" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div class="form-text">Idle time before first probe. Default 30 s.</div>
<label for="@FieldId("field-17")" class="form-label">Time (seconds)</label>
<InputNumber aria-describedby="@FieldIds("field-17-error", "field-17-hint")" id="@FieldId("field-17")" @bind-Value="_form.KeepAliveTimeSeconds" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div id="@FieldId("field-17-error")" class="field-error">@if (_fieldEditContext is not null) { <ValidationMessage For="@(() => _form.KeepAliveTimeSeconds)" /> }</div>
<div id="@FieldId("field-17-hint")" class="form-text">Idle time before first probe. Default 30 s.</div>
</div>
<div class="col-md-3">
<label class="form-label">Interval (seconds)</label>
<InputNumber @bind-Value="_form.KeepAliveIntervalSeconds" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div class="form-text">Between probes once started. Default 10 s.</div>
<label for="@FieldId("field-18")" class="form-label">Interval (seconds)</label>
<InputNumber aria-describedby="@FieldIds("field-18-error", "field-18-hint")" id="@FieldId("field-18")" @bind-Value="_form.KeepAliveIntervalSeconds" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div id="@FieldId("field-18-error")" class="field-error">@if (_fieldEditContext is not null) { <ValidationMessage For="@(() => _form.KeepAliveIntervalSeconds)" /> }</div>
<div id="@FieldId("field-18-hint")" class="form-text">Between probes once started. Default 10 s.</div>
</div>
<div class="col-md-3">
<label class="form-label">Retry count</label>
<InputNumber @bind-Value="_form.KeepAliveRetryCount" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div class="form-text">Probes before declaring socket dead. Default 3.</div>
<label for="@FieldId("field-19")" class="form-label">Retry count</label>
<InputNumber aria-describedby="@FieldIds("field-19-error", "field-19-hint")" id="@FieldId("field-19")" @bind-Value="_form.KeepAliveRetryCount" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div id="@FieldId("field-19-error")" class="field-error">@if (_fieldEditContext is not null) { <ValidationMessage For="@(() => _form.KeepAliveRetryCount)" /> }</div>
<div id="@FieldId("field-19-hint")" class="form-text">Probes before declaring socket dead. Default 3.</div>
</div>
</div>
</div>
@@ -167,24 +175,28 @@
<div style="padding:1rem">
<div class="row g-3">
<div class="col-md-3">
<label class="form-label">Initial delay (seconds)</label>
<InputNumber @bind-Value="_form.ReconnectInitialDelaySeconds" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div class="form-text">0 = immediate retry.</div>
<label for="@FieldId("field-20")" class="form-label">Initial delay (seconds)</label>
<InputNumber aria-describedby="@FieldIds("field-20-error", "field-20-hint")" id="@FieldId("field-20")" @bind-Value="_form.ReconnectInitialDelaySeconds" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div id="@FieldId("field-20-error")" class="field-error">@if (_fieldEditContext is not null) { <ValidationMessage For="@(() => _form.ReconnectInitialDelaySeconds)" /> }</div>
<div id="@FieldId("field-20-hint")" class="form-text">0 = immediate retry.</div>
</div>
<div class="col-md-3">
<label class="form-label">Max delay (seconds)</label>
<InputNumber @bind-Value="_form.ReconnectMaxDelaySeconds" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div class="form-text">Default 30 s.</div>
<label for="@FieldId("field-21")" class="form-label">Max delay (seconds)</label>
<InputNumber aria-describedby="@FieldIds("field-21-error", "field-21-hint")" id="@FieldId("field-21")" @bind-Value="_form.ReconnectMaxDelaySeconds" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div id="@FieldId("field-21-error")" class="field-error">@if (_fieldEditContext is not null) { <ValidationMessage For="@(() => _form.ReconnectMaxDelaySeconds)" /> }</div>
<div id="@FieldId("field-21-hint")" class="form-text">Default 30 s.</div>
</div>
<div class="col-md-3">
<label class="form-label">Backoff multiplier</label>
<InputNumber @bind-Value="_form.ReconnectBackoffMultiplier" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div class="form-text">Default 2.0 (doubles each step).</div>
<label for="@FieldId("field-22")" class="form-label">Backoff multiplier</label>
<InputNumber aria-describedby="@FieldIds("field-22-error", "field-22-hint")" id="@FieldId("field-22")" @bind-Value="_form.ReconnectBackoffMultiplier" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div id="@FieldId("field-22-error")" class="field-error">@if (_fieldEditContext is not null) { <ValidationMessage For="@(() => _form.ReconnectBackoffMultiplier)" /> }</div>
<div id="@FieldId("field-22-hint")" class="form-text">Default 2.0 (doubles each step).</div>
</div>
<div class="col-md-3">
<label class="form-label">Idle disconnect (seconds, 0 = off)</label>
<InputNumber @bind-Value="_form.IdleDisconnectTimeoutSeconds" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div class="form-text">Proactive close after idle period. 0 = disabled.</div>
<label for="@FieldId("field-23")" class="form-label">Idle disconnect (seconds, 0 = off)</label>
<InputNumber aria-describedby="@FieldIds("field-23-error", "field-23-hint")" id="@FieldId("field-23")" @bind-Value="_form.IdleDisconnectTimeoutSeconds" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div id="@FieldId("field-23-error")" class="field-error">@if (_fieldEditContext is not null) { <ValidationMessage For="@(() => _form.IdleDisconnectTimeoutSeconds)" /> }</div>
<div id="@FieldId("field-23-hint")" class="form-text">Proactive close after idle period. 0 = disabled.</div>
</div>
</div>
</div>
@@ -197,34 +209,39 @@
<div class="row g-3">
<div class="col-md-3">
<div class="form-check form-switch mt-4">
<InputCheckbox @bind-Value="_form.ProbeEnabled" @bind-Value:after="EmitAsync" class="form-check-input" id="probeEnabled" />
<label class="form-check-label" for="probeEnabled">Enabled</label>
<InputCheckbox @bind-Value="_form.ProbeEnabled" @bind-Value:after="EmitAsync" class="form-check-input" id="@FieldId("probeEnabled")" />
<label class="form-check-label" for="@FieldId("probeEnabled")">Enabled</label>
</div>
</div>
<div class="col-md-3">
<label class="form-label">Probe interval (seconds)</label>
<InputNumber @bind-Value="_form.ProbeIntervalSeconds" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div class="form-text">Default 5 s.</div>
<label for="@FieldId("field-25")" class="form-label">Probe interval (seconds)</label>
<InputNumber aria-describedby="@FieldIds("field-25-error", "field-25-hint")" id="@FieldId("field-25")" @bind-Value="_form.ProbeIntervalSeconds" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div id="@FieldId("field-25-error")" class="field-error">@if (_fieldEditContext is not null) { <ValidationMessage For="@(() => _form.ProbeIntervalSeconds)" /> }</div>
<div id="@FieldId("field-25-hint")" class="form-text">Default 5 s.</div>
</div>
<div class="col-md-3">
<label class="form-label">Probe timeout (seconds)</label>
<InputNumber @bind-Value="_form.ProbeTimeoutSeconds" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div class="form-text">Default 2 s.</div>
<label for="@FieldId("field-26")" class="form-label">Probe timeout (seconds)</label>
<InputNumber aria-describedby="@FieldIds("field-26-error", "field-26-hint")" id="@FieldId("field-26")" @bind-Value="_form.ProbeTimeoutSeconds" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div id="@FieldId("field-26-error")" class="field-error">@if (_fieldEditContext is not null) { <ValidationMessage For="@(() => _form.ProbeTimeoutSeconds)" /> }</div>
<div id="@FieldId("field-26-hint")" class="form-text">Default 2 s.</div>
</div>
<div class="col-md-3">
<label class="form-label">Probe register address</label>
<InputNumber @bind-Value="_form.ProbeAddress" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div class="form-text">Zero-based. Default 0 (FC03 at register 0).</div>
<label for="@FieldId("field-27")" class="form-label">Probe register address</label>
<InputNumber aria-describedby="@FieldIds("field-27-error", "field-27-hint")" id="@FieldId("field-27")" @bind-Value="_form.ProbeAddress" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div id="@FieldId("field-27-error")" class="field-error">@if (_fieldEditContext is not null) { <ValidationMessage For="@(() => _form.ProbeAddress)" /> }</div>
<div id="@FieldId("field-27-hint")" class="form-text">Zero-based. Default 0 (FC03 at register 0).</div>
</div>
<div class="col-md-3">
<label class="form-label">Admin UI probe timeout (seconds)</label>
<InputNumber @bind-Value="_form.AdminProbeTimeoutSeconds" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div class="form-text">Max 60. Used by Test Connect. Default 5.</div>
<label for="@FieldId("field-28")" class="form-label">Admin UI probe timeout (seconds)</label>
<InputNumber aria-describedby="@FieldIds("field-28-error", "field-28-hint")" id="@FieldId("field-28")" @bind-Value="_form.AdminProbeTimeoutSeconds" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div id="@FieldId("field-28-error")" class="field-error">@if (_fieldEditContext is not null) { <ValidationMessage For="@(() => _form.AdminProbeTimeoutSeconds)" /> }</div>
<div id="@FieldId("field-28-hint")" class="form-text">Max 60. Used by Test Connect. Default 5.</div>
</div>
<div class="col-md-3">
<label class="form-label">Auto-prohibit re-probe interval (seconds, 0 = off)</label>
<InputNumber @bind-Value="_form.AutoProhibitReprobeIntervalSeconds" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div class="form-text">Interval to retry auto-prohibited coalesced ranges.</div>
<label for="@FieldId("field-29")" class="form-label">Auto-prohibit re-probe interval (seconds, 0 = off)</label>
<InputNumber aria-describedby="@FieldIds("field-29-error", "field-29-hint")" id="@FieldId("field-29")" @bind-Value="_form.AutoProhibitReprobeIntervalSeconds" @bind-Value:after="EmitAsync" class="form-control form-control-sm" />
<div id="@FieldId("field-29-error")" class="field-error">@if (_fieldEditContext is not null) { <ValidationMessage For="@(() => _form.AutoProhibitReprobeIntervalSeconds)" /> }</div>
<div id="@FieldId("field-29-hint")" class="form-text">Interval to retry auto-prohibited coalesced ranges.</div>
</div>
</div>
</div>
@@ -233,6 +250,11 @@
<DriverResilienceSection ResilienceConfig="@ResilienceConfig" ResilienceConfigChanged="OnResilienceChanged" />
@code {
private readonly string _fieldScope = "modbus-driver-form-" + Guid.NewGuid().ToString("N");
private string FieldIds(params string[] names) => string.Join(" ", names.Select(FieldId));
private string FieldId(string name) => $"{_fieldScope}-{name}";
[CascadingParameter] private Microsoft.AspNetCore.Components.Forms.EditContext? _fieldEditContext { get; set; }
/// <summary>The driver-level DriverConfig JSON (protocol/channel; endpoint lives in the device).</summary>
[Parameter] public string DriverConfigJson { get; set; } = "{}";
/// <summary>Fired (camelCase-serialized) whenever a channel field changes — enables @bind-DriverConfigJson.</summary>