Skip to content

Commit

Permalink
Added Modbus unitID to base address and simplified Modbus register ad…
Browse files Browse the repository at this point in the history
…dress, according to WoT spec.
  • Loading branch information
barnstee committed Feb 7, 2024
1 parent c95d93b commit a01dcad
Show file tree
Hide file tree
Showing 7 changed files with 107 additions and 101 deletions.
2 changes: 2 additions & 0 deletions Models/AssetTag.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ public class AssetTag
{
public string Name { get; set; }

public byte UnitID { get; set; }

public string Address { get; set; }

public string Type { get; set; }
Expand Down
34 changes: 17 additions & 17 deletions Samples/pac4200-predefined-nodes.td.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"opcua:nodeId": "nsu=http://siemens.com/UA/SentronPAC4200/SN324/;i=6101",
"opcua:type": "nsu=http://opcfoundation.org/UA/PNEM/;i=1010",
"name": "modbus-pac4200-sn324",
"base": "modbus+tcp://192.168.178.100:502",
"base": "modbus+tcp://192.168.178.100:502/1",
"title": "Siemens SENTRON PAC4200",
"properties": {
"VoltageL-N": {
Expand All @@ -28,7 +28,7 @@
"observable": true,
"forms": [
{
"href": "/1?address=1&quantity=2",
"href": "1?quantity=2",
"op": [
"readproperty",
"observeproperty"
Expand All @@ -41,7 +41,7 @@
"modv:pollingTime": 2000
},
{
"href": "/1?address=3&quantity=2",
"href": "3?quantity=2",
"op": [
"readproperty",
"observeproperty"
Expand All @@ -54,7 +54,7 @@
"modv:pollingTime": 2000
},
{
"href": "/1?address=5&quantity=2",
"href": "5?quantity=2",
"op": [
"readproperty",
"observeproperty"
Expand All @@ -74,7 +74,7 @@
"observable": true,
"forms": [
{
"href": "/1?address=7&quantity=2",
"href": "7?quantity=2",
"op": [
"readproperty",
"observeproperty"
Expand All @@ -92,7 +92,7 @@
"observable": true,
"forms": [
{
"href": "/1?address=9&quantity=2",
"href": "9?quantity=2",
"op": [
"readproperty",
"observeproperty"
Expand All @@ -110,7 +110,7 @@
"observable": true,
"forms": [
{
"href": "/1?address=11&quantity=2",
"href": "11?quantity=2",
"op": [
"readproperty",
"observeproperty"
Expand All @@ -128,7 +128,7 @@
"observable": true,
"forms": [
{
"href": "/1?address=13&quantity=2",
"href": "13?quantity=2",
"op": [
"readproperty",
"observeproperty"
Expand All @@ -141,7 +141,7 @@
"modv:pollingTime": 2000
},
{
"href": "/1?address=15&quantity=2",
"href": "15?quantity=2",
"op": [
"readproperty",
"observeproperty"
Expand All @@ -154,7 +154,7 @@
"modv:pollingTime": 2000
},
{
"href": "/1?address=17&quantity=2",
"href": "17?quantity=2",
"op": [
"readproperty",
"observeproperty"
Expand All @@ -174,7 +174,7 @@
"observable": true,
"forms": [
{
"href": "/1?address=37&quantity=2",
"href": "37?quantity=2",
"op": [
"readproperty",
"observeproperty"
Expand All @@ -187,7 +187,7 @@
"modv:pollingTime": 2000
},
{
"href": "/1?address=39&quantity=2",
"href": "39?quantity=2",
"op": [
"readproperty",
"observeproperty"
Expand All @@ -200,7 +200,7 @@
"modv:pollingTime": 2000
},
{
"href": "/1?address=41&quantity=2",
"href": "41?quantity=2",
"op": [
"readproperty",
"observeproperty"
Expand All @@ -220,7 +220,7 @@
"observable": true,
"forms": [
{
"href": "/1?address=63&quantity=2",
"href": "63?quantity=2",
"op": [
"readproperty",
"observeproperty"
Expand All @@ -238,7 +238,7 @@
"observable": true,
"forms": [
{
"href": "/1?address=65&quantity=2",
"href": "65?quantity=2",
"op": [
"readproperty",
"observeproperty"
Expand All @@ -256,7 +256,7 @@
"observable": true,
"forms": [
{
"href": "/1?address=67&quantity=2",
"href": "67?quantity=2",
"op": [
"readproperty",
"observeproperty"
Expand All @@ -274,7 +274,7 @@
"observable": true,
"forms": [
{
"href": "/1?address=69&quantity=2",
"href": "69?quantity=2",
"op": [
"readproperty",
"observeproperty"
Expand Down
34 changes: 17 additions & 17 deletions Samples/pac4200-predefined-nodes.tm.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"opcua:nodeId": "nsu=http://siemens.com/UA/SentronPAC4200/{{serialnumber}}/;i=6101",
"opcua:type": "nsu=http://opcfoundation.org/UA/PNEM/;i=1010",
"name": "modbus-pac4200-{{serialnumber}}",
"base": "modbus+tcp://{{address}}:{{port}}",
"base": "modbus+tcp://{{address}}:{{port}}/1",
"title": "Siemens SENTRON PAC4200",
"properties": {
"VoltageL-N": {
Expand All @@ -28,7 +28,7 @@
"observable": true,
"forms": [
{
"href": "/1?address=1&quantity=2",
"href": "1?quantity=2",
"op": [
"readproperty",
"observeproperty"
Expand All @@ -41,7 +41,7 @@
"modv:pollingTime": 2000
},
{
"href": "/1?address=3&quantity=2",
"href": "3?quantity=2",
"op": [
"readproperty",
"observeproperty"
Expand All @@ -54,7 +54,7 @@
"modv:pollingTime": 2000
},
{
"href": "/1?address=5&quantity=2",
"href": "5?quantity=2",
"op": [
"readproperty",
"observeproperty"
Expand All @@ -74,7 +74,7 @@
"observable": true,
"forms": [
{
"href": "/1?address=7&quantity=2",
"href": "7?quantity=2",
"op": [
"readproperty",
"observeproperty"
Expand All @@ -92,7 +92,7 @@
"observable": true,
"forms": [
{
"href": "/1?address=9&quantity=2",
"href": "9?quantity=2",
"op": [
"readproperty",
"observeproperty"
Expand All @@ -110,7 +110,7 @@
"observable": true,
"forms": [
{
"href": "/1?address=11&quantity=2",
"href": "11?quantity=2",
"op": [
"readproperty",
"observeproperty"
Expand All @@ -128,7 +128,7 @@
"observable": true,
"forms": [
{
"href": "/1?address=13&quantity=2",
"href": "13?quantity=2",
"op": [
"readproperty",
"observeproperty"
Expand All @@ -141,7 +141,7 @@
"modv:pollingTime": 2000
},
{
"href": "/1?address=15&quantity=2",
"href": "15?quantity=2",
"op": [
"readproperty",
"observeproperty"
Expand All @@ -154,7 +154,7 @@
"modv:pollingTime": 2000
},
{
"href": "/1?address=17&quantity=2",
"href": "17?quantity=2",
"op": [
"readproperty",
"observeproperty"
Expand All @@ -174,7 +174,7 @@
"observable": true,
"forms": [
{
"href": "/1?address=37&quantity=2",
"href": "37?quantity=2",
"op": [
"readproperty",
"observeproperty"
Expand All @@ -187,7 +187,7 @@
"modv:pollingTime": 2000
},
{
"href": "/1?address=39&quantity=2",
"href": "39?quantity=2",
"op": [
"readproperty",
"observeproperty"
Expand All @@ -200,7 +200,7 @@
"modv:pollingTime": 2000
},
{
"href": "/1?address=41&quantity=2",
"href": "41?quantity=2",
"op": [
"readproperty",
"observeproperty"
Expand All @@ -220,7 +220,7 @@
"observable": true,
"forms": [
{
"href": "/1?address=63&quantity=2",
"href": "63?quantity=2",
"op": [
"readproperty",
"observeproperty"
Expand All @@ -238,7 +238,7 @@
"observable": true,
"forms": [
{
"href": "/1?address=65&quantity=2",
"href": "65?quantity=2",
"op": [
"readproperty",
"observeproperty"
Expand All @@ -256,7 +256,7 @@
"observable": true,
"forms": [
{
"href": "/1?address=67&quantity=2",
"href": "67?quantity=2",
"op": [
"readproperty",
"observeproperty"
Expand All @@ -274,7 +274,7 @@
"observable": true,
"forms": [
{
"href": "/1?address=69&quantity=2",
"href": "69?quantity=2",
"op": [
"readproperty",
"observeproperty"
Expand Down
Loading

0 comments on commit a01dcad

Please sign in to comment.