@halsystems/red-bacnet 1.1.3 → 1.1.5
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
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.1.4]
|
|
4
|
+
### Change
|
|
5
|
+
- ReadPoint to not add device to task queue if no points attached to device
|
|
6
|
+
|
|
7
|
+
## [1.1.4]
|
|
8
|
+
### Added
|
|
9
|
+
- DiscoverPoint added new discover mode: Analog and Binary only
|
|
10
|
+
|
|
3
11
|
## [1.1.3]
|
|
4
12
|
### Change
|
|
5
13
|
- ReadPoint and WritePoint input schema to strip unknown properties instead of rejecting them
|
|
@@ -38,6 +38,10 @@ const multiStateObjectTypes = [
|
|
|
38
38
|
// const scheduleObjectTypes = [
|
|
39
39
|
// baEnum.ObjectType.SCHEDULE,
|
|
40
40
|
// ];
|
|
41
|
+
const analogBinaryObjectTypes = [
|
|
42
|
+
...analogObjectTypes,
|
|
43
|
+
...binaryObjectTypes,
|
|
44
|
+
]
|
|
41
45
|
const supportedObjectTypes = [
|
|
42
46
|
...analogObjectTypes,
|
|
43
47
|
...binaryObjectTypes,
|
|
@@ -189,9 +193,10 @@ module.exports = {
|
|
|
189
193
|
.filter(obj => {
|
|
190
194
|
if (this.discoverMode == 0) // basic
|
|
191
195
|
return obj && supportedObjectTypes.includes(obj.value.type);
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
196
|
+
else if (this.discoverMode == 2) // analog and binary
|
|
197
|
+
return obj !== null && analogBinaryObjectTypes.includes(obj.value.type);
|
|
198
|
+
else // all
|
|
199
|
+
return obj !== null;
|
|
195
200
|
});
|
|
196
201
|
|
|
197
202
|
return await readPoints(
|
package/common/job/read_point.js
CHANGED
|
@@ -211,7 +211,7 @@ module.exports = {
|
|
|
211
211
|
smartReadEvent.on(EVENT_OUTPUT, (data) => {
|
|
212
212
|
this.#updateProgress(
|
|
213
213
|
Math.round((85 / size) * (count + 1) + 10)
|
|
214
|
-
)
|
|
214
|
+
);
|
|
215
215
|
|
|
216
216
|
if (Array.isArray(data.result))
|
|
217
217
|
data.result.forEach(i => {
|
|
@@ -223,15 +223,17 @@ module.exports = {
|
|
|
223
223
|
count++;
|
|
224
224
|
});
|
|
225
225
|
|
|
226
|
-
const tasks = entries
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
226
|
+
const tasks = entries
|
|
227
|
+
.filter(([_, v]) => Array.isArray(v.points) && v.points.length > 0) // eslint-disable-line
|
|
228
|
+
.map(([k, v]) => ({
|
|
229
|
+
id: k,
|
|
230
|
+
task: async () => {
|
|
231
|
+
return await smartReadProperty(
|
|
232
|
+
this.client, v.device, v.points, this.readMethod,
|
|
233
|
+
this.maxConcurrentSinglePointRead, 10, this.concurrentTaskDelay
|
|
234
|
+
);
|
|
235
|
+
}
|
|
236
|
+
}));
|
|
235
237
|
|
|
236
238
|
await concurrentTasks(smartReadEvent, tasks, this.maxConcurrentDeviceRead);
|
|
237
239
|
|
package/package.json
CHANGED
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
<select id="node-input-discoverMode">
|
|
36
36
|
<option value="0">Supported Objects Only</option>
|
|
37
37
|
<option value="1">All Objects</option>
|
|
38
|
+
<option value="2">Analog and Binary Only</option>
|
|
38
39
|
</select>
|
|
39
40
|
</div>
|
|
40
41
|
<div class="form-row">
|
|
@@ -69,6 +70,7 @@
|
|
|
69
70
|
<dt>discoverMode<span class="property-type">number</span></dt>
|
|
70
71
|
<dd> <b>Supported Objects Only</b>: AI, AO, AV, BI, BO, BV, MSI, MSO, MSV</dd>
|
|
71
72
|
<dd> <b>All Objects</b>: All object types</dd>
|
|
73
|
+
<dd> <b>Analog and Binary Only</b>: AI, AO, AV, BI, BO, BV</dd>
|
|
72
74
|
|
|
73
75
|
<dt>readMethod<span class="property-type">number</span></dt>
|
|
74
76
|
<dd> <b>Read Single Only</b>: use <code>readProperty</code></dd>
|