Skip to content

Commit

Permalink
Added support for UA complex types (yay!) and updated to latest NuGet…
Browse files Browse the repository at this point in the history
…s. Also fixed a few bugs in the sample WoT TDs.
  • Loading branch information
barnstee committed Jan 17, 2024
1 parent ee6b260 commit e108a35
Show file tree
Hide file tree
Showing 7 changed files with 185 additions and 134 deletions.
1 change: 0 additions & 1 deletion Models/ThingDescription.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
namespace Opc.Ua.Edge.Translator.Models
{
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
Expand Down
26 changes: 6 additions & 20 deletions Samples/pac4200-predefined-nodes.jsonld
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"@context": [
"https://www.w3.org/2019/wot/td/v1",
"http://opcfoundation.org/UA/DI/",
"http://opcfoundation.org/UA/PNEM/",
"http://company.com/UA/SubStation/"
],
Expand All @@ -18,6 +17,7 @@
"Thing"
],
"opcua:nodeId": "nsu=http://company.com/UA/SubStation/;i=5012",
"opcua:type": "nsu=http://opcfoundation.org/UA/PNEM/;i=1010",
"name": "modbus-pac4200-sn324",
"base": "modbus+tcp://192.168.128.250:502",
"title": "Siemens SENTRON PAC4200",
Expand All @@ -34,45 +34,31 @@
"observeproperty"
],
"opcua:nodeId": "nsu=http://company.com/UA/SubStation/;i=6108",
"opcua:type": "nsu=http://opcfoundation.org/UA/PNEM/;i=6098",
"opcua:type": "nsu=http://opcfoundation.org/UA/PNEM/;i=3005;A",
"modbus:type": "float",
"modbus:entity": "holdingregister",
"modbus:pollingTime": 2000
}
]
},
"VoltageL2-N": {
"type": "number",
"readOnly": true,
"observable": true,
"forms": [
},
{
"href": "/1?address=2&quantity=2",
"op": [
"readproperty",
"observeproperty"
],
"opcua:nodeId": "nsu=http://company.com/UA/SubStation/;i=6110",
"opcua:type": "nsu=http://opcfoundation.org/UA/PNEM/;i=6098",
"opcua:type": "nsu=http://opcfoundation.org/UA/PNEM/;i=3005;B",
"modbus:type": "float",
"modbus:entity": "holdingregister",
"modbus:pollingTime": 2000
}
]
},
"VoltageL3-N": {
"type": "number",
"readOnly": true,
"observable": true,
"forms": [
},
{
"href": "/1?address=4&quantity=2",
"op": [
"readproperty",
"observeproperty"
],
"opcua:nodeId": "nsu=http://company.com/UA/SubStation/;i=6112",
"opcua:type": "nsu=http://opcfoundation.org/UA/PNEM/;i=6098",
"opcua:type": "nsu=http://opcfoundation.org/UA/PNEM/;i=3005;C",
"modbus:type": "float",
"modbus:entity": "holdingregister",
"modbus:pollingTime": 2000
Expand Down
52 changes: 26 additions & 26 deletions Samples/pac4200.dtdl.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,134 +4,134 @@
"@type": "Interface",
"displayName": "modbus-pac4200-sn324",
"description": "Siemens SENTRON PAC4200",
"comment": "modbus+tcp://192.168.10.100:502;http://opcfoundation.org/UA/PNEM/;i=3005",
"comment": "modbus+tcp://192.168.10.100:502;http://opcfoundation.org/UA/PNEM/;type:nsu=http://opcfoundation.org/UA/PNEM/;i=1010",
"contents": [
{
"@type": "Telemetry",
"name": "/1?address=1&quantity=2",
"displayName": "VoltageL1-N",
"displayName": "VoltageL-N",
"description": "holdingregister;2000",
"comment": "nsu=http://opcfoundation.org/UA/PNEM/;i=6098",
"comment": "nsu=http://opcfoundation.org/UA/PNEM/;i=3005;A",
"schema": "float"
},
{
"@type": "Telemetry",
"name": "/1?address=3&quantity=2",
"displayName": "VoltageL2-N",
"displayName": "VoltageL-N",
"description": "holdingregister;2000",
"comment": "nsu=http://opcfoundation.org/UA/PNEM/;i=6098",
"comment": "nsu=http://opcfoundation.org/UA/PNEM/;i=3005;B",
"schema": "float"
},
{
"@type": "Telemetry",
"name": "/1?address=5&quantity=2",
"displayName": "VoltageL3-N",
"displayName": "VoltageL-N",
"description": "holdingregister;2000",
"comment": "nsu=http://opcfoundation.org/UA/PNEM/;i=6098",
"comment": "nsu=http://opcfoundation.org/UA/PNEM/;i=3005;C",
"schema": "float"
},
{
"@type": "Telemetry",
"name": "/1?address=7&quantity=2",
"displayName": "VoltageL1-L2",
"description": "holdingregister;2000",
"comment": "nsu=http://opcfoundation.org/UA/PNEM/;i=6099",
"comment": null,
"schema": "float"
},
{
"@type": "Telemetry",
"name": "/1?address=9&quantity=2",
"displayName": "VoltageL2-L3",
"description": "holdingregister;2000",
"comment": "nsu=http://opcfoundation.org/UA/PNEM/;i=6099",
"comment": null,
"schema": "float"
},
{
"@type": "Telemetry",
"name": "/1?address=11&quantity=2",
"displayName": "VoltageL3-L1",
"description": "holdingregister;2000",
"comment": "nsu=http://opcfoundation.org/UA/PNEM/;i=6099",
"comment": null,
"schema": "float"
},
{
"@type": "Telemetry",
"name": "/1?address=13&quantity=2",
"displayName": "CurrentL1",
"displayName": "Current",
"description": "holdingregister;2000",
"comment": "nsu=http://opcfoundation.org/UA/PNEM/;i=6060",
"comment": "nsu=http://opcfoundation.org/UA/PNEM/;i=3005;A",
"schema": "float"
},
{
"@type": "Telemetry",
"name": "/1?address=15&quantity=2",
"displayName": "CurrentL2",
"displayName": "Current",
"description": "holdingregister;2000",
"comment": "nsu=http://opcfoundation.org/UA/PNEM/;i=6060",
"comment": "nsu=http://opcfoundation.org/UA/PNEM/;i=3005;B",
"schema": "float"
},
{
"@type": "Telemetry",
"name": "/1?address=17&quantity=2",
"displayName": "CurrentL3",
"displayName": "Current",
"description": "holdingregister;2000",
"comment": "nsu=http://opcfoundation.org/UA/PNEM/;i=6060",
"comment": "nsu=http://opcfoundation.org/UA/PNEM/;i=3005;C",
"schema": "float"
},
{
"@type": "Telemetry",
"name": "/1?address=37&quantity=2",
"displayName": "PowerFactorL1",
"displayName": "PowerFactor",
"description": "holdingregister;2000",
"comment": "nsu=http://opcfoundation.org/UA/PNEM/;i=6101",
"comment": "nsu=http://opcfoundation.org/UA/PNEM/;i=3005;A",
"schema": "float"
},
{
"@type": "Telemetry",
"name": "/1?address=39&quantity=2",
"displayName": "PowerFactorL2",
"displayName": "PowerFactor",
"description": "holdingregister;2000",
"comment": "nsu=http://opcfoundation.org/UA/PNEM/;i=6101",
"comment": "nsu=http://opcfoundation.org/UA/PNEM/;i=3005;B",
"schema": "float"
},
{
"@type": "Telemetry",
"name": "/1?address=41&quantity=2",
"displayName": "PowerFactorL3",
"displayName": "PowerFactor",
"description": "holdingregister;2000",
"comment": "nsu=http://opcfoundation.org/UA/PNEM/;i=6101",
"comment": "nsu=http://opcfoundation.org/UA/PNEM/;i=3005;C",
"schema": "float"
},
{
"@type": "Telemetry",
"name": "/1?address=63&quantity=2",
"displayName": "TotalApparentPower",
"description": "holdingregister;2000",
"comment": "nsu=http://opcfoundation.org/UA/PNEM/;i=6064",
"comment": null,
"schema": "float"
},
{
"@type": "Telemetry",
"name": "/1?address=65&quantity=2",
"displayName": "TotalActivePower",
"description": "holdingregister;2000",
"comment": "nsu=http://opcfoundation.org/UA/PNEM/;i=6064",
"comment": null,
"schema": "float"
},
{
"@type": "Telemetry",
"name": "/1?address=67&quantity=2",
"displayName": "TotalReactivePower",
"description": "holdingregister;2000",
"comment": "nsu=http://opcfoundation.org/UA/PNEM/;i=6081",
"comment": null,
"schema": "float"
},
{
"@type": "Telemetry",
"name": "/1?address=69&quantity=2",
"displayName": "TotalPowerFactor",
"description": "holdingregister;2000",
"comment": "nsu=http://opcfoundation.org/UA/PNEM/;i=6101",
"comment": null,
"schema": "float"
}
]
Expand Down
Loading

0 comments on commit e108a35

Please sign in to comment.