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))