Associate protocol tag fields batch 2
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
[
|
||||
{
|
||||
"tag": "input",
|
||||
"key": "field-01",
|
||||
"labelsAdded": [
|
||||
"Address (text, optional)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"tag": "select",
|
||||
"key": "field-02",
|
||||
"labelsAdded": [
|
||||
"Region"
|
||||
]
|
||||
},
|
||||
{
|
||||
"tag": "input",
|
||||
"key": "field-03",
|
||||
"labelsAdded": [
|
||||
"Address"
|
||||
]
|
||||
},
|
||||
{
|
||||
"tag": "select",
|
||||
"key": "field-04",
|
||||
"labelsAdded": [
|
||||
"Data type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"tag": "select",
|
||||
"key": "field-05",
|
||||
"labelsAdded": [
|
||||
"Byte order"
|
||||
]
|
||||
},
|
||||
{
|
||||
"tag": "input",
|
||||
"key": "field-06",
|
||||
"labelsAdded": [
|
||||
"Bit index"
|
||||
]
|
||||
},
|
||||
{
|
||||
"tag": "input",
|
||||
"key": "field-07",
|
||||
"labelsAdded": [
|
||||
"String len"
|
||||
]
|
||||
},
|
||||
{
|
||||
"tag": "input",
|
||||
"key": "modbus-writable",
|
||||
"labelsAdded": []
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,77 @@
|
||||
[
|
||||
{
|
||||
"tag": "select",
|
||||
"key": "mqtt-mode",
|
||||
"labelsAdded": []
|
||||
},
|
||||
{
|
||||
"tag": "input",
|
||||
"key": "mqtt-topic",
|
||||
"labelsAdded": []
|
||||
},
|
||||
{
|
||||
"tag": "input",
|
||||
"key": "mqtt-write-topic",
|
||||
"labelsAdded": []
|
||||
},
|
||||
{
|
||||
"tag": "select",
|
||||
"key": "mqtt-payload-format",
|
||||
"labelsAdded": []
|
||||
},
|
||||
{
|
||||
"tag": "input",
|
||||
"key": "mqtt-json-path",
|
||||
"labelsAdded": []
|
||||
},
|
||||
{
|
||||
"tag": "select",
|
||||
"key": "mqtt-data-type",
|
||||
"labelsAdded": []
|
||||
},
|
||||
{
|
||||
"tag": "select",
|
||||
"key": "mqtt-qos",
|
||||
"labelsAdded": []
|
||||
},
|
||||
{
|
||||
"tag": "select",
|
||||
"key": "mqtt-retain-seed",
|
||||
"labelsAdded": []
|
||||
},
|
||||
{
|
||||
"tag": "input",
|
||||
"key": "mqtt-sp-group",
|
||||
"labelsAdded": []
|
||||
},
|
||||
{
|
||||
"tag": "input",
|
||||
"key": "mqtt-sp-node",
|
||||
"labelsAdded": []
|
||||
},
|
||||
{
|
||||
"tag": "input",
|
||||
"key": "mqtt-sp-device",
|
||||
"labelsAdded": []
|
||||
},
|
||||
{
|
||||
"tag": "input",
|
||||
"key": "mqtt-sp-metric",
|
||||
"labelsAdded": []
|
||||
},
|
||||
{
|
||||
"tag": "select",
|
||||
"key": "mqtt-sp-data-type",
|
||||
"labelsAdded": []
|
||||
},
|
||||
{
|
||||
"tag": "select",
|
||||
"key": "mqtt-sp-qos",
|
||||
"labelsAdded": []
|
||||
},
|
||||
{
|
||||
"tag": "select",
|
||||
"key": "mqtt-sp-retain-seed",
|
||||
"labelsAdded": []
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,9 @@
|
||||
[
|
||||
{
|
||||
"tag": "input",
|
||||
"key": "field-01",
|
||||
"labelsAdded": [
|
||||
"Upstream node reference (NodeId)"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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: 170, Skipped: 0, Total: 170, Duration: 182 ms - ZB.MOM.WW.OtOpcUa.AdminUI.Tests.dll (net10.0)
|
||||
+21
-16
@@ -4,12 +4,13 @@
|
||||
@using ZB.MOM.WW.OtOpcUa.AdminUI.Components.Shared.Drivers.Pickers
|
||||
|
||||
<div class="row g-2">
|
||||
<div class="col-md-8"><label class="form-label">Address (text, optional)</label>
|
||||
<input type="text" class="form-control form-control-sm" placeholder="e.g. 40001:F:CDAB, V2000 (DL205), D100 (MELSEC)"
|
||||
<div class="col-md-8"><label for="@FieldId("field-01")" class="form-label">Address (text, optional)</label>
|
||||
<input aria-describedby="@FieldId("address-feedback")" aria-invalid="@(_addressError is not null ? "true" : null)" id="@FieldId("field-01")" type="text" class="form-control form-control-sm" placeholder="e.g. 40001:F:CDAB, V2000 (DL205), D100 (MELSEC)"
|
||||
value="@_addressText" @onchange="@(e => _addressText = e.Value?.ToString())" /></div>
|
||||
<div class="col-md-4 d-flex align-items-end">
|
||||
<button type="button" class="btn btn-sm btn-outline-secondary" @onclick="ResolveAddressAsync">Resolve with driver family</button>
|
||||
</div>
|
||||
<div id="@FieldId("address-feedback")" class="col-12" role="@(_addressError is not null ? "alert" : null)">
|
||||
@if (_addressError is not null)
|
||||
{
|
||||
<div class="col-12"><div class="form-text text-danger">@_addressError</div></div>
|
||||
@@ -40,33 +41,34 @@
|
||||
{
|
||||
<div class="col-12"><div class="form-text text-warning">This tag names no address yet: set a field below or resolve an address string. The driver refuses it until then.</div></div>
|
||||
}
|
||||
<div class="col-md-4"><label class="form-label">Region</label>
|
||||
<select class="form-select form-select-sm" value="@_m.Region" @onchange="@(e => UpdateAddress(() => _m.SetRegion(ParseEnum(e.Value, ModbusRegion.HoldingRegisters))))">
|
||||
</div>
|
||||
<div class="col-md-4"><label for="@FieldId("field-02")" class="form-label">Region</label>
|
||||
<select id="@FieldId("field-02")" class="form-select form-select-sm" value="@_m.Region" @onchange="@(e => UpdateAddress(() => _m.SetRegion(ParseEnum(e.Value, ModbusRegion.HoldingRegisters))))">
|
||||
@foreach (var v in Enum.GetValues<ModbusRegion>()) { <option value="@v">@v</option> }
|
||||
</select></div>
|
||||
<div class="col-md-2"><label class="form-label">Address</label>
|
||||
<input type="number" class="form-control form-control-sm" value="@_m.Address" @onchange="@(e => UpdateAddress(() => _m.Address = ParseInt(e.Value)))" /></div>
|
||||
<div class="col-md-3"><label class="form-label">Data type</label>
|
||||
<select class="form-select form-select-sm" value="@_m.DataType" @onchange="@(e => UpdateAddress(() => _m.DataType = ParseEnum(e.Value, ModbusDataType.Int16)))">
|
||||
<div class="col-md-2"><label for="@FieldId("field-03")" class="form-label">Address</label>
|
||||
<input id="@FieldId("field-03")" type="number" class="form-control form-control-sm" value="@_m.Address" @onchange="@(e => UpdateAddress(() => _m.Address = ParseInt(e.Value)))" /></div>
|
||||
<div class="col-md-3"><label for="@FieldId("field-04")" class="form-label">Data type</label>
|
||||
<select id="@FieldId("field-04")" class="form-select form-select-sm" value="@_m.DataType" @onchange="@(e => UpdateAddress(() => _m.DataType = ParseEnum(e.Value, ModbusDataType.Int16)))">
|
||||
@foreach (var v in Enum.GetValues<ModbusDataType>()) { <option value="@v">@v</option> }
|
||||
</select></div>
|
||||
<div class="col-md-3"><label class="form-label">Byte order</label>
|
||||
<select class="form-select form-select-sm" value="@_m.ByteOrder" @onchange="@(e => UpdateAddress(() => _m.ByteOrder = ParseEnum(e.Value, ModbusByteOrder.BigEndian)))">
|
||||
<div class="col-md-3"><label for="@FieldId("field-05")" class="form-label">Byte order</label>
|
||||
<select id="@FieldId("field-05")" class="form-select form-select-sm" value="@_m.ByteOrder" @onchange="@(e => UpdateAddress(() => _m.ByteOrder = ParseEnum(e.Value, ModbusByteOrder.BigEndian)))">
|
||||
@foreach (var v in Enum.GetValues<ModbusByteOrder>()) { <option value="@v">@v</option> }
|
||||
</select></div>
|
||||
<div class="col-md-2"><label class="form-label">Bit index</label>
|
||||
<input type="number" class="form-control form-control-sm" value="@_m.BitIndex" @onchange="@(e => UpdateAddress(() => _m.BitIndex = ParseInt(e.Value)))" /></div>
|
||||
<div class="col-md-2"><label class="form-label">String len</label>
|
||||
<input type="number" class="form-control form-control-sm" value="@_m.StringLength" @onchange="@(e => UpdateAddress(() => _m.StringLength = ParseInt(e.Value)))" /></div>
|
||||
<div class="col-md-2"><label for="@FieldId("field-06")" class="form-label">Bit index</label>
|
||||
<input id="@FieldId("field-06")" type="number" class="form-control form-control-sm" value="@_m.BitIndex" @onchange="@(e => UpdateAddress(() => _m.BitIndex = ParseInt(e.Value)))" /></div>
|
||||
<div class="col-md-2"><label for="@FieldId("field-07")" class="form-label">String len</label>
|
||||
<input id="@FieldId("field-07")" type="number" class="form-control form-control-sm" value="@_m.StringLength" @onchange="@(e => UpdateAddress(() => _m.StringLength = ParseInt(e.Value)))" /></div>
|
||||
<div class="col-12 mt-1">
|
||||
<button type="button" class="btn btn-sm btn-outline-secondary" @onclick="@(() => _showPicker = true)">Build address</button>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" id="modbus-writable"
|
||||
<input type="checkbox" class="form-check-input" id="@FieldId("modbus-writable")"
|
||||
checked="@(_m.Writable ?? true)"
|
||||
@onchange="@(e => Update(() => _m.Writable = e.Value is bool b && b))" />
|
||||
<label class="form-check-label small" for="modbus-writable">Writable (uncheck for a read-only tag)</label>
|
||||
<label class="form-check-label small" for="@FieldId("modbus-writable")">Writable (uncheck for a read-only tag)</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -83,6 +85,9 @@
|
||||
}
|
||||
|
||||
@code {
|
||||
private readonly string _fieldScope = "modbus-tag-config-editor-" + Guid.NewGuid().ToString("N");
|
||||
private string FieldId(string name) => $"{_fieldScope}-{name}";
|
||||
|
||||
[Parameter] public string? ConfigJson { get; set; }
|
||||
[Parameter] public EventCallback<string> ConfigJsonChanged { get; set; }
|
||||
/// <summary>DriverType of the selected driver — lets browse-capable pickers open a universal session.</summary>
|
||||
|
||||
+41
-37
@@ -14,8 +14,8 @@
|
||||
|
||||
<div class="row g-2">
|
||||
<div class="col-md-4">
|
||||
<label class="form-label" for="mqtt-mode">Tag shape</label>
|
||||
<select id="mqtt-mode" class="form-select form-select-sm" value="@_m.Mode"
|
||||
<label class="form-label" for="@FieldId("mqtt-mode")">Tag shape</label>
|
||||
<select id="@FieldId("mqtt-mode")" class="form-select form-select-sm" value="@_m.Mode"
|
||||
@onchange="@(e => Update(() => _m.Mode = ParseEnum(e.Value, MqttMode.Plain)))">
|
||||
@foreach (var v in Enum.GetValues<MqttMode>()) { <option value="@v">@v</option> }
|
||||
</select>
|
||||
@@ -24,18 +24,18 @@
|
||||
@if (_m.Mode == MqttMode.Plain)
|
||||
{
|
||||
<div class="col-md-8">
|
||||
<label class="form-label" for="mqtt-topic">Topic</label>
|
||||
<input id="mqtt-topic" type="text" class="form-control form-control-sm mono"
|
||||
<label class="form-label" for="@FieldId("mqtt-topic")">Topic</label>
|
||||
<input aria-describedby="@FieldIds("mqtt-topic-hint")" id="@FieldId("mqtt-topic")" type="text" class="form-control form-control-sm mono"
|
||||
placeholder="factory/oven/temp" value="@_m.Topic"
|
||||
@onchange="@(e => Update(() => _m.Topic = e.Value?.ToString() ?? ""))" />
|
||||
<div class="form-text">Concrete topic — MQTT wildcards (+ / #) are not valid for a tag.</div>
|
||||
<div id="@FieldId("mqtt-topic-hint")" class="form-text">Concrete topic — MQTT wildcards (+ / #) are not valid for a tag.</div>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<label class="form-label" for="mqtt-write-topic">Write topic <span class="text-muted">(optional)</span></label>
|
||||
<input id="mqtt-write-topic" type="text" class="form-control form-control-sm mono"
|
||||
<label class="form-label" for="@FieldId("mqtt-write-topic")">Write topic <span class="text-muted">(optional)</span></label>
|
||||
<input aria-describedby="@FieldIds("mqtt-write-topic-hint")" id="@FieldId("mqtt-write-topic")" type="text" class="form-control form-control-sm mono"
|
||||
placeholder="factory/oven/setpoint/set" value="@_m.WriteTopic"
|
||||
@onchange="@(e => Update(() => _m.WriteTopic = e.Value?.ToString() ?? ""))" />
|
||||
<div class="form-text">
|
||||
<div id="@FieldId("mqtt-write-topic-hint")" class="form-text">
|
||||
Where a write is published. Deliberately separate from the read topic — a tag commonly
|
||||
reads <code>…/state</code> and writes <code>…/set</code>. Leave blank for a
|
||||
read-only tag: a write is then refused (<code>BadNotWritable</code>) rather than published
|
||||
@@ -43,8 +43,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label class="form-label" for="mqtt-payload-format">Payload format</label>
|
||||
<select id="mqtt-payload-format" class="form-select form-select-sm" value="@_m.PayloadFormat"
|
||||
<label class="form-label" for="@FieldId("mqtt-payload-format")">Payload format</label>
|
||||
<select id="@FieldId("mqtt-payload-format")" class="form-select form-select-sm" value="@_m.PayloadFormat"
|
||||
@onchange="@(e => Update(() => _m.PayloadFormat = ParseEnum(e.Value, MqttPayloadFormat.Json)))">
|
||||
@foreach (var v in Enum.GetValues<MqttPayloadFormat>()) { <option value="@v">@v</option> }
|
||||
</select>
|
||||
@@ -52,25 +52,25 @@
|
||||
@if (_m.PayloadFormat == MqttPayloadFormat.Json)
|
||||
{
|
||||
<div class="col-md-4">
|
||||
<label class="form-label" for="mqtt-json-path">JSON path</label>
|
||||
<input id="mqtt-json-path" type="text" class="form-control form-control-sm mono"
|
||||
<label class="form-label" for="@FieldId("mqtt-json-path")">JSON path</label>
|
||||
<input aria-describedby="@FieldIds("mqtt-json-path-hint")" id="@FieldId("mqtt-json-path")" type="text" class="form-control form-control-sm mono"
|
||||
placeholder="$.value" value="@_m.JsonPath"
|
||||
@onchange="@(e => Update(() => _m.JsonPath = e.Value?.ToString() ?? ""))" />
|
||||
<div class="form-text">Use <code>$</code> for the whole document.</div>
|
||||
<div id="@FieldId("mqtt-json-path-hint")" class="form-text">Use <code>$</code> for the whole document.</div>
|
||||
</div>
|
||||
}
|
||||
<div class="col-md-4">
|
||||
<label class="form-label" for="mqtt-data-type">Data type</label>
|
||||
<label class="form-label" for="@FieldId("mqtt-data-type")">Data type</label>
|
||||
@* The driver's own DriverDataType members — authoring anything outside this set produces a
|
||||
blob the driver's strict parser rejects at deploy (there is no 'Double'; it is Float64). *@
|
||||
<select id="mqtt-data-type" class="form-select form-select-sm" value="@_m.DataType"
|
||||
<select id="@FieldId("mqtt-data-type")" class="form-select form-select-sm" value="@_m.DataType"
|
||||
@onchange="@(e => Update(() => _m.DataType = ParseEnum(e.Value, DriverDataType.String)))">
|
||||
@foreach (var v in Enum.GetValues<DriverDataType>()) { <option value="@v">@v</option> }
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label class="form-label" for="mqtt-qos">QoS</label>
|
||||
<select id="mqtt-qos" class="form-select form-select-sm" value="@(_m.Qos?.ToString() ?? "")"
|
||||
<label class="form-label" for="@FieldId("mqtt-qos")">QoS</label>
|
||||
<select id="@FieldId("mqtt-qos")" class="form-select form-select-sm" value="@(_m.Qos?.ToString() ?? "")"
|
||||
@onchange="@(e => Update(() => _m.Qos = ParseNullableInt(e.Value)))">
|
||||
<option value="">(driver default)</option>
|
||||
<option value="0">0 — at most once</option>
|
||||
@@ -79,8 +79,8 @@
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label class="form-label" for="mqtt-retain-seed">Retained-message seed</label>
|
||||
<select id="mqtt-retain-seed" class="form-select form-select-sm"
|
||||
<label class="form-label" for="@FieldId("mqtt-retain-seed")">Retained-message seed</label>
|
||||
<select id="@FieldId("mqtt-retain-seed")" class="form-select form-select-sm"
|
||||
value="@(_m.RetainSeed is null ? "" : _m.RetainSeed.Value ? "true" : "false")"
|
||||
@onchange="@(e => Update(() => _m.RetainSeed = ParseNullableBool(e.Value)))">
|
||||
<option value="">(driver default)</option>
|
||||
@@ -92,47 +92,47 @@
|
||||
else
|
||||
{
|
||||
<div class="col-md-4">
|
||||
<label class="form-label" for="mqtt-sp-group">Group ID</label>
|
||||
<input id="mqtt-sp-group" type="text" class="form-control form-control-sm mono"
|
||||
<label class="form-label" for="@FieldId("mqtt-sp-group")">Group ID</label>
|
||||
<input aria-describedby="@FieldIds("mqtt-sp-group-hint")" id="@FieldId("mqtt-sp-group")" type="text" class="form-control form-control-sm mono"
|
||||
placeholder="Plant1" value="@_m.GroupId"
|
||||
@onchange="@(e => Update(() => _m.GroupId = e.Value?.ToString() ?? ""))" />
|
||||
<div class="form-text">The driver subscribes <code>spBv1.0/@(string.IsNullOrEmpty(_m.GroupId) ? "{GroupId}" : _m.GroupId)/#</code>. No <code>/</code>, <code>+</code>, or <code>#</code>.</div>
|
||||
<div id="@FieldId("mqtt-sp-group-hint")" class="form-text">The driver subscribes <code>spBv1.0/@(string.IsNullOrEmpty(_m.GroupId) ? "{GroupId}" : _m.GroupId)/#</code>. No <code>/</code>, <code>+</code>, or <code>#</code>.</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label class="form-label" for="mqtt-sp-node">Edge node ID</label>
|
||||
<input id="mqtt-sp-node" type="text" class="form-control form-control-sm mono"
|
||||
<label class="form-label" for="@FieldId("mqtt-sp-node")">Edge node ID</label>
|
||||
<input aria-describedby="@FieldIds("mqtt-sp-node-hint")" id="@FieldId("mqtt-sp-node")" type="text" class="form-control form-control-sm mono"
|
||||
placeholder="EdgeA" value="@_m.EdgeNodeId"
|
||||
@onchange="@(e => Update(() => _m.EdgeNodeId = e.Value?.ToString() ?? ""))" />
|
||||
<div class="form-text">The publishing edge node's id.</div>
|
||||
<div id="@FieldId("mqtt-sp-node-hint")" class="form-text">The publishing edge node's id.</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label class="form-label" for="mqtt-sp-device">Device ID <span class="text-muted">(optional)</span></label>
|
||||
<input id="mqtt-sp-device" type="text" class="form-control form-control-sm mono"
|
||||
<label class="form-label" for="@FieldId("mqtt-sp-device")">Device ID <span class="text-muted">(optional)</span></label>
|
||||
<input aria-describedby="@FieldIds("mqtt-sp-device-hint")" id="@FieldId("mqtt-sp-device")" type="text" class="form-control form-control-sm mono"
|
||||
placeholder="(node-level metric)" value="@_m.DeviceId"
|
||||
@onchange="@(e => Update(() => _m.DeviceId = e.Value?.ToString() ?? ""))" />
|
||||
<div class="form-text">Leave blank for a metric published by the edge node itself.</div>
|
||||
<div id="@FieldId("mqtt-sp-device-hint")" class="form-text">Leave blank for a metric published by the edge node itself.</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="form-label" for="mqtt-sp-metric">Metric name</label>
|
||||
<input id="mqtt-sp-metric" type="text" class="form-control form-control-sm mono"
|
||||
<label class="form-label" for="@FieldId("mqtt-sp-metric")">Metric name</label>
|
||||
<input aria-describedby="@FieldIds("mqtt-sp-metric-hint")" id="@FieldId("mqtt-sp-metric")" type="text" class="form-control form-control-sm mono"
|
||||
placeholder="Node Control/Rebirth" value="@_m.MetricName"
|
||||
@onchange="@(e => Update(() => _m.MetricName = e.Value?.ToString() ?? ""))" />
|
||||
<div class="form-text">The metric's stable name from the birth certificate — unlike the ids above, this MAY contain <code>/</code> (e.g. <code>Properties/Hardware Make</code>).</div>
|
||||
<div id="@FieldId("mqtt-sp-metric-hint")" class="form-text">The metric's stable name from the birth certificate — unlike the ids above, this MAY contain <code>/</code> (e.g. <code>Properties/Hardware Make</code>).</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label class="form-label" for="mqtt-sp-data-type">Data type override</label>
|
||||
<label class="form-label" for="@FieldId("mqtt-sp-data-type")">Data type override</label>
|
||||
@* Same DriverDataType set as Plain's field — the factory reads a Sparkplug 'dataType' key as
|
||||
a DriverDataType override, not the raw wire SparkplugDataType. Absent ⇒ take whatever type
|
||||
the birth certificate declares (the driver's UntilStable discovery). *@
|
||||
<select id="mqtt-sp-data-type" class="form-select form-select-sm" value="@(_m.MetricDataType?.ToString() ?? "")"
|
||||
<select id="@FieldId("mqtt-sp-data-type")" class="form-select form-select-sm" value="@(_m.MetricDataType?.ToString() ?? "")"
|
||||
@onchange="@(e => Update(() => _m.MetricDataType = ParseNullableEnum<DriverDataType>(e.Value)))">
|
||||
<option value="">(from birth certificate)</option>
|
||||
@foreach (var v in Enum.GetValues<DriverDataType>()) { <option value="@v">@v</option> }
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label class="form-label" for="mqtt-sp-qos">QoS</label>
|
||||
<select id="mqtt-sp-qos" class="form-select form-select-sm" value="@(_m.Qos?.ToString() ?? "")"
|
||||
<label class="form-label" for="@FieldId("mqtt-sp-qos")">QoS</label>
|
||||
<select id="@FieldId("mqtt-sp-qos")" class="form-select form-select-sm" value="@(_m.Qos?.ToString() ?? "")"
|
||||
@onchange="@(e => Update(() => _m.Qos = ParseNullableInt(e.Value)))">
|
||||
<option value="">(driver default)</option>
|
||||
<option value="0">0 — at most once</option>
|
||||
@@ -141,8 +141,8 @@
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label class="form-label" for="mqtt-sp-retain-seed">Retained-message seed</label>
|
||||
<select id="mqtt-sp-retain-seed" class="form-select form-select-sm"
|
||||
<label class="form-label" for="@FieldId("mqtt-sp-retain-seed")">Retained-message seed</label>
|
||||
<select id="@FieldId("mqtt-sp-retain-seed")" class="form-select form-select-sm"
|
||||
value="@(_m.RetainSeed is null ? "" : _m.RetainSeed.Value ? "true" : "false")"
|
||||
@onchange="@(e => Update(() => _m.RetainSeed = ParseNullableBool(e.Value)))">
|
||||
<option value="">(driver default)</option>
|
||||
@@ -159,6 +159,10 @@
|
||||
</div>
|
||||
|
||||
@code {
|
||||
private readonly string _fieldScope = "mqtt-tag-config-editor-" + Guid.NewGuid().ToString("N");
|
||||
private string FieldIds(params string[] names) => string.Join(" ", names.Select(FieldId));
|
||||
private string FieldId(string name) => $"{_fieldScope}-{name}";
|
||||
|
||||
/// <summary>The tag's TagConfig JSON, owned by the host modal.</summary>
|
||||
[Parameter] public string? ConfigJson { get; set; }
|
||||
/// <summary>Raised with the re-serialised TagConfig JSON after every field edit.</summary>
|
||||
|
||||
+7
-3
@@ -1,14 +1,18 @@
|
||||
@using ZB.MOM.WW.OtOpcUa.AdminUI.Uns.TagEditors
|
||||
|
||||
<div class="row g-2">
|
||||
<div class="col-md-12"><label class="form-label">Upstream node reference (NodeId)</label>
|
||||
<input type="text" class="form-control form-control-sm mono" value="@_m.NodeId"
|
||||
<div class="col-md-12"><label for="@FieldId("field-01")" class="form-label">Upstream node reference (NodeId)</label>
|
||||
<input aria-describedby="@FieldIds("field-01-hint")" id="@FieldId("field-01")" type="text" class="form-control form-control-sm mono" value="@_m.NodeId"
|
||||
placeholder="nsu=urn:server:ns;s=Line3.Temp"
|
||||
@onchange="@(e => Update(() => _m.NodeId = e.Value?.ToString() ?? string.Empty))" />
|
||||
<div class="form-text">The remote OPC UA NodeId the driver reads/writes/subscribes against. Use the browse picker on the driver page to find it.</div></div>
|
||||
<div id="@FieldId("field-01-hint")" class="form-text">The remote OPC UA NodeId the driver reads/writes/subscribes against. Use the browse picker on the driver page to find it.</div></div>
|
||||
</div>
|
||||
|
||||
@code {
|
||||
private readonly string _fieldScope = "opc-ua-client-tag-config-editor-" + Guid.NewGuid().ToString("N");
|
||||
private string FieldIds(params string[] names) => string.Join(" ", names.Select(FieldId));
|
||||
private string FieldId(string name) => $"{_fieldScope}-{name}";
|
||||
|
||||
[Parameter] public string? ConfigJson { get; set; }
|
||||
[Parameter] public EventCallback<string> ConfigJsonChanged { get; set; }
|
||||
/// <summary>DriverType of the selected driver — lets browse-capable pickers open a universal session.</summary>
|
||||
|
||||
Reference in New Issue
Block a user