@bitpoolos/edge-bacnet 1.4.4 → 1.4.6
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/CHANGELOG.md +30 -0
- package/bacnet_client.js +463 -495
- package/bacnet_device.js +10 -0
- package/bacnet_gateway.html +141 -135
- package/bacnet_read.html +73 -47
- package/bacnet_write.html +7 -5
- package/bitpool_inject.html +49 -136
- package/package.json +1 -1
- package/resources/node-bacstack-ts/dist/lib/client.js +3 -0
- package/resources/node-bacstack-ts/dist/lib/transport.js +12 -7
- package/resources/style.css +612 -203
- package/treeBuilder.js +41 -5
package/bacnet_read.html
CHANGED
|
@@ -59,6 +59,7 @@
|
|
|
59
59
|
showPointNameDialog: ref(false),
|
|
60
60
|
deviceDisplayNameValue: ref(),
|
|
61
61
|
pointDisplayNameValue: ref(),
|
|
62
|
+
calculateProgressBarWidth: ref(),
|
|
62
63
|
};
|
|
63
64
|
},
|
|
64
65
|
setup() {
|
|
@@ -130,6 +131,7 @@
|
|
|
130
131
|
app.pointList = result.pointList;
|
|
131
132
|
app.pollFrequency = parseInt(result.pollFrequency);
|
|
132
133
|
app.deviceCount = result.deviceList.length;
|
|
134
|
+
|
|
133
135
|
//progress bar percentage
|
|
134
136
|
let progressVal = parseInt((result.renderListCount / result.deviceList.length) * 100);
|
|
135
137
|
if (typeof progressVal == "number" && !isNaN(progressVal)) {
|
|
@@ -138,6 +140,15 @@
|
|
|
138
140
|
app.progressBarValue = 0;
|
|
139
141
|
}
|
|
140
142
|
|
|
143
|
+
//set progress bar width based on device count integer digit length
|
|
144
|
+
if (app.deviceCount.toString().length >= 5) {
|
|
145
|
+
app.calculateProgressBarWidth = "width: 200px;";
|
|
146
|
+
} else if (app.deviceCount.toString().length == 4) {
|
|
147
|
+
app.calculateProgressBarWidth = "width: 210px;";
|
|
148
|
+
} else if (app.deviceCount.toString().length < 4) {
|
|
149
|
+
app.calculateProgressBarWidth = "width: 220px;";
|
|
150
|
+
}
|
|
151
|
+
|
|
141
152
|
app.$forceUpdate();
|
|
142
153
|
});
|
|
143
154
|
|
|
@@ -359,7 +370,8 @@
|
|
|
359
370
|
//update UI
|
|
360
371
|
let parentDeviceName = slotProps.node.parentDevice;
|
|
361
372
|
let parentDevice = this.devices.find((ele) => ele.label == parentDeviceName);
|
|
362
|
-
|
|
373
|
+
const slotDeviceId = slotProps.node.parentDeviceId;
|
|
374
|
+
let device = this.deviceList.find((ele) => ele.deviceId == slotDeviceId);
|
|
363
375
|
let foundDeviceIndex = this.readDevices
|
|
364
376
|
? this.readDevices.findIndex((ele) => ele.deviceId == device.deviceId)
|
|
365
377
|
: -1;
|
|
@@ -433,6 +445,16 @@
|
|
|
433
445
|
link.click();
|
|
434
446
|
}
|
|
435
447
|
}
|
|
448
|
+
} else {
|
|
449
|
+
if (parseInt(key) == keys.length - 1) {
|
|
450
|
+
// last iteration
|
|
451
|
+
var encodedUri = encodeURI(csvContent);
|
|
452
|
+
var link = document.createElement("a");
|
|
453
|
+
link.setAttribute("href", encodedUri);
|
|
454
|
+
link.setAttribute("download", "pointslist.csv");
|
|
455
|
+
document.body.appendChild(link);
|
|
456
|
+
link.click();
|
|
457
|
+
}
|
|
436
458
|
}
|
|
437
459
|
}
|
|
438
460
|
},
|
|
@@ -450,6 +472,8 @@
|
|
|
450
472
|
let app = this;
|
|
451
473
|
if ((Date.now() - slotProps.node.lastSeen) / 1000 < app.pollFrequency + 5) {
|
|
452
474
|
return true;
|
|
475
|
+
} else if (slotProps.node.isDumbMstpRouter == true || slotProps.node.isDumbMstpRouter == "true") {
|
|
476
|
+
return true;
|
|
453
477
|
}
|
|
454
478
|
return false;
|
|
455
479
|
},
|
|
@@ -529,7 +553,7 @@
|
|
|
529
553
|
app.pointDisplayNameValue = app.rightClickedPoint.node.label;
|
|
530
554
|
break;
|
|
531
555
|
case "updatePoint":
|
|
532
|
-
app.updatePoint(app.
|
|
556
|
+
app.updatePoint(app.rightClickedPoint);
|
|
533
557
|
break;
|
|
534
558
|
default:
|
|
535
559
|
break;
|
|
@@ -1060,7 +1084,7 @@
|
|
|
1060
1084
|
*
|
|
1061
1085
|
*
|
|
1062
1086
|
-->
|
|
1063
|
-
<div id="read-networkTree-tab" style="display:none">
|
|
1087
|
+
<div id="read-networkTree-tab" style="display:none" class="bp-networktree-tab">
|
|
1064
1088
|
<div id="read-networkTree-tab-content" class="networkTreeContent" style="display:none">
|
|
1065
1089
|
<p-dialog
|
|
1066
1090
|
v-model:visible="showDeviceNameDialog"
|
|
@@ -1105,17 +1129,19 @@
|
|
|
1105
1129
|
</p-dialog>
|
|
1106
1130
|
|
|
1107
1131
|
<div class="headerDiv">
|
|
1108
|
-
<a class="countStatus" style="margin-left: 15px;">
|
|
1109
|
-
<p-progressbar :value="progressBarValue" :show-value="true" style="
|
|
1110
|
-
<div class="buttonGroup"
|
|
1132
|
+
<a class="countStatus" style="margin-left: 15px;"> <span class="bp-deviceCount">{{deviceCount}}</span> Device(s)</a>
|
|
1133
|
+
<p-progressbar class="bp-readNode-progressbar" :value="progressBarValue" :show-value="true" :style="calculateProgressBarWidth"></p-progressbar>
|
|
1134
|
+
<div class="buttonGroup">
|
|
1111
1135
|
<button @click="rebuildDataModel()" class="rebuildDataButton" title="Rebuild Data Model">
|
|
1112
|
-
<i class="pi pi-wrench" style="color: #
|
|
1113
|
-
</button>
|
|
1114
|
-
<button @click="getData()" class="reloadButton" title="Reload Data">
|
|
1115
|
-
<i class="pi pi-refresh" style="color: #00AEEF;"></i>
|
|
1136
|
+
<i class="pi pi-wrench" style="color: #969696;"></i>
|
|
1116
1137
|
</button>
|
|
1138
|
+
|
|
1117
1139
|
<button @click="addAllDevices()" class="reloadButton" title="Add all devices">
|
|
1118
|
-
<i class="pi pi-plus" style="color: #
|
|
1140
|
+
<i class="pi pi-plus" style="color: #62ABE9;"></i> <span>Add all devices</span>
|
|
1141
|
+
</button>
|
|
1142
|
+
|
|
1143
|
+
<button @click="getData()" class="reloadButton" title="Reload Data">
|
|
1144
|
+
<i class="fa fa-refresh" style="color: #4D88B7;"></i> <span>Refresh tree</span>
|
|
1119
1145
|
</button>
|
|
1120
1146
|
</div>
|
|
1121
1147
|
</div>
|
|
@@ -1133,7 +1159,7 @@
|
|
|
1133
1159
|
<div v-if="isDeviceActive(slotProps)" class="deviceLabelParent">
|
|
1134
1160
|
<b class="deviceLabel">
|
|
1135
1161
|
<span class="statusOnline deviceStatus dotOnline dot"></span>
|
|
1136
|
-
{{slotProps.node.label}}
|
|
1162
|
+
<span class="deviceLabelSpan">{{slotProps.node.label}}</span>
|
|
1137
1163
|
<span v-if="hasMstpDevices(slotProps)" class="mstpDeviceCount"
|
|
1138
1164
|
> {{calculateMstpCount(slotProps)}} </span
|
|
1139
1165
|
>
|
|
@@ -1143,7 +1169,7 @@
|
|
|
1143
1169
|
<div v-else>
|
|
1144
1170
|
<b class="deviceLabel">
|
|
1145
1171
|
<span class="statusOffline deviceStatus dotOffline dot"></span>
|
|
1146
|
-
{{slotProps.node.label}}
|
|
1172
|
+
<span class="deviceLabelSpan">{{slotProps.node.label}}</span>
|
|
1147
1173
|
<span v-if="hasMstpDevices(slotProps)" class="mstpDeviceCount"
|
|
1148
1174
|
> {{calculateMstpCount(slotProps)}} </span
|
|
1149
1175
|
>
|
|
@@ -1157,12 +1183,12 @@
|
|
|
1157
1183
|
</template>
|
|
1158
1184
|
<template v-else>
|
|
1159
1185
|
<button @click="addAllClicked(slotProps)" class="addAllButton bacnetbutton">
|
|
1160
|
-
<i class="pi pi-plus
|
|
1186
|
+
<i class="pi pi-plus " title="Add all points"><a class="allFunctionsText"></a></i>
|
|
1161
1187
|
</button>
|
|
1162
1188
|
</template>
|
|
1163
1189
|
|
|
1164
1190
|
<button @click="removeAllClicked(slotProps, this)" class="removeAllButton bacnetbutton">
|
|
1165
|
-
<i class="pi pi-
|
|
1191
|
+
<i class="pi pi-times" title="Remove all points"><a class="allFunctionsText">Remove all</a></i>
|
|
1166
1192
|
</button>
|
|
1167
1193
|
</div>
|
|
1168
1194
|
</template>
|
|
@@ -1210,33 +1236,35 @@
|
|
|
1210
1236
|
*
|
|
1211
1237
|
*
|
|
1212
1238
|
-->
|
|
1213
|
-
<div id="read-readList-tab" style="display:none">
|
|
1239
|
+
<div id="read-readList-tab" class="read-readList-tab" style="display:none">
|
|
1214
1240
|
<div class="removeAllDevicesDiv">
|
|
1215
1241
|
<button @click="exportReadList()" class="export-points-button" title="Export Read List">
|
|
1216
|
-
<i class="fa fa-
|
|
1242
|
+
<i class="fa fa-arrow-circle-down"> </i><a id="fileLabelText" style="padding-left: 10px;">Export</a>
|
|
1217
1243
|
</button>
|
|
1218
1244
|
<a id="exportJSON" style="display: none"></a>
|
|
1219
1245
|
|
|
1220
1246
|
<button @click="importReadList()" class="export-points-button" title="Import Read List">
|
|
1221
|
-
<i class="fa fa-
|
|
1247
|
+
<i class="fa fa-arrow-circle-up" id="importReadListButton"></i
|
|
1222
1248
|
><a id="fileLabelText" style="padding-left: 10px;">Import</a>
|
|
1223
1249
|
</button>
|
|
1224
1250
|
<input type="file" id="readlist-file-upload" accept="application/JSON" class="inputStyle" style="display: none;" />
|
|
1225
1251
|
|
|
1226
1252
|
<button @click="removeAllDevices()" class="removeAllDevicesButton" title="Remove all devices">
|
|
1227
|
-
|
|
1253
|
+
<i class="pi pi-times" title="Remove all points"></i> <a>Remove all devices</a>
|
|
1228
1254
|
</button>
|
|
1229
1255
|
|
|
1230
|
-
<button @click="refreshReadListTree()" class="
|
|
1231
|
-
<i class="
|
|
1256
|
+
<button @click="refreshReadListTree()" class="reloadButton bp-read-list-refresh-button" title="Refresh tree">
|
|
1257
|
+
<i class="fa fa-refresh" style="color: #4D88B7;"> </i><span>Refresh tree</span>
|
|
1232
1258
|
</button>
|
|
1259
|
+
|
|
1260
|
+
|
|
1233
1261
|
</div>
|
|
1234
1262
|
|
|
1235
1263
|
<p-tree :value="readDevices">
|
|
1236
1264
|
<template #device="slotProps">
|
|
1237
1265
|
<b class="deviceLabel">{{slotProps.node.label}} </b>
|
|
1238
1266
|
<button @click="removeAllClicked(slotProps, this)" class="removeAllButton bacnetbutton">
|
|
1239
|
-
<i class="pi pi-
|
|
1267
|
+
<i class="pi pi-times"><a class="allFunctionsText">Remove device</a></i>
|
|
1240
1268
|
</button>
|
|
1241
1269
|
</template>
|
|
1242
1270
|
|
|
@@ -1256,16 +1284,17 @@
|
|
|
1256
1284
|
*
|
|
1257
1285
|
-->
|
|
1258
1286
|
<div id="read-properties-tab" style="display:none">
|
|
1259
|
-
<div class="form-row" style="display: flex;
|
|
1287
|
+
<div class="form-row bp-prop-row" style="display: flex; flex-wrap: nowrap; flex-direction: column;">
|
|
1260
1288
|
<label
|
|
1261
1289
|
for="node-input-object_properties_group"
|
|
1262
|
-
style="display: flex; align-items: center; white-space: nowrap;
|
|
1263
|
-
|
|
1290
|
+
style="display: flex; align-items: center; white-space: nowrap;"
|
|
1291
|
+
class="bp-prop-heading"
|
|
1292
|
+
>Object Properties</label
|
|
1264
1293
|
>
|
|
1265
1294
|
|
|
1266
1295
|
<div
|
|
1267
1296
|
id="node-input-object_properties_group"
|
|
1268
|
-
style="display: flex; align-items: flex-start; flex-direction: column;
|
|
1297
|
+
style="display: flex; align-items: flex-start; flex-direction: column;">
|
|
1269
1298
|
<div class="objectPropertiesLabel">
|
|
1270
1299
|
<label
|
|
1271
1300
|
for="node-input-object_property_simplePayload"
|
|
@@ -1274,7 +1303,7 @@
|
|
|
1274
1303
|
<i class="icon-tag"></i> <span data-i18n="bitpool-bacnet.label.object_property_simplePayload"></span>
|
|
1275
1304
|
<input
|
|
1276
1305
|
style="margin-left: 5px;"
|
|
1277
|
-
class=" objectProp"
|
|
1306
|
+
class=" objectProp checkbox-round"
|
|
1278
1307
|
type="checkbox"
|
|
1279
1308
|
id="node-input-object_property_simplePayload" />
|
|
1280
1309
|
<a style="white-space: nowrap; padding-left: 20px;">Simple Payload</a>
|
|
@@ -1289,7 +1318,7 @@
|
|
|
1289
1318
|
<i class="icon-tag"></i> <span data-i18n="bitpool-bacnet.label.object_property_simpleWithStatus"></span>
|
|
1290
1319
|
<input
|
|
1291
1320
|
style="margin-left: 5px;"
|
|
1292
|
-
class=" objectProp"
|
|
1321
|
+
class=" objectProp checkbox-round"
|
|
1293
1322
|
type="checkbox"
|
|
1294
1323
|
id="node-input-object_property_simpleWithStatus" />
|
|
1295
1324
|
<a style="white-space: nowrap; padding-left: 20px;">Simple With Status</a>
|
|
@@ -1304,23 +1333,20 @@
|
|
|
1304
1333
|
<i class="icon-tag"></i> <span data-i18n="bitpool-bacnet.label.object_property_fullObject"></span>
|
|
1305
1334
|
<input
|
|
1306
1335
|
style="margin-left: 5px;"
|
|
1307
|
-
class=" objectProp"
|
|
1336
|
+
class=" objectProp checkbox-round"
|
|
1308
1337
|
type="checkbox"
|
|
1309
1338
|
id="node-input-object_property_fullObject" />
|
|
1310
1339
|
<a style="white-space: nowrap; padding-left: 20px;">Full Object</a>
|
|
1311
1340
|
</label>
|
|
1312
1341
|
</div>
|
|
1313
|
-
|
|
1314
1342
|
</div>
|
|
1315
1343
|
</div>
|
|
1316
1344
|
|
|
1317
|
-
<
|
|
1318
|
-
|
|
1319
|
-
<div class="form-row msgTypeDiv" style="display: flex;">
|
|
1320
|
-
<label for="node-input-msgType" style="text-decoration: underline;"> Message type: </label>
|
|
1345
|
+
<div class="form-row msgTypeDiv bp-prop-row" style="display: flex;">
|
|
1346
|
+
<label for="node-input-msgType" class="bp-prop-heading"> Message type </label>
|
|
1321
1347
|
<div
|
|
1322
1348
|
id="node-input-msgType"
|
|
1323
|
-
style="display: flex; align-items: flex-start; flex-direction: column;
|
|
1349
|
+
style="display: flex; align-items: flex-start; flex-direction: column;">
|
|
1324
1350
|
<!-- class= checkbox-round -->
|
|
1325
1351
|
<div style="display: flex; flex-direction: row; align-items: flex-start;">
|
|
1326
1352
|
<input
|
|
@@ -1358,24 +1384,23 @@
|
|
|
1358
1384
|
</div>
|
|
1359
1385
|
</div>
|
|
1360
1386
|
|
|
1361
|
-
<
|
|
1362
|
-
|
|
1363
|
-
<div class="objectPropertiesLabel" style="margin-top: 20px; margin-bottom: 20px;">
|
|
1387
|
+
<div class="bp-checkbox-row bp-readnode-useDeviceName">
|
|
1364
1388
|
<label
|
|
1365
1389
|
for="node-input-useDeviceName"
|
|
1366
|
-
style="
|
|
1390
|
+
style="padding-left: 4px; align-items: start;"
|
|
1367
1391
|
class="objectPropertiesLabel">
|
|
1368
|
-
<
|
|
1392
|
+
<span data-i18n="bitpool-bacnet.label.useDeviceName"></span>
|
|
1393
|
+
<a style="white-space: nowrap;">Use device name in topic</a>
|
|
1369
1394
|
<input
|
|
1370
|
-
|
|
1395
|
+
style="margin-left: 10px; bottom: 3px;"
|
|
1396
|
+
class=" objectProp bp-checkbox"
|
|
1371
1397
|
type="checkbox"
|
|
1372
1398
|
id="node-input-useDeviceName" />
|
|
1373
|
-
<a style="white-space: nowrap; padding-left: 20px;">Use device name in topic</a>
|
|
1374
1399
|
</label>
|
|
1375
1400
|
</div>
|
|
1376
1401
|
|
|
1377
|
-
<div class="form-row">
|
|
1378
|
-
<label
|
|
1402
|
+
<div class="form-row bp-row">
|
|
1403
|
+
<label> Decimal place precision </label>
|
|
1379
1404
|
<input type="number" id="node-input-roundDecimal" placeholder="None" />
|
|
1380
1405
|
</div>
|
|
1381
1406
|
|
|
@@ -1385,10 +1410,11 @@
|
|
|
1385
1410
|
<input style="display: none !important;" type="checkbox" id="node-input-hiddenDeployToggle" />
|
|
1386
1411
|
</label>
|
|
1387
1412
|
|
|
1388
|
-
<
|
|
1389
|
-
|
|
1413
|
+
<hr>
|
|
1414
|
+
|
|
1415
|
+
<div class="form-row bp-import-buttons">
|
|
1390
1416
|
<label for="points-export" class="export-points-button" @click="exportPointListCsv()">
|
|
1391
|
-
<i class="fa fa-
|
|
1417
|
+
<i class="fa fa-arrow-circle-down" id="fileLabel"></i> <a id="points-export" style="padding-left: 10px;">Export point list</a>
|
|
1392
1418
|
</label>
|
|
1393
1419
|
</div>
|
|
1394
1420
|
</div>
|
package/bacnet_write.html
CHANGED
|
@@ -170,7 +170,9 @@
|
|
|
170
170
|
let foundDeviceIndex = this.writeDevices
|
|
171
171
|
? this.writeDevices.findIndex((ele) => ele.label == parentDeviceName)
|
|
172
172
|
: -1;
|
|
173
|
-
|
|
173
|
+
|
|
174
|
+
const slotDeviceId = slotProps.node.parentDeviceId;
|
|
175
|
+
let device = this.deviceList.find((ele) => ele.deviceId == slotDeviceId);
|
|
174
176
|
let deviceAddress = app.getDeviceAddress(device.address);
|
|
175
177
|
let key = `${deviceAddress}-${device.deviceId}`;
|
|
176
178
|
let parentDevice = this.devices.find((ele) => ele.ipAddr == deviceAddress);
|
|
@@ -852,7 +854,7 @@
|
|
|
852
854
|
<div>
|
|
853
855
|
<a class="countStatus" style="margin-left: 15px;">Count: {{deviceCount}} device(s)</a>
|
|
854
856
|
<button @click="getData()" class="reloadButton">
|
|
855
|
-
<i class="
|
|
857
|
+
<i class="fa fa-refresh" style="color: #4D88B7;"><a class="allFunctionsText">Refresh list</a></i>
|
|
856
858
|
</button>
|
|
857
859
|
</div>
|
|
858
860
|
|
|
@@ -920,7 +922,7 @@
|
|
|
920
922
|
</p>
|
|
921
923
|
</div>
|
|
922
924
|
|
|
923
|
-
<div id="read-writeList-tab" style="display:none">
|
|
925
|
+
<div id="read-writeList-tab" class="read-writeList-tab" style="display:none">
|
|
924
926
|
<p-tree :value="writeDevices">
|
|
925
927
|
<template #device="slotProps">
|
|
926
928
|
<b class="deviceLabel">{{slotProps.node.label}} </b>
|
|
@@ -936,7 +938,7 @@
|
|
|
936
938
|
</div>
|
|
937
939
|
|
|
938
940
|
<div id="read-write-tab" style="display:none">
|
|
939
|
-
<div class="form-row">
|
|
941
|
+
<div class="form-row bp-row">
|
|
940
942
|
<label for="node-input-applicationTag"
|
|
941
943
|
><i class="icon-tag"></i><span data-i18n="bitpool-bacnet.label.applicationTag"></span> Application Tag</label
|
|
942
944
|
>
|
|
@@ -982,7 +984,7 @@
|
|
|
982
984
|
</select>
|
|
983
985
|
</div>
|
|
984
986
|
|
|
985
|
-
<div class="form-row">
|
|
987
|
+
<div class="form-row bp-row">
|
|
986
988
|
<label for="node-input-priority"
|
|
987
989
|
><i class="icon-tag"></i><span data-i18n="bitpool-bacnet.label.priority"></span> Priority</label
|
|
988
990
|
>
|
package/bitpool_inject.html
CHANGED
|
@@ -20,38 +20,48 @@
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
<script type="text/html" data-template-name="Bitpool-Inject">
|
|
23
|
-
<div class="form-row">
|
|
24
|
-
<label for="node-input-name"
|
|
23
|
+
<div class="form-row bp-row">
|
|
24
|
+
<label for="node-input-name"> <span data-i18n="common.label.name"></span></label>
|
|
25
25
|
<input type="text" id="node-input-name" data-i18n="[placeholder]common.label.name">
|
|
26
26
|
</div>
|
|
27
27
|
|
|
28
|
+
<div class="bp-objectPropertiesLabel bp-checkbox-row">
|
|
29
|
+
<label
|
|
30
|
+
for="node-input-useDeviceName"
|
|
31
|
+
style="padding-left: 4px; align-items: start;"
|
|
32
|
+
class="objectPropertiesLabel">
|
|
33
|
+
<span data-i18n="bitpool-bacnet.label.useDeviceName"></span>
|
|
34
|
+
<a style="white-space: nowrap; padding-left: 20px;">Use device name in topic</a>
|
|
35
|
+
<input
|
|
36
|
+
style="margin-left: 10px; bottom: 3px;"
|
|
37
|
+
class=" objectProp bp-checkbox"
|
|
38
|
+
type="checkbox"
|
|
39
|
+
id="node-input-useDeviceName" />
|
|
40
|
+
</label>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
28
43
|
<div class="form-row node-input-property-container-row bitpoolInjectList">
|
|
29
44
|
<div id="node-input-property-container-list" class="optionsSelector">
|
|
30
45
|
<div class="injectHeading">
|
|
31
46
|
<a>Inject Type </a>
|
|
32
47
|
</div>
|
|
33
48
|
|
|
34
|
-
<div class="
|
|
35
|
-
<div class="msgOptions discoverOption">
|
|
36
|
-
<input class="checkbox-round" type="checkbox" id="node-input-doDiscover"
|
|
49
|
+
<div class="bp-button-group">
|
|
50
|
+
<div id="node-input-doDiscover-button" class="msgOptions discoverOption">
|
|
51
|
+
<input class="checkbox-round" type="checkbox" id="node-input-doDiscover" style="display: none;"/>
|
|
37
52
|
<label style="font-size: 16px; height: min-content; margin-bottom: 0px;" for="node-input-doDiscover">Discover</label>
|
|
38
53
|
</div>
|
|
39
|
-
<div class="msgOptions pollOption">
|
|
40
|
-
<input class="checkbox-round" type="checkbox" id="node-input-doPoll"
|
|
54
|
+
<div class="msgOptions pollOption" id="node-input-doPoll-button">
|
|
55
|
+
<input class="checkbox-round" type="checkbox" id="node-input-doPoll" style="display: none;"/>
|
|
41
56
|
<label style="font-size: 16px; height: min-content; margin-bottom: 0px;" for="node-input-doPoll">Poll</label>
|
|
42
57
|
</div>
|
|
43
58
|
</div>
|
|
44
59
|
|
|
45
|
-
<div class="form-row
|
|
60
|
+
<div class="form-row bp-msg-type-row">
|
|
46
61
|
|
|
47
|
-
<div
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
<label
|
|
51
|
-
for="node-input-object_properties_group"
|
|
52
|
-
style="display: flex; align-items: center; white-space: nowrap; text-decoration: underline;"
|
|
53
|
-
>
|
|
54
|
-
Object Properties:
|
|
62
|
+
<div id="node-input-object_properties_group" class="bp-msg-type-column bp-object">
|
|
63
|
+
<label for="node-input-object_properties_group" class="bp-msg-type-labels">
|
|
64
|
+
Object Properties
|
|
55
65
|
</label>
|
|
56
66
|
|
|
57
67
|
<div class="objectPropertiesLabel">
|
|
@@ -62,7 +72,7 @@
|
|
|
62
72
|
<i class="icon-tag"></i> <span data-i18n="bitpool-bacnet.label.object_property_simplePayload"></span>
|
|
63
73
|
<input
|
|
64
74
|
style="margin-left: 5px;"
|
|
65
|
-
class=" objectProp"
|
|
75
|
+
class=" objectProp checkbox-round"
|
|
66
76
|
type="checkbox"
|
|
67
77
|
id="node-input-object_property_simplePayload" />
|
|
68
78
|
<a style="white-space: nowrap; padding-left: 20px;">Simple Payload</a>
|
|
@@ -77,7 +87,7 @@
|
|
|
77
87
|
<i class="icon-tag"></i> <span data-i18n="bitpool-bacnet.label.object_property_simpleWithStatus"></span>
|
|
78
88
|
<input
|
|
79
89
|
style="margin-left: 5px;"
|
|
80
|
-
class=" objectProp"
|
|
90
|
+
class=" objectProp checkbox-round"
|
|
81
91
|
type="checkbox"
|
|
82
92
|
id="node-input-object_property_simpleWithStatus" />
|
|
83
93
|
<a style="white-space: nowrap; padding-left: 20px;">Simple With Status</a>
|
|
@@ -92,7 +102,7 @@
|
|
|
92
102
|
<i class="icon-tag"></i> <span data-i18n="bitpool-bacnet.label.object_property_fullObject"></span>
|
|
93
103
|
<input
|
|
94
104
|
style="margin-left: 5px;"
|
|
95
|
-
class=" objectProp"
|
|
105
|
+
class=" objectProp checkbox-round"
|
|
96
106
|
type="checkbox"
|
|
97
107
|
id="node-input-object_property_fullObject" />
|
|
98
108
|
<a style="white-space: nowrap; padding-left: 20px;">Full Object</a>
|
|
@@ -102,8 +112,8 @@
|
|
|
102
112
|
</div>
|
|
103
113
|
<div
|
|
104
114
|
id="node-input-msgType"
|
|
105
|
-
|
|
106
|
-
<label for="node-input-msgType"
|
|
115
|
+
class="bp-msg-type-column bp-msg">
|
|
116
|
+
<label for="node-input-msgType" class="bp-msg-type-labels"> Message type </label>
|
|
107
117
|
<!-- class= checkbox-round -->
|
|
108
118
|
<div style="display: flex; flex-direction: row; align-items: flex-start;">
|
|
109
119
|
<input
|
|
@@ -142,31 +152,11 @@
|
|
|
142
152
|
</div>
|
|
143
153
|
</div>
|
|
144
154
|
|
|
145
|
-
|
|
146
|
-
<div class="injectHeading" style="margin-top: 20px;">
|
|
147
|
-
<a>Topic Properties</a>
|
|
148
|
-
</div>
|
|
149
|
-
|
|
150
|
-
<div class="objectPropertiesLabel" style="margin-top: 20px;">
|
|
151
|
-
<label
|
|
152
|
-
for="node-input-useDeviceName"
|
|
153
|
-
style="padding-left: 4px; width: auto; align-items: start;"
|
|
154
|
-
class="objectPropertiesLabel">
|
|
155
|
-
<i class="icon-tag"></i> <span data-i18n="bitpool-bacnet.label.useDeviceName"></span>
|
|
156
|
-
<input
|
|
157
|
-
style="margin-left: 5px;"
|
|
158
|
-
class=" objectProp"
|
|
159
|
-
type="checkbox"
|
|
160
|
-
id="node-input-useDeviceName" />
|
|
161
|
-
<a style="white-space: nowrap; padding-left: 20px;">Use device name in topic</a>
|
|
162
|
-
</label>
|
|
163
|
-
</div>
|
|
164
|
-
|
|
165
155
|
<div class="injectHeading" style="margin-top: 20px;">
|
|
166
156
|
<a>Msg Properties</a>
|
|
167
157
|
</div>
|
|
168
158
|
|
|
169
|
-
<ol id="node-input-property-container" class="nrEditableList" style="height: 400px !important;"></ol>
|
|
159
|
+
<ol id="node-input-property-container" class="nrEditableList bp-editable-list" style="height: 400px !important;"></ol>
|
|
170
160
|
|
|
171
161
|
</div>
|
|
172
162
|
|
|
@@ -261,91 +251,6 @@
|
|
|
261
251
|
|
|
262
252
|
</script>
|
|
263
253
|
<style>
|
|
264
|
-
.optionParent {
|
|
265
|
-
display: flex;
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
.injectHeading>a {
|
|
269
|
-
margin: 0;
|
|
270
|
-
font-weight: 600;
|
|
271
|
-
font-size: 14px;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
.injectHeading {
|
|
275
|
-
border-bottom: 1px solid #cbcbcb;
|
|
276
|
-
text-align: start;
|
|
277
|
-
height: 30px;
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
.checkbox-round {
|
|
281
|
-
width: 13px !important;
|
|
282
|
-
height: 13px !important;
|
|
283
|
-
background-color: white;
|
|
284
|
-
border-radius: 50%;
|
|
285
|
-
vertical-align: middle;
|
|
286
|
-
border: 1px solid #ddd;
|
|
287
|
-
appearance: none;
|
|
288
|
-
-webkit-appearance: none;
|
|
289
|
-
outline: none;
|
|
290
|
-
cursor: pointer;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
.checkbox-round:checked {
|
|
294
|
-
background-color: #00AEEF;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
.checkbox-round:focus {
|
|
298
|
-
outline: none !important;
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
.msgOptions {
|
|
302
|
-
border: 1px solid #cbcbcb;
|
|
303
|
-
border-radius: 4px;
|
|
304
|
-
height: 35px;
|
|
305
|
-
transition: 1s;
|
|
306
|
-
display: flex;
|
|
307
|
-
flex-direction: row;
|
|
308
|
-
justify-content: space-evenly;
|
|
309
|
-
align-items: center;
|
|
310
|
-
cursor: pointer;
|
|
311
|
-
width: 50%;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
.msgOptions:hover {
|
|
315
|
-
border: 1px solid #00AEEF;
|
|
316
|
-
transition: 1s;
|
|
317
|
-
background-color: #f5fcff;
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
.discoverOption {
|
|
321
|
-
margin-top: 15px;
|
|
322
|
-
width: 180px;
|
|
323
|
-
margin-right: 20px;
|
|
324
|
-
margin-left: auto;
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
.pollOption {
|
|
328
|
-
margin-top: 15px;
|
|
329
|
-
width: 180px;
|
|
330
|
-
margin-right: auto;
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
.optionsSelector {
|
|
334
|
-
min-height: 90px !important;
|
|
335
|
-
max-height: none !important;
|
|
336
|
-
display: flex;
|
|
337
|
-
flex-direction: column;
|
|
338
|
-
flex-wrap: nowrap;
|
|
339
|
-
justify-content: space-around;
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
.bitpoolInjectList>.red-ui-editableList>.red-ui-editableList-container {
|
|
343
|
-
min-height: 120px !important;
|
|
344
|
-
max-height: none;
|
|
345
|
-
overflow-y: scroll;
|
|
346
|
-
height: 410px !important;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
254
|
/* node-red css */
|
|
350
255
|
|
|
351
256
|
.inject-time-row {
|
|
@@ -799,13 +704,9 @@
|
|
|
799
704
|
document.getElementById("node-input-object_property_simpleWithStatus").onclick = handlePayloadCheckboxClick;
|
|
800
705
|
document.getElementById("node-input-object_property_fullObject").checked = node.object_property_fullObject;
|
|
801
706
|
document.getElementById("node-input-object_property_fullObject").onclick = handlePayloadCheckboxClick;
|
|
802
|
-
|
|
803
707
|
document.getElementById("node-input-useDeviceName").checked = node.useDeviceName;
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
document.getElementById("node-input-doDiscover").onclick = handleCheckboxClick;
|
|
807
|
-
document.getElementById("node-input-doPoll").onclick = handleCheckboxClick;
|
|
808
|
-
|
|
708
|
+
document.getElementById("node-input-doDiscover-button").onclick = handleCheckboxClick;
|
|
709
|
+
document.getElementById("node-input-doPoll-button").onclick = handleCheckboxClick;
|
|
809
710
|
document.getElementById("node-input-json").checked = node.json;
|
|
810
711
|
document.getElementById("node-input-json").onclick = handleMsgTypeClick;
|
|
811
712
|
document.getElementById("node-input-mqtt").checked = node.mqtt;
|
|
@@ -813,14 +714,26 @@
|
|
|
813
714
|
document.getElementById("node-input-pointJson").checked = node.pointJson;
|
|
814
715
|
document.getElementById("node-input-pointJson").onclick = handleMsgTypeClick;
|
|
815
716
|
|
|
816
|
-
|
|
717
|
+
if (document.getElementById("node-input-doPoll").checked) {
|
|
718
|
+
document.getElementById("node-input-doPoll-button").classList.add("activeButton");
|
|
719
|
+
document.getElementById("node-input-doDiscover-button").classList.remove("activeButton");
|
|
720
|
+
} else if (document.getElementById("node-input-doDiscover").checked) {
|
|
721
|
+
document.getElementById("node-input-doDiscover-button").classList.add("activeButton");
|
|
722
|
+
document.getElementById("node-input-doPoll-button").classList.remove("activeButton");
|
|
723
|
+
}
|
|
817
724
|
|
|
818
725
|
function handleCheckboxClick() {
|
|
819
|
-
if (this.id == "node-input-doDiscover") {
|
|
726
|
+
if (this.id == "node-input-doDiscover-button") {
|
|
727
|
+
document.getElementById("node-input-doDiscover").checked = true;
|
|
820
728
|
document.getElementById("node-input-doPoll").checked = false;
|
|
729
|
+
document.getElementById("node-input-doDiscover-button").classList.add("activeButton");
|
|
730
|
+
document.getElementById("node-input-doPoll-button").classList.remove("activeButton");
|
|
821
731
|
}
|
|
822
|
-
if (this.id == "node-input-doPoll") {
|
|
732
|
+
if (this.id == "node-input-doPoll-button") {
|
|
733
|
+
document.getElementById("node-input-doPoll").checked = true;
|
|
823
734
|
document.getElementById("node-input-doDiscover").checked = false;
|
|
735
|
+
document.getElementById("node-input-doPoll-button").classList.add("activeButton");
|
|
736
|
+
document.getElementById("node-input-doDiscover-button").classList.remove("activeButton");
|
|
824
737
|
}
|
|
825
738
|
}
|
|
826
739
|
|
package/package.json
CHANGED
|
@@ -41,6 +41,7 @@ class Client extends events_1.EventEmitter {
|
|
|
41
41
|
this._lastSequenceNumber = 0;
|
|
42
42
|
this._segmentStore = [];
|
|
43
43
|
options = options || {};
|
|
44
|
+
|
|
44
45
|
this._settings = {
|
|
45
46
|
port: options.port || 47808,
|
|
46
47
|
interface: options.interface,
|
|
@@ -48,11 +49,13 @@ class Client extends events_1.EventEmitter {
|
|
|
48
49
|
broadcastAddress: options.broadcastAddress || '255.255.255.255',
|
|
49
50
|
apduTimeout: options.apduTimeout || 3000
|
|
50
51
|
};
|
|
52
|
+
|
|
51
53
|
this._transport = this._settings.transport || new transport_1.Transport({
|
|
52
54
|
port: this._settings.port,
|
|
53
55
|
interface: this._settings.interface,
|
|
54
56
|
broadcastAddress: this._settings.broadcastAddress
|
|
55
57
|
});
|
|
58
|
+
|
|
56
59
|
// Setup code
|
|
57
60
|
this._transport.on('message', this._receiveData.bind(this));
|
|
58
61
|
this._transport.on('error', this._receiveError.bind(this));
|