@bitpoolos/edge-bacnet 1.0.5 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bacnet_client.js +587 -154
- package/bacnet_device.js +34 -11
- package/bacnet_gateway.html +189 -92
- package/bacnet_gateway.js +152 -21
- package/bacnet_object.js +1 -1
- package/bacnet_read.html +115 -113
- package/bacnet_read.js +24 -24
- package/bacnet_write.html +19 -15
- package/bacnet_write.js +0 -2
- package/common.js +63 -8
- package/package.json +5 -1
- package/resources/confirmationservice.min.js +1 -0
- package/resources/confirmdialog.min.js +1 -0
- package/resources/fonts/primeicons.woff2 +0 -0
- package/resources/node-bacnet/CHANGELOG.md +481 -0
- package/resources/{bacstack → node-bacnet}/LICENSE.md +3 -1
- package/resources/node-bacnet/README.md +91 -0
- package/resources/node-bacnet/docs/Client.html +4422 -0
- package/resources/node-bacnet/docs/bacnet-icon-quad.png +0 -0
- package/resources/node-bacnet/docs/bacnet-icon-quad128.png +0 -0
- package/resources/node-bacnet/docs/bacnet-icon-quad64.png +0 -0
- package/resources/node-bacnet/docs/bacnet-icon-small.xcf +0 -0
- package/resources/node-bacnet/docs/bacnet-icon.xcf +0 -0
- package/resources/node-bacnet/docs/bacnet.html +7032 -0
- package/resources/node-bacnet/docs/client.js.html +1759 -0
- package/resources/node-bacnet/docs/enum.js.html +2530 -0
- package/resources/node-bacnet/docs/global.html +2068 -0
- package/resources/node-bacnet/docs/images/mocha-logo.svg +65 -0
- package/resources/node-bacnet/docs/index.html +283 -0
- package/resources/node-bacnet/docs/scripts/collapse.js +11 -0
- package/resources/node-bacnet/docs/scripts/jquery-3.1.1.min.js +4 -0
- package/resources/node-bacnet/docs/scripts/linenumber.js +26 -0
- package/resources/node-bacnet/docs/scripts/prettify/Apache-License-2.0.txt +202 -0
- package/resources/node-bacnet/docs/scripts/prettify/lang-css.js +2 -0
- package/resources/node-bacnet/docs/scripts/prettify/prettify.js +28 -0
- package/resources/node-bacnet/docs/scripts/search.js +47 -0
- package/resources/node-bacnet/docs/services_i-am.js.html +157 -0
- package/resources/node-bacnet/docs/services_time-sync.js.html +118 -0
- package/resources/node-bacnet/docs/services_who-is.js.html +138 -0
- package/resources/node-bacnet/docs/styles/jsdoc.css +683 -0
- package/resources/node-bacnet/docs/styles/prettify.css +82 -0
- package/resources/node-bacnet/examples/discover-devices.js +66 -0
- package/resources/node-bacnet/examples/read-device.js +510 -0
- package/resources/node-bacnet/examples/subscribe-cov.js +75 -0
- package/resources/{bacstack → node-bacnet}/index.js +3 -0
- package/resources/{bacstack → node-bacnet}/lib/apdu.js +56 -39
- package/resources/{bacstack → node-bacnet}/lib/asn1.js +550 -532
- package/resources/node-bacnet/lib/bvlc.js +90 -0
- package/resources/node-bacnet/lib/client.js +1695 -0
- package/resources/node-bacnet/lib/enum.js +2463 -0
- package/resources/node-bacnet/lib/npdu.js +123 -0
- package/resources/{bacstack → node-bacnet}/lib/services/add-list-element.js +12 -6
- package/resources/{bacstack → node-bacnet}/lib/services/alarm-acknowledge.js +3 -3
- package/resources/{bacstack → node-bacnet}/lib/services/alarm-summary.js +5 -4
- package/resources/{bacstack → node-bacnet}/lib/services/atomic-read-file.js +49 -26
- package/resources/{bacstack → node-bacnet}/lib/services/atomic-write-file.js +40 -23
- package/resources/{bacstack → node-bacnet}/lib/services/cov-notify.js +33 -17
- package/resources/{bacstack → node-bacnet}/lib/services/create-object.js +23 -13
- package/resources/{bacstack → node-bacnet}/lib/services/delete-object.js +7 -2
- package/resources/{bacstack → node-bacnet}/lib/services/device-communication-control.js +8 -3
- package/resources/{bacstack → node-bacnet}/lib/services/error.js +7 -0
- package/resources/{bacstack → node-bacnet}/lib/services/event-information.js +10 -9
- package/resources/{bacstack → node-bacnet}/lib/services/event-notify-data.js +38 -16
- package/resources/{bacstack → node-bacnet}/lib/services/get-enrollment-summary.js +24 -11
- package/resources/{bacstack → node-bacnet}/lib/services/get-event-information.js +28 -13
- package/resources/node-bacnet/lib/services/i-am.js +90 -0
- package/resources/{bacstack/lib/services/i-have-broadcast.js → node-bacnet/lib/services/i-have.js} +3 -2
- package/resources/{bacstack → node-bacnet}/lib/services/index.js +7 -4
- package/resources/{bacstack → node-bacnet}/lib/services/life-safety-operation.js +3 -2
- package/resources/{bacstack → node-bacnet}/lib/services/private-transfer.js +3 -2
- package/resources/{bacstack → node-bacnet}/lib/services/read-property-multiple.js +11 -6
- package/resources/{bacstack → node-bacnet}/lib/services/read-property.js +42 -24
- package/resources/{bacstack → node-bacnet}/lib/services/read-range.js +37 -27
- package/resources/node-bacnet/lib/services/register-foreign-device.js +18 -0
- package/resources/{bacstack → node-bacnet}/lib/services/reinitialize-device.js +9 -4
- package/resources/{bacstack → node-bacnet}/lib/services/subscribe-cov.js +9 -4
- package/resources/{bacstack → node-bacnet}/lib/services/subscribe-property.js +18 -8
- package/resources/{bacstack → node-bacnet}/lib/services/time-sync.js +28 -5
- package/resources/{bacstack → node-bacnet}/lib/services/who-has.js +3 -3
- package/resources/{bacstack → node-bacnet}/lib/services/who-is.js +42 -9
- package/resources/{bacstack → node-bacnet}/lib/services/write-property-multiple.js +33 -16
- package/resources/{bacstack → node-bacnet}/lib/services/write-property.js +23 -13
- package/resources/node-bacnet/lib/transport.js +82 -0
- package/resources/node-bacnet/package.json +92 -0
- package/resources/primeicons.css +90 -2
- package/resources/bacstack/.codeclimate.yml +0 -15
- package/resources/bacstack/.dockerignore +0 -5
- package/resources/bacstack/.editorconfig +0 -13
- package/resources/bacstack/.eslintrc.yml +0 -13
- package/resources/bacstack/.github/ISSUE_TEMPLATE.md +0 -26
- package/resources/bacstack/.github/PULL_REQUEST_TEMPLATE.md +0 -14
- package/resources/bacstack/.github/workflows/ci.yml +0 -39
- package/resources/bacstack/.jscsrc +0 -8
- package/resources/bacstack/.jshintrc +0 -50
- package/resources/bacstack/.travis.yml +0 -27
- package/resources/bacstack/CHANGELOG.md +0 -232
- package/resources/bacstack/CODE_OF_CONDUCT.md +0 -74
- package/resources/bacstack/CONTRIBUTING.md +0 -77
- package/resources/bacstack/Dockerfile +0 -15
- package/resources/bacstack/FAQ.md +0 -64
- package/resources/bacstack/README.md +0 -157
- package/resources/bacstack/docker-compose.yml +0 -9
- package/resources/bacstack/lib/adpu.js +0 -190
- package/resources/bacstack/lib/bvlc.js +0 -43
- package/resources/bacstack/lib/client.js +0 -1028
- package/resources/bacstack/lib/enum.js +0 -1314
- package/resources/bacstack/lib/npdu.js +0 -119
- package/resources/bacstack/lib/services/i-am-broadcast.js +0 -51
- package/resources/bacstack/lib/services.js +0 -1963
- package/resources/bacstack/lib/transport.js +0 -52
- package/resources/bacstack/package-lock.json +0 -7974
- package/resources/bacstack/package.json +0 -84
- package/resources/bacstack/test/compliance/who-is.spec.js +0 -37
- package/resources/bacstack/test/integration/acknowledge-alarm.spec.js +0 -14
- package/resources/bacstack/test/integration/add-list-element.spec.js +0 -16
- package/resources/bacstack/test/integration/confirmed-event-notification.spec.js +0 -30
- package/resources/bacstack/test/integration/confirmed-private-transfer.spec.js +0 -15
- package/resources/bacstack/test/integration/create-object.spec.js +0 -16
- package/resources/bacstack/test/integration/delete-object.spec.js +0 -14
- package/resources/bacstack/test/integration/device-communication-control.spec.js +0 -14
- package/resources/bacstack/test/integration/get-alarm-summary.spec.js +0 -14
- package/resources/bacstack/test/integration/get-enrollment-summary.spec.js +0 -15
- package/resources/bacstack/test/integration/get-event-information.spec.js +0 -14
- package/resources/bacstack/test/integration/read-file.spec.js +0 -14
- package/resources/bacstack/test/integration/read-property-multiple.spec.js +0 -110
- package/resources/bacstack/test/integration/read-property.spec.js +0 -14
- package/resources/bacstack/test/integration/read-range.spec.js +0 -14
- package/resources/bacstack/test/integration/reinitialize-sevice.spec.js +0 -14
- package/resources/bacstack/test/integration/remove-list-element.spec.js +0 -16
- package/resources/bacstack/test/integration/subscribe-cov.spec.js +0 -14
- package/resources/bacstack/test/integration/subscribe-property.spec.js +0 -14
- package/resources/bacstack/test/integration/time-sync-utc.spec.js +0 -10
- package/resources/bacstack/test/integration/time-sync.spec.js +0 -10
- package/resources/bacstack/test/integration/unconfirmed-event-notification.spec.js +0 -28
- package/resources/bacstack/test/integration/unconfirmed-private-transfer.spec.js +0 -11
- package/resources/bacstack/test/integration/utils.js +0 -30
- package/resources/bacstack/test/integration/who-is.spec.js +0 -17
- package/resources/bacstack/test/integration/write-file.spec.js +0 -14
- package/resources/bacstack/test/integration/write-property-multiple.spec.js +0 -19
- package/resources/bacstack/test/integration/write-property.spec.js +0 -14
- package/resources/bacstack/test/unit/apdu.spec.js +0 -162
- package/resources/bacstack/test/unit/asn1.spec.js +0 -39
- package/resources/bacstack/test/unit/bacnet-apdu.spec.js +0 -161
- package/resources/bacstack/test/unit/bacnet-asn1.spec.js +0 -32
- package/resources/bacstack/test/unit/bacnet-bvlc.spec.js +0 -57
- package/resources/bacstack/test/unit/bacnet-npdu.spec.js +0 -118
- package/resources/bacstack/test/unit/bacnet-services.spec.js +0 -2052
- package/resources/bacstack/test/unit/bvlc.spec.js +0 -58
- package/resources/bacstack/test/unit/npdu.spec.js +0 -119
- package/resources/bacstack/test/unit/service-add-list-element.spec.js +0 -24
- package/resources/bacstack/test/unit/service-alarm-acknowledge.spec.js +0 -71
- package/resources/bacstack/test/unit/service-alarm-summary.spec.js +0 -22
- package/resources/bacstack/test/unit/service-atomic-read-file.spec.js +0 -54
- package/resources/bacstack/test/unit/service-atomic-write-file.spec.js +0 -56
- package/resources/bacstack/test/unit/service-cov-notify.spec.js +0 -98
- package/resources/bacstack/test/unit/service-create-object.spec.js +0 -90
- package/resources/bacstack/test/unit/service-delete-object.spec.js +0 -17
- package/resources/bacstack/test/unit/service-device-communication-control.spec.js +0 -29
- package/resources/bacstack/test/unit/service-error.spec.js +0 -17
- package/resources/bacstack/test/unit/service-event-information.spec.js +0 -48
- package/resources/bacstack/test/unit/service-event-notify-data.spec.js +0 -310
- package/resources/bacstack/test/unit/service-get-enrollment-summary.spec.js +0 -45
- package/resources/bacstack/test/unit/service-get-event-information.spec.js +0 -62
- package/resources/bacstack/test/unit/service-i-am.spec.js +0 -19
- package/resources/bacstack/test/unit/service-i-have-broadcast.spec.js +0 -18
- package/resources/bacstack/test/unit/service-life-safety-operation.spec.js +0 -19
- package/resources/bacstack/test/unit/service-private-transfer.spec.js +0 -18
- package/resources/bacstack/test/unit/service-read-property-multiple.spec.js +0 -131
- package/resources/bacstack/test/unit/service-read-property.spec.js +0 -541
- package/resources/bacstack/test/unit/service-read-range.spec.js +0 -97
- package/resources/bacstack/test/unit/service-reinitialize-device.spec.js +0 -27
- package/resources/bacstack/test/unit/service-subscribe-cov.spec.js +0 -32
- package/resources/bacstack/test/unit/service-subscribe-property.spec.js +0 -50
- package/resources/bacstack/test/unit/service-time-sync.spec.js +0 -18
- package/resources/bacstack/test/unit/service-who-has.spec.js +0 -33
- package/resources/bacstack/test/unit/service-who-is.spec.js +0 -17
- package/resources/bacstack/test/unit/service-write-property-multiple.spec.js +0 -143
- package/resources/bacstack/test/unit/service-write-property.spec.js +0 -198
- package/resources/bacstack/test/unit/utils.js +0 -6
package/bacnet_device.js
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
class BacnetDevice {
|
|
2
2
|
constructor(config) {
|
|
3
3
|
let that = this;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
if(config.header.source) {
|
|
5
|
+
that.address = {address: config.header.sender.address, net: config.header.source.net, adr: config.header.source.adr};
|
|
6
|
+
that.isMstp = true;
|
|
7
|
+
} else {
|
|
8
|
+
that.address = config.header.sender.address;
|
|
9
|
+
that.isMstp = false;
|
|
10
|
+
}
|
|
11
|
+
that.deviceId = config.payload.deviceId;
|
|
12
|
+
that.maxApdu = config.payload.maxApdu;
|
|
13
|
+
that.segmentation = config.payload.segmentation;
|
|
14
|
+
that.vendorId = config.payload.vendorId;
|
|
9
15
|
that.lastSeen = null;
|
|
10
16
|
that.deviceName = null;
|
|
11
17
|
that.pointsList = [];
|
|
@@ -13,11 +19,17 @@ class BacnetDevice {
|
|
|
13
19
|
}
|
|
14
20
|
|
|
15
21
|
updateDeviceConfig(config) {
|
|
16
|
-
if(config.address !== "" && config.address !== null && config.address !== "undefined")
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
22
|
+
if(config.header.sender.address !== "" && config.header.sender.address !== null && config.header.sender.address !== "undefined") {
|
|
23
|
+
if(config.header.source) {
|
|
24
|
+
this.address = {address: config.header.sender.address, net: config.header.source.net, adr: config.header.source.adr};
|
|
25
|
+
} else {
|
|
26
|
+
this.address = config.header.sender.address;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
if(Number.isInteger(config.deviceId)) this.deviceId = config.payload.deviceId;
|
|
30
|
+
if(Number.isInteger(config.maxApdu)) this.maxApdu = config.payload.maxApdu;
|
|
31
|
+
if(Number.isInteger(config.segmentation)) this.segmentation = config.payload.segmentation;
|
|
32
|
+
if(Number.isInteger(config.vendorId)) this.vendorId = config.payload.vendorId;
|
|
21
33
|
}
|
|
22
34
|
|
|
23
35
|
setPointListUpdateTS(ts) {
|
|
@@ -33,7 +45,14 @@ class BacnetDevice {
|
|
|
33
45
|
}
|
|
34
46
|
|
|
35
47
|
setPointsList(newPoints) {
|
|
36
|
-
|
|
48
|
+
for(let index = 0; index < newPoints.length; index ++){
|
|
49
|
+
let newPoint = newPoints[index];
|
|
50
|
+
let foundIndex = this.pointsList.findIndex(ele => ele.value.type == newPoint.value.type && ele.value.instance == newPoint.value.instance);
|
|
51
|
+
if(foundIndex == -1 ) {
|
|
52
|
+
//not found
|
|
53
|
+
this.pointsList.push(newPoint);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
37
56
|
}
|
|
38
57
|
|
|
39
58
|
getDevicePoints() {
|
|
@@ -96,6 +115,10 @@ class BacnetDevice {
|
|
|
96
115
|
this.deviceName = deviceName;
|
|
97
116
|
}
|
|
98
117
|
|
|
118
|
+
getIsMstpDevice(){
|
|
119
|
+
return this.isMstp;
|
|
120
|
+
}
|
|
121
|
+
|
|
99
122
|
}
|
|
100
123
|
|
|
101
124
|
module.exports = { BacnetDevice };
|
package/bacnet_gateway.html
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
MIT License Copyright 2021, 2022 - Bitpool Pty Ltd
|
|
3
3
|
-->
|
|
4
|
-
|
|
5
|
-
|
|
6
4
|
<!-- PrimeVue -->
|
|
7
5
|
<link href="resources/@bitpoolos/edge-bacnet/primevue-saga-blue-theme.css" rel="stylesheet" />
|
|
8
6
|
<link href="resources/@bitpoolos/edge-bacnet/primevue.min.css" rel="stylesheet" />
|
|
@@ -19,7 +17,12 @@
|
|
|
19
17
|
async = false;
|
|
20
18
|
}
|
|
21
19
|
var scripts = [];
|
|
22
|
-
var _scripts = [
|
|
20
|
+
var _scripts = [
|
|
21
|
+
'resources/@bitpoolos/edge-bacnet/vue.global.prod.js',
|
|
22
|
+
'resources/@bitpoolos/edge-bacnet/core.min.js',
|
|
23
|
+
'resources/@bitpoolos/edge-bacnet/confirmdialog.min.js',
|
|
24
|
+
'resources/@bitpoolos/edge-bacnet/confirmationservice.min.js'
|
|
25
|
+
];
|
|
23
26
|
|
|
24
27
|
if (async) {
|
|
25
28
|
LoadScriptsAsync(_scripts, scripts)
|
|
@@ -74,7 +77,10 @@
|
|
|
74
77
|
class NodeService {
|
|
75
78
|
getNetworkData() {
|
|
76
79
|
return fetch('/bitpool-bacnet-data/getNetworkTree').then(res => res.json());
|
|
77
|
-
}
|
|
80
|
+
};
|
|
81
|
+
rebuildDataModel() {
|
|
82
|
+
return fetch('/bitpool-bacnet-data/rebuildDataModel').then(res => res.json());
|
|
83
|
+
};
|
|
78
84
|
};
|
|
79
85
|
RED.nodes.registerType('Bacnet-Gateway', {
|
|
80
86
|
category: 'Bitpool BACnet',
|
|
@@ -89,19 +95,24 @@
|
|
|
89
95
|
maxSegments: {value: "0x50", required: true},
|
|
90
96
|
broadCastAddr: {value: "255.255.255.255", required: true},
|
|
91
97
|
toLogIam: {value: true},
|
|
98
|
+
//toRestartNodeRed: {value: false},
|
|
92
99
|
discover_polling_schedule: {value: ""},
|
|
93
100
|
discover_polling_schedule_value: {value: "1", required: true},
|
|
94
101
|
discover_polling_schedule_options: {value: "Minutes", required: true},
|
|
95
|
-
device_id_range_enabled: {value:
|
|
102
|
+
device_id_range_enabled: {value: false},
|
|
96
103
|
device_id_range_start: {value: 0},
|
|
97
104
|
device_id_range_end: {value: 4194303},
|
|
105
|
+
deviceId: {value: 1234, required: true},
|
|
106
|
+
manual_instance_range_enabled: {value: false},
|
|
107
|
+
manual_instance_range_start: {value: 0},
|
|
108
|
+
manual_instance_range_end: {value: 10000},
|
|
98
109
|
},
|
|
99
110
|
networkInterfaces: [],
|
|
100
111
|
inputs: 1,
|
|
101
112
|
outputs: 1,
|
|
102
113
|
icon: "bitpool.svg",
|
|
103
114
|
label: function () {
|
|
104
|
-
return "gateway";
|
|
115
|
+
return this.name || "gateway";
|
|
105
116
|
},
|
|
106
117
|
paletteLabel: function () {
|
|
107
118
|
return "gateway";
|
|
@@ -109,6 +120,30 @@
|
|
|
109
120
|
oneditprepare: function () {
|
|
110
121
|
let node = this;
|
|
111
122
|
|
|
123
|
+
let tabs = RED.tabs.create(
|
|
124
|
+
{
|
|
125
|
+
id: "node-input-read-tabs",
|
|
126
|
+
onchange: function (tab) {
|
|
127
|
+
$("#node-input-tabs-content").children().hide()
|
|
128
|
+
$("#" + tab.id).show()
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
tabs.addTab(
|
|
133
|
+
{
|
|
134
|
+
id: "read-properties-tab",
|
|
135
|
+
label: "Gateway"
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
tabs.addTab(
|
|
139
|
+
{
|
|
140
|
+
id: "read-discover-tab",
|
|
141
|
+
label: "Discovery"
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
112
147
|
if (node.networkInterfaces && node.networkInterfaces.length > 0) {
|
|
113
148
|
let nicSelector = document.getElementById("node-input-local_device_address");
|
|
114
149
|
node.networkInterfaces.forEach(function (option) {
|
|
@@ -119,7 +154,6 @@
|
|
|
119
154
|
|
|
120
155
|
function queryAdapters() {
|
|
121
156
|
let nicSelector = document.getElementById("node-input-local_device_address");
|
|
122
|
-
|
|
123
157
|
$.ajax({
|
|
124
158
|
url: '/bitpool-bacnet-data/getNetworkInterfaces',
|
|
125
159
|
success: function (data) {
|
|
@@ -142,8 +176,21 @@
|
|
|
142
176
|
timeout: 10000
|
|
143
177
|
});
|
|
144
178
|
}
|
|
179
|
+
|
|
145
180
|
queryAdapters();
|
|
146
181
|
|
|
182
|
+
function setBroadCastAddress() {
|
|
183
|
+
let nicSelector = document.getElementById("node-input-local_device_address");
|
|
184
|
+
nicSelector.onchange = function(e) {
|
|
185
|
+
if(typeof e.target.value == "string" && e.target.value !== ""){
|
|
186
|
+
let broadcastAddrPrefill = e.target.value.split(".").slice(0, 3).join(".") + ".255";
|
|
187
|
+
document.getElementById("node-input-broadCastAddr").value = broadcastAddrPrefill;
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
setBroadCastAddress();
|
|
193
|
+
|
|
147
194
|
function setDeviceIdRangeState(state) {
|
|
148
195
|
let deviceIdRangeStart = $("#node-input-device_id_range_start");
|
|
149
196
|
let deviceIdRangeEnd = $("#node-input-device_id_range_end");
|
|
@@ -162,8 +209,33 @@
|
|
|
162
209
|
setDeviceIdRangeState(this.checked);
|
|
163
210
|
});
|
|
164
211
|
|
|
212
|
+
function setManualInstanceRangeState(state) {
|
|
213
|
+
let deviceIdRangeStart = $("#node-input-manual_instance_range_start");
|
|
214
|
+
let deviceIdRangeEnd = $("#node-input-manual_instance_range_end");
|
|
215
|
+
if(state == true) {
|
|
216
|
+
deviceIdRangeStart.removeAttr("readonly");
|
|
217
|
+
deviceIdRangeEnd.removeAttr("readonly");
|
|
218
|
+
} else if(state == false) {
|
|
219
|
+
deviceIdRangeStart.attr("readonly", true);
|
|
220
|
+
deviceIdRangeEnd.attr("readonly", true);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
setManualInstanceRangeState(node.manual_instance_range_enabled);
|
|
225
|
+
|
|
226
|
+
$("#node-input-manual_instance_range_enabled").change(function(e) {
|
|
227
|
+
setManualInstanceRangeState(this.checked);
|
|
228
|
+
});
|
|
229
|
+
|
|
230
|
+
// document.getElementById('restart-nr-button').onclick = function () {
|
|
231
|
+
// this.disabled = true;
|
|
232
|
+
// document.getElementById("node-input-toRestartNodeRed").checked = true;
|
|
233
|
+
// }
|
|
234
|
+
|
|
235
|
+
// console.log("toRestartNodeRed: ", document.getElementById("node-input-toRestartNodeRed").checked);
|
|
236
|
+
|
|
165
237
|
},
|
|
166
|
-
oneditsave: function () {
|
|
238
|
+
oneditsave: function (test) {
|
|
167
239
|
let node = this;
|
|
168
240
|
|
|
169
241
|
document.getElementById("node-input-discover_polling_schedule").value = getTimePeriodInSeconds(
|
|
@@ -223,100 +295,125 @@
|
|
|
223
295
|
margin-left: 50px;
|
|
224
296
|
}
|
|
225
297
|
|
|
226
|
-
/* .form-row deviceIdRange {
|
|
227
|
-
display: flex;
|
|
228
|
-
flex-direction: row;
|
|
229
|
-
flex-wrap: nowrap;
|
|
230
|
-
align-content: center;
|
|
231
|
-
justify-content: flex-start;
|
|
232
|
-
align-items: center;
|
|
233
|
-
} */
|
|
234
|
-
|
|
235
298
|
</style>
|
|
236
|
-
|
|
237
|
-
<div class="form-row">
|
|
238
|
-
<label for="node-input-name"><i class="icon-tag"></i><span data-i18n="bitpool-bacnet.label.name"></span> Name</label>
|
|
239
|
-
<input type="text" id="node-input-name" placeholder="Name">
|
|
240
|
-
</div>
|
|
241
|
-
|
|
299
|
+
|
|
242
300
|
<div class='form-row node-input-read-tabs-row'>
|
|
243
301
|
<ul style='min-width:600px;margin-bottom:20px' id='node-input-read-tabs'></ul>
|
|
244
302
|
</div>
|
|
245
303
|
|
|
246
|
-
<div
|
|
247
|
-
<
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
304
|
+
<div id='node-input-tabs-content'>
|
|
305
|
+
<div id='read-properties-tab' style='display:none'>
|
|
306
|
+
<div class="form-row">
|
|
307
|
+
<label for="node-input-name"><i class="icon-tag"></i><span data-i18n="bitpool-bacnet.label.name"></span> Name</label>
|
|
308
|
+
<input type="text" id="node-input-name" placeholder="Name">
|
|
309
|
+
</div>
|
|
310
|
+
|
|
311
|
+
<div class='form-row node-input-read-tabs-row'>
|
|
312
|
+
<ul style='min-width:600px;margin-bottom:20px' id='node-input-read-tabs'></ul>
|
|
313
|
+
</div>
|
|
314
|
+
|
|
315
|
+
<div class="form-row" id="networkInterfaceDiv">
|
|
316
|
+
<label for="node-input-local_device_address"><i class="icon-tag"></i><span data-i18n="bitpool-bacnet.label.local_device_address"></span> Network Interface</label>
|
|
317
|
+
<select id="node-input-local_device_address" style="width: 70%;" >
|
|
318
|
+
</select>
|
|
319
|
+
</div>
|
|
320
|
+
|
|
321
|
+
<div class="form-row">
|
|
322
|
+
<label for="node-input-broadCastAddr"><i class="icon-tag"></i><span data-i18n="bitpool-bacnet.label.broadCastAddr"></span> Broadcast Address </label>
|
|
323
|
+
<input type="text" id="node-input-broadCastAddr" placeholder="255.255.255.255">
|
|
324
|
+
</div>
|
|
325
|
+
|
|
326
|
+
<div class="form-row">
|
|
327
|
+
<label for="node-input-local_device_port"><i class="icon-tag"></i><span data-i18n="bitpool-bacnet.label.local_device_port"></span> Local Device Port</label>
|
|
328
|
+
<input type="text" id="node-input-local_device_port" placeholder="47808">
|
|
329
|
+
</div>
|
|
330
|
+
|
|
331
|
+
<div class="form-row">
|
|
332
|
+
<label for="node-input-deviceId"><i class="icon-tag"></i><span data-i18n="bitpool-bacnet.label.deviceId"></span> Device ID </label>
|
|
333
|
+
<input type="text" id="node-input-deviceId" placeholder="1234">
|
|
334
|
+
</div>
|
|
335
|
+
|
|
336
|
+
<div class="form-row deviceIdRange">
|
|
337
|
+
<label for="node-input-device_id_range"><i class="icon-tag"></i><span data-i18n="bitpool-bacnet.label.device_id_range"></span> Device ID Range </label>
|
|
338
|
+
<input type="checkbox" id="node-input-device_id_range_enabled" style="width: auto;"/>
|
|
339
|
+
<a style="padding-left: 60px;">Start: </a><input type="number" id="node-input-device_id_range_start" style="width: 125px;" min="0" max="4194303"/>
|
|
340
|
+
<a style="padding-left: 35px;">End: </a><input type="number" id="node-input-device_id_range_end" style="width: 125px;" min="1" max="4194303"/>
|
|
341
|
+
|
|
342
|
+
</div>
|
|
343
|
+
</div>
|
|
274
344
|
|
|
275
|
-
|
|
276
|
-
<label for="node-input-apduSize"><i class="icon-tag"></i> <span data-i18n="bitpool-bacnet.label.apduSize"></span>Max Apdu Size</label>
|
|
277
|
-
<select id="node-input-apduSize">
|
|
278
|
-
<option value="0">0</option>
|
|
279
|
-
<option value="1">1</option>
|
|
280
|
-
<option value="2">2</option>
|
|
281
|
-
<option value="3">3</option>
|
|
282
|
-
<option value="4">4</option>
|
|
283
|
-
<option value="5">5</option>
|
|
284
|
-
</select>
|
|
285
|
-
</div>
|
|
345
|
+
<div id='read-discover-tab' style='display:none'>
|
|
286
346
|
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
<
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
347
|
+
<div class="form-row">
|
|
348
|
+
<label for="node-input-apduTimeout"><i class="icon-tag"></i> <span data-i18n="bitpool-bacnet.label.apduTimeout"></span>Apdu Timeout</label>
|
|
349
|
+
<input type="text" id="node-input-apduTimeout" placeholder="10000">
|
|
350
|
+
</div>
|
|
351
|
+
|
|
352
|
+
<div class="form-row">
|
|
353
|
+
<label for="node-input-apduSize"><i class="icon-tag"></i> <span data-i18n="bitpool-bacnet.label.apduSize"></span>Max Apdu Size</label>
|
|
354
|
+
<select id="node-input-apduSize">
|
|
355
|
+
<option value="0">0</option>
|
|
356
|
+
<option value="1">1</option>
|
|
357
|
+
<option value="2">2</option>
|
|
358
|
+
<option value="3">3</option>
|
|
359
|
+
<option value="4">4</option>
|
|
360
|
+
<option value="5">5</option>
|
|
361
|
+
</select>
|
|
362
|
+
</div>
|
|
363
|
+
|
|
364
|
+
<div class="form-row">
|
|
365
|
+
<label for="node-input-maxSegments"><i class="icon-tag"></i> <span data-i18n="bitpool-bacnet.label.maxSegments"></span>Max Segments</label>
|
|
366
|
+
<select id="node-input-maxSegments">
|
|
367
|
+
<option value="0">0</option>
|
|
368
|
+
<option value="0x10">0x10</option>
|
|
369
|
+
<option value="0x20">0x20</option>
|
|
370
|
+
<option value="0x30">0x30</option>
|
|
371
|
+
<option value="0x40">0x40</option>
|
|
372
|
+
<option value="0x50">0x50</option>
|
|
373
|
+
<option value="0x60">0x60</option>
|
|
374
|
+
<option value="0x70">0x70</option>
|
|
375
|
+
</select>
|
|
376
|
+
</div>
|
|
377
|
+
|
|
378
|
+
<div class="form-row" style="align-items: center; display: flex;">
|
|
379
|
+
<label for="node-input-discover_polling_schedule_value"><i class="icon-tag"></i> <span data-i18n="bitpool-bacnet.label.bacnet_polling_schedule"></span>Global Discover Frequency</label>
|
|
380
|
+
<p style="margin-right: 5px; margin-bottom: 0px; padding-left: 7px;">Every</p>
|
|
381
|
+
<input type="text" id="node-input-discover_polling_schedule" style="display: none;">
|
|
382
|
+
<input type="text" id="node-input-discover_polling_schedule_value" placeholder="5" style="width: 70px; margin-right: 5px;">
|
|
383
|
+
<select name="timePeriod" id="node-input-discover_polling_schedule_options" style="width: 120px; margin-right: 5px;">
|
|
384
|
+
<option value="Seconds">Seconds</option>
|
|
385
|
+
<option value="Minutes">Minutes</option>
|
|
386
|
+
<option value="Hours">Hours</option>
|
|
387
|
+
<option value="Days">Days</option>
|
|
388
|
+
</select>
|
|
389
|
+
</div>
|
|
390
|
+
|
|
391
|
+
<!-- <div class="form-row deviceIdRange">
|
|
392
|
+
<label for="node-input-device_id_range"><i class="icon-tag"></i><span data-i18n="bitpool-bacnet.label.device_id_range"></span> Manual Point Discovery Instance Range </label>
|
|
393
|
+
<input type="checkbox" id="node-input-manual_instance_range_enabled" style="width: auto;"/>
|
|
394
|
+
<a style="padding-left: 60px;">Start: </a><input type="number" id="node-input-manual_instance_range_start" style="width: 125px;" min="0" max="100000"/>
|
|
395
|
+
<a style="padding-left: 35px;">End: </a><input type="number" id="node-input-manual_instance_range_end" style="width: 125px;" min="1" max="100000"/>
|
|
396
|
+
</div> -->
|
|
397
|
+
|
|
398
|
+
<div class="form-row">
|
|
399
|
+
<label for="node-input-toLog">
|
|
400
|
+
Log found device:
|
|
401
|
+
</label>
|
|
402
|
+
<input type="checkbox" id="node-input-toLogIam" style="width: auto;"/>
|
|
403
|
+
</div>
|
|
404
|
+
</div>
|
|
405
|
+
|
|
406
|
+
|
|
300
407
|
|
|
301
|
-
|
|
302
|
-
<label for="node-input-discover_polling_schedule_value"><i class="icon-tag"></i> <span data-i18n="bitpool-bacnet.label.bacnet_polling_schedule"></span>Global Discover Frequency</label>
|
|
303
|
-
<p style="margin-right: 5px; margin-bottom: 0px; padding-left: 7px;">Every</p>
|
|
304
|
-
<input type="text" id="node-input-discover_polling_schedule" style="display: none;">
|
|
305
|
-
<input type="text" id="node-input-discover_polling_schedule_value" placeholder="5" style="width: 70px; margin-right: 5px;">
|
|
306
|
-
<select name="timePeriod" id="node-input-discover_polling_schedule_options" style="width: 120px; margin-right: 5px;">
|
|
307
|
-
<option value="Seconds">Seconds</option>
|
|
308
|
-
<option value="Minutes">Minutes</option>
|
|
309
|
-
<option value="Hours">Hours</option>
|
|
310
|
-
<option value="Days">Days</option>
|
|
311
|
-
</select>
|
|
312
|
-
</div>
|
|
408
|
+
|
|
313
409
|
|
|
314
|
-
<div class="form-row">
|
|
315
|
-
<label for="node-input-
|
|
316
|
-
|
|
410
|
+
<!-- <div class="form-row">
|
|
411
|
+
<label for="node-input-toRestartNodeRed">
|
|
412
|
+
Restart Node-Red:
|
|
317
413
|
</label>
|
|
318
|
-
<
|
|
319
|
-
|
|
414
|
+
<button id="restart-nr-button">Restart Node-Red</button>
|
|
415
|
+
<input type="checkbox" id="node-input-toRestartNodeRed" style="display: none;"/>
|
|
416
|
+
</div> -->
|
|
320
417
|
|
|
321
418
|
</script>
|
|
322
419
|
<script type="text/html" data-help-name="Bacnet-Gateway">
|