@bitpoolos/edge-bacnet 1.0.6 → 1.1.0
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 +650 -233
- package/bacnet_device.js +65 -16
- package/bacnet_gateway.html +242 -99
- package/bacnet_gateway.js +211 -27
- package/bacnet_object.js +1 -1
- package/bacnet_read.html +211 -133
- package/bacnet_read.js +24 -24
- package/bacnet_server.js +321 -0
- package/bacnet_write.html +24 -15
- package/bacnet_write.js +0 -2
- package/common.js +95 -9
- package/edge-bacnet-datastore.cfg +0 -0
- package/package.json +6 -4
- 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
|
@@ -1,232 +0,0 @@
|
|
|
1
|
-
<a name="0.0.1-beta.13"></a>
|
|
2
|
-
# [0.0.1-beta.13](https://github.com/fh1ch/node-bacstack/compare/v0.0.1-beta.12...v0.0.1-beta.13) (2017-12-24)
|
|
3
|
-
|
|
4
|
-
### Features
|
|
5
|
-
|
|
6
|
-
* **bacnet-client:** implement alarming and eventing ([fbf120c](https://github.com/fh1ch/node-bacstack/commit/fbf120c0cc11861b994f51a7fa06e2160d58b1c5))
|
|
7
|
-
|
|
8
|
-
### Bug Fixes
|
|
9
|
-
|
|
10
|
-
* **bacnet-client:** use decodeCOVNotify for COV handling ([967f154](https://github.com/fh1ch/node-bacstack/commit/967f1544d4e88b185961571624e70d6d616ffed2)), closes [#69](https://github.com/fh1ch/node-bacstack/issues/69)
|
|
11
|
-
* **bacnet-node-type:** correct enum according to BACnet spec ([3c271fc](https://github.com/fh1ch/node-bacstack/commit/3c271fc49764962d54150109117986ee2c7d824a))
|
|
12
|
-
|
|
13
|
-
### BREAKING CHANGES
|
|
14
|
-
|
|
15
|
-
* bacnet-client: various function parameters changed. Adapt according latest documentation.
|
|
16
|
-
|
|
17
|
-
* bacnet-client: `isUTC` parameter has been omitted and was replaced by the `timeSyncUTC` function
|
|
18
|
-
|
|
19
|
-
* bacnet-enum: `Bacnet` prefix for all enumerators has been dropped
|
|
20
|
-
|
|
21
|
-
* client: `objectType` and `objectInstance` parameters for all functions have been replaced by a single `obejctId` parameter, expecting an object with `type` and `instance` attribute.
|
|
22
|
-
|
|
23
|
-
* `objId` renamed to `objectId`
|
|
24
|
-
|
|
25
|
-
* `objName` renamed to `objectName`
|
|
26
|
-
|
|
27
|
-
* `propertyIdentifier` renamed to `propertyId`
|
|
28
|
-
|
|
29
|
-
* `propertyArrayIndex` renamed to `index`
|
|
30
|
-
|
|
31
|
-
* `valueList` renamed to `values`
|
|
32
|
-
|
|
33
|
-
* `objectIdentifier` renamed to `objectId`
|
|
34
|
-
|
|
35
|
-
* `propertyReferences` renamed to `properties`
|
|
36
|
-
|
|
37
|
-
* `Recipient.net` renamed to `recipient.network`
|
|
38
|
-
|
|
39
|
-
* `Recipient.adr` renamed to `recipient.address`
|
|
40
|
-
|
|
41
|
-
* `subscriptionProcessId` renamed to `subscriptionProcessIdentifier`
|
|
42
|
-
|
|
43
|
-
* `objectIdentifier` renamed to `objectId`
|
|
44
|
-
|
|
45
|
-
* drop of `len` parameter for properties
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
<a name="0.0.1-beta.12"></a>
|
|
49
|
-
# [0.0.1-beta.12](https://github.com/fh1ch/node-bacstack/compare/v0.0.1-beta.11...v0.0.1-beta.12) (2017-12-05)
|
|
50
|
-
|
|
51
|
-
### Bug Fixes
|
|
52
|
-
|
|
53
|
-
* **bacnet-asn1:** correct behaviour for releasing priority / writing of null ([d6c893b](https://github.com/fh1ch/node-bacstack/commit/d6c893bed497f3fbdabc4fb9697fffb57dceeb5f)), closes [#65](https://github.com/fh1ch/node-bacstack/issues/65)
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
<a name="0.0.1-beta.11"></a>
|
|
57
|
-
# [0.0.1-beta.11](https://github.com/fh1ch/node-bacstack/compare/v0.0.1-beta.10...v0.0.1-beta.11) (2017-10-08)
|
|
58
|
-
|
|
59
|
-
### Features
|
|
60
|
-
|
|
61
|
-
* **bacnet-asn1:** implement all BACNET string encodings ([14699e2](https://github.com/fh1ch/node-bacstack/commit/14699e20b11cef5b3dc98fb465e602b6a31298fe))
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
<a name="0.0.1-beta.10"></a>
|
|
65
|
-
# [0.0.1-beta.10](https://github.com/fh1ch/node-bacstack/compare/v0.0.1-beta.9...v0.0.1-beta.10) (2017-09-19)
|
|
66
|
-
|
|
67
|
-
### Features
|
|
68
|
-
|
|
69
|
-
* **bacnet-client:** implement handling of confirmed functions ([3e29ab0](https://github.com/fh1ch/node-bacstack/commit/3e29ab0a3b84a40f5e037d35e35929ec1602f5ba))
|
|
70
|
-
* **bacnet-service:** implement decoding functionality for COV and CreateObject ([635e419](https://github.com/fh1ch/node-bacstack/commit/635e41954ffd95a4b0cff252581f380981d4d278))
|
|
71
|
-
* **encoding:** add full read/write support for ISO 8859-1 charset ([e50b005](https://github.com/fh1ch/node-bacstack/commit/e50b005dcc4abdaf6aa233781816bc5d510fc439))
|
|
72
|
-
* implemented more BACNET functions ([2721232](https://github.com/fh1ch/node-bacstack/commit/2721232a5c71f560b5e629004f1d6c73e626fd90))
|
|
73
|
-
|
|
74
|
-
### BREAKING CHANGES
|
|
75
|
-
|
|
76
|
-
* bacnet-asn1: requires renaming the `tag` parameter for all write commands to `type`
|
|
77
|
-
|
|
78
|
-
* encoding: rename enum BacnetCharacterStringEncodings value CHARACTER_ISO8859 to CHARACTER_ISO8859_1 which conforms with the BACnet
|
|
79
|
-
|
|
80
|
-
* index: the iAm event no longer passes multiple parameters but a single nested object
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
<a name="0.0.1-beta.9"></a>
|
|
84
|
-
# [0.0.1-beta.9](https://github.com/fh1ch/node-bacstack/compare/v0.0.1-beta.8...v0.0.1-beta.9) (2017-07-12)
|
|
85
|
-
|
|
86
|
-
### Features
|
|
87
|
-
|
|
88
|
-
* **bacnet-client:** expose BACNET errors and aborts to user ([8cda7de](https://github.com/fh1ch/node-bacstack/commit/8cda7de50f60c12cbaaf0c6d44240f15013ea040))
|
|
89
|
-
* **bacnet-client:** expose underlying transport errors to user ([7d547be](https://github.com/fh1ch/node-bacstack/commit/7d547be4c0220eed7c6b0601116de079d30b4849))
|
|
90
|
-
* **bacnet-client:** implement close function for BACstack and underlying UDP socket ([4be06bd](https://github.com/fh1ch/node-bacstack/commit/4be06bd2afd3775fdd76b907516cd7bc3d8bbb69))
|
|
91
|
-
* **bacnet-services:** implement missing BACNET service encodings ([db6ac7f](https://github.com/fh1ch/node-bacstack/commit/db6ac7fd62e76f1f79992b90fbf4c42fb7f1b536))
|
|
92
|
-
* **bacnet-services:** implement writePropertyMultiple service ([ea9332c](https://github.com/fh1ch/node-bacstack/commit/ea9332c945884e163dba9b908d2161047f322031))
|
|
93
|
-
* **bacnet-transport:** allow reuse of network interface when using bacstack ([0fb216c](https://github.com/fh1ch/node-bacstack/commit/0fb216ca7ab94af6ea657c3a736d6079657e4ea0))
|
|
94
|
-
* implement write-property-multiple ([5f9f7a0](https://github.com/fh1ch/node-bacstack/commit/5f9f7a0447c333414f8d9f2cd9316dbb3673bf8f))
|
|
95
|
-
* implement reinitialize-device ([1283cc3](https://github.com/fh1ch/node-bacstack/commit/1283cc32f6b0b66ea71cb16751d82f53a8f0a548))
|
|
96
|
-
* implement device-communication-control ([04a38a8](https://github.com/fh1ch/node-bacstack/commit/04a38a829afabd77c932698bec412525f4ad5ef5))
|
|
97
|
-
* implement time-sync ([9980a4d](https://github.com/fh1ch/node-bacstack/commit/9980a4d7b8524a1175be9aec182dc58eab4a23ac))
|
|
98
|
-
|
|
99
|
-
### Bug Fixes
|
|
100
|
-
|
|
101
|
-
* **ba-enums:** make sure the exported enums are not overridden ([8369cc8](https://github.com/fh1ch/node-bacstack/commit/8369cc8daa0a97d5e20e554eea5e9fbc0d570c93))
|
|
102
|
-
* **bacnet-client:** correct error message format for BACNET aborts and errors ([6533e3f](https://github.com/fh1ch/node-bacstack/commit/6533e3f3185a23b990fff66fd9b5122a1282f1a8))
|
|
103
|
-
* **string-decode:** add decoding support for ISO 8859-1 ([a224928](https://github.com/fh1ch/node-bacstack/commit/a224928360da49d1c1d620b025f5066db006d1ff))
|
|
104
|
-
|
|
105
|
-
### BREAKING CHANGES
|
|
106
|
-
|
|
107
|
-
* index: enumerations are no longer accessible via BACStack client instance and have been moved to the module level (`require("bacstack").enum;`).
|
|
108
|
-
|
|
109
|
-
* `Tag` and `Value` parameters for writeProperty and writePropertyMultiple have to be adapted to small-case
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
<a name="0.0.1-beta.8"></a>
|
|
113
|
-
# [0.0.1-beta.8](https://github.com/fh1ch/node-bacstack/compare/v0.0.1-beta.7...v0.0.1-beta.8) (2017-06-19)
|
|
114
|
-
|
|
115
|
-
### Features
|
|
116
|
-
|
|
117
|
-
* **bacnet-client:** implement additional unsupported services ([d82fefe](https://github.com/fh1ch/node-bacstack/commit/d82fefee7a2a5d53e9551cdf1ce09d9c6ca238cd))
|
|
118
|
-
* **bacnet-client:** rework unconfirmed services to utilize even emitter ([b5b8d78](https://github.com/fh1ch/node-bacstack/commit/b5b8d785e5e153a287cf73dc38f522e6a8daf347))
|
|
119
|
-
|
|
120
|
-
### Bug Fixes
|
|
121
|
-
|
|
122
|
-
* **bacnet-client:** ensure invokeId range of 0-255 ([c195331](https://github.com/fh1ch/node-bacstack/commit/c19533139097eccd7cefde4a4d709fa7923b2ad6))
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
<a name="0.0.1-beta.7"></a>
|
|
126
|
-
# [0.0.1-beta.7](https://github.com/fh1ch/node-bacstack/compare/v0.0.1-beta.6...v0.0.1-beta.7) (2017-06-11)
|
|
127
|
-
|
|
128
|
-
### Bug Fixes
|
|
129
|
-
|
|
130
|
-
* **bacnet-services:** correct all invalid no-array and no-priority checks ([ba16839](https://github.com/fh1ch/node-bacstack/commit/f0cb5bdf0da45903f893d915e9eead2e555800d8)), closes [#20](https://github.com/fh1ch/node-bacstack/issues/20)
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
<a name="0.0.1-beta.6"></a>
|
|
134
|
-
# [0.0.1-beta.6](https://github.com/fh1ch/node-bacstack/compare/v0.0.1-beta.5...v0.0.1-beta.6) (2017-06-04)
|
|
135
|
-
|
|
136
|
-
### Features
|
|
137
|
-
|
|
138
|
-
* **bacnet-asn1:** implement read-access-specification, cov-subscription, calendar decoding functionality ([b015f62](https://github.com/fh1ch/node-bacstack/commit/b015f627b06123de531462be04c8aa1b8ae9e1d9))
|
|
139
|
-
* **bacnet-asn1:** implement additional ASN1 base encoding functions ([2d6276e](https://github.com/fh1ch/node-bacstack/commit/2d6276ee9bba71b855adfb3110f9d91edb5e19be))
|
|
140
|
-
* **bacnet-services:** implemented various new BACNET service encodings ([d891305](https://github.com/fh1ch/node-bacstack/commit/d891305acf6d2eda10711d81f4cdae2279dd79b1))
|
|
141
|
-
* **bacnet-services.spec:** implement test coverage for cov-subscription and read-access-specification value types ([6665a7c](https://github.com/fh1ch/node-bacstack/commit/6665a7cc24b40ce90024d56c1833fc28a66dfd50))
|
|
142
|
-
* add JSDoc inline documentation and gh-page publishing ([44f88be](https://github.com/fh1ch/node-bacstack/commit/44f88be7a4f42195c9a4cae29efab717618681fb))
|
|
143
|
-
|
|
144
|
-
### Bug Fixes
|
|
145
|
-
|
|
146
|
-
* **bacnet-asn1:** add guard to prevent endless loops ([63d7d8f](https://github.com/fh1ch/node-bacstack/commit/63d7d8fefc0aaf3135a6d9ec330c8bf4d882cbff))
|
|
147
|
-
* **bacnet-asn1:** correct generic blob decoding context implementation ([63eacc6](https://github.com/fh1ch/node-bacstack/commit/63eacc61203f08e6fb4f403f1d00ceedca6138f6))
|
|
148
|
-
* **bacnet-asn1:** correct variable initialization for datetime decoding ([3bc1591](https://github.com/fh1ch/node-bacstack/commit/3bc159181c5ad37f2df3f3e003bd7a805dcda2cb))
|
|
149
|
-
* **bacnet-asn1:** correct bit-string encoding and decoding ([14cda6d](https://github.com/fh1ch/node-bacstack/commit/14cda6d9edf5a37432adce8d4f467c742169b269))
|
|
150
|
-
* **bacnet-asn1:** correct octet-string encoding and decoding ([aee51a5](https://github.com/fh1ch/node-bacstack/commit/aee51a5be16cf4c229dec31249807bc577a141f5))
|
|
151
|
-
* **bacnet-asn1:** correct ASN1 date and time encodings ([486153c](https://github.com/fh1ch/node-bacstack/commit/486153c1a055a7317e181c03258b611e6c3b8966))
|
|
152
|
-
* **bacnet-asn1:** align error handling to prevent dead-loop ([3feaaba](https://github.com/fh1ch/node-bacstack/commit/3feaabae56973831cf8236432ecb60142b37a6f4))
|
|
153
|
-
* **bacnet-client:** correctly handle invalid encoding cases ([347b0ed](https://github.com/fh1ch/node-bacstack/commit/347b0ed8fc4671ca1d49a49431f96dadfb97b9fb))
|
|
154
|
-
* **bacnet-client:** remove callback from store if already invoked ([16e4483](https://github.com/fh1ch/node-bacstack/commit/16e4483a39187069a6a9f1f53117e135ac924ee4))
|
|
155
|
-
* **bacnet-services:** correct string and tag comparison ([0302fe0](https://github.com/fh1ch/node-bacstack/commit/0302fe0d3748c1892b21c0cc8237c3bc74eece26))
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
<a name="0.0.1-beta.5"></a>
|
|
159
|
-
# [0.0.1-beta.5](https://github.com/fh1ch/node-bacstack/compare/v0.0.1-beta.4...v0.0.1-beta.5) (2017-05-08)
|
|
160
|
-
|
|
161
|
-
### Features
|
|
162
|
-
|
|
163
|
-
* **bacnet-asn1:** add decode support for context encoded properties ([a82fb58](https://github.com/fh1ch/node-bacstack/commit/a82fb582938da9a7921b35e9ec4c06be13a2f403))
|
|
164
|
-
* **bacnet-client:** add support for custom transports ([8a6a64e](https://github.com/fh1ch/node-bacstack/commit/8a6a64e45a5950469279185c77de5d372cc34122))
|
|
165
|
-
* **bacnet-transport:** use actual max payload size to prevent segmentation issues ([2a1a887](https://github.com/fh1ch/node-bacstack/commit/2a1a887c0b923077a59e6fb301e29bf51889e2ff))
|
|
166
|
-
|
|
167
|
-
### Bug Fixes
|
|
168
|
-
|
|
169
|
-
* **bacnet-asn1:** drop redundant boolean length accumulation ([c9622d6](https://github.com/fh1ch/node-bacstack/commit/c9622d684765f5f8c30eb8b7f0047eaa99de0b74))
|
|
170
|
-
* **bacnet-asn1:** properly handle boolean decoding with length 0 ([31b7a28](https://github.com/fh1ch/node-bacstack/commit/31b7a28b891ea01c36c8e9578619d5dec417fe2e))
|
|
171
|
-
* **bacnet-client:** start segmentation with correct sequence number 0 ([cbc3076](https://github.com/fh1ch/node-bacstack/commit/cbc307682f041f200a7692462e411a59a8607e1b))
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
<a name="0.0.1-beta.4"></a>
|
|
175
|
-
# [0.0.1-beta.4](https://github.com/fh1ch/node-bacstack/compare/v0.0.1-beta.3...v0.0.1-beta.4) (2017-05-04)
|
|
176
|
-
|
|
177
|
-
### Features
|
|
178
|
-
|
|
179
|
-
* **bacnet-asn1:** expose property value type ([b6ca82b](https://github.com/fh1ch/node-bacstack/commit/b6ca82b9a9f6dd96191853d9ddbb3275b07b159b))
|
|
180
|
-
|
|
181
|
-
### Bug Fixes
|
|
182
|
-
|
|
183
|
-
* **bacnet-client:** re-enable who-is handler ([ae1d710](https://github.com/fh1ch/node-bacstack/commit/ae1d710494cf75a1557235e28af2a3c6506aea77))
|
|
184
|
-
|
|
185
|
-
### BREAKING CHANGES
|
|
186
|
-
|
|
187
|
-
* bacnet-asn1: property values changed from single value array (`[12]`) to array of object `[{value: 12, type: 3}]`
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
<a name="0.0.1-beta.3"></a>
|
|
191
|
-
# [0.0.1-beta.3](https://github.com/fh1ch/node-bacstack/compare/v0.0.1-beta.2...v0.0.1-beta.3) (2017-04-14)
|
|
192
|
-
|
|
193
|
-
### Bug Fixes
|
|
194
|
-
|
|
195
|
-
* **bacnet-asn1:** implement missing stubbed functions ([a49b103](https://github.com/fh1ch/node-bacstack/commit/a49b103803bd3f7802fc84c3360a1ae30398a874)), closes [#3](https://github.com/fh1ch/node-bacstack/issues/3)
|
|
196
|
-
* **bacnet-client:** prevent redundant increment of invoke counter ([a59b023](https://github.com/fh1ch/node-bacstack/commit/a59b023c8aa75f4f7b12582d5df63566367d369f)), closes [#2](https://github.com/fh1ch/node-bacstack/issues/2)
|
|
197
|
-
* correct various JSHint linter findings ([ee1b2a5](https://github.com/fh1ch/node-bacstack/commit/ee1b2a5e1d2a28b43f630ed8976baedf52ca3968))
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
<a name="0.0.1-beta.2"></a>
|
|
201
|
-
# [0.0.1-beta.2](https://github.com/fh1ch/node-bacstack/compare/v0.0.1-beta.1...v0.0.1-beta.2) (2017-04-02)
|
|
202
|
-
|
|
203
|
-
### Bug Fixes
|
|
204
|
-
|
|
205
|
-
* **bacnet-client:** add missing callback definition to readProperty function ([ba16839](https://github.com/fh1ch/node-bacstack/commit/ba16839b3f73395ddeefcae891830d49f9a3431b))
|
|
206
|
-
* **bacnet-client:** add missing callback `next` to writeProperty function ([a0cfa37](https://github.com/fh1ch/node-bacstack/commit/a0cfa373ea06791ac4890e80240bd99d9c65e9f8))
|
|
207
|
-
* **bacnet-transport:** enable broadcast support in UDP socket ([b6c49c7](https://github.com/fh1ch/node-bacstack/commit/b6c49c715f487b25cfe2f729d6f2569ca2379aff))
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
<a name="0.0.1-beta.1"></a>
|
|
211
|
-
# [0.0.1-beta.1](https://github.com/fh1ch/node-bacstack/compare/v0.0.1-beta.0...v0.0.1-beta.1) (2017-02-26)
|
|
212
|
-
|
|
213
|
-
### Features
|
|
214
|
-
|
|
215
|
-
* **asn1:** implement octet-string decoding ([87348de](https://github.com/fh1ch/node-bacstack/commit/87348de3abedaec5520236b9bab22dbb64774c9f))
|
|
216
|
-
* **client:** implement default segmentation handling ([58a53e3](https://github.com/fh1ch/node-bacstack/commit/58a53e3d71568e2d8b3952ab564fb3fd55f3aec1))
|
|
217
|
-
* add configuration possibility to bacstack ([6d3c15b](https://github.com/fh1ch/node-bacstack/commit/6d3c15be1cb24b9f554c02b40c7e9b058f9186a2))
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
<a name="0.0.1-beta.0"></a>
|
|
221
|
-
# 0.0.1-beta.0 (2017-02-23)
|
|
222
|
-
|
|
223
|
-
### Features
|
|
224
|
-
|
|
225
|
-
* create initial implementation ([1c4f139](https://github.com/fh1ch/node-bacstack/commit/1c4f1398d4c211f7991fcab40a901d08701796bd))
|
|
226
|
-
* create initial project structure ([4b2c8c0](https://github.com/fh1ch/node-bacstack/commit/4b2c8c063ae119590eeefc81da1dfc4633d1b13e))
|
|
227
|
-
|
|
228
|
-
### Bug Fixes
|
|
229
|
-
|
|
230
|
-
* fix various syntax issues ([3259856](https://github.com/fh1ch/node-bacstack/commit/325985624e95caaa622efad486ac456554dacd96))
|
|
231
|
-
|
|
232
|
-
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
|
2
|
-
|
|
3
|
-
## Our Pledge
|
|
4
|
-
|
|
5
|
-
In the interest of fostering an open and welcoming environment, we as
|
|
6
|
-
contributors and maintainers pledge to making participation in our project and
|
|
7
|
-
our community a harassment-free experience for everyone, regardless of age, body
|
|
8
|
-
size, disability, ethnicity, gender identity and expression, level of
|
|
9
|
-
experience, nationality, personal appearance, race, religion, or sexual identity
|
|
10
|
-
and orientation.
|
|
11
|
-
|
|
12
|
-
## Our Standards
|
|
13
|
-
|
|
14
|
-
Examples of behavior that contributes to creating a positive environment
|
|
15
|
-
include:
|
|
16
|
-
|
|
17
|
-
* Using welcoming and inclusive language
|
|
18
|
-
* Being respectful of differing viewpoints and experiences
|
|
19
|
-
* Gracefully accepting constructive criticism
|
|
20
|
-
* Focusing on what is best for the community
|
|
21
|
-
* Showing empathy towards other community members
|
|
22
|
-
|
|
23
|
-
Examples of unacceptable behavior by participants include:
|
|
24
|
-
|
|
25
|
-
* The use of sexualized language or imagery and unwelcome sexual attention or
|
|
26
|
-
advances
|
|
27
|
-
* Trolling, insulting/derogatory comments, and personal or political attacks
|
|
28
|
-
* Public or private harassment
|
|
29
|
-
* Publishing others' private information, such as a physical or electronic
|
|
30
|
-
address, without explicit permission
|
|
31
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
|
32
|
-
professional setting
|
|
33
|
-
|
|
34
|
-
## Our Responsibilities
|
|
35
|
-
|
|
36
|
-
Project maintainers are responsible for clarifying the standards of acceptable
|
|
37
|
-
behavior and are expected to take appropriate and fair corrective action in
|
|
38
|
-
response to any instances of unacceptable behavior.
|
|
39
|
-
|
|
40
|
-
Project maintainers have the right and responsibility to remove, edit, or reject
|
|
41
|
-
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
42
|
-
not aligned to this Code of Conduct, or to ban temporarily or permanently any
|
|
43
|
-
contributor for other behaviors that they deem inappropriate, threatening,
|
|
44
|
-
offensive, or harmful.
|
|
45
|
-
|
|
46
|
-
## Scope
|
|
47
|
-
|
|
48
|
-
This Code of Conduct applies both within project spaces and in public spaces
|
|
49
|
-
when an individual is representing the project or its community. Examples of
|
|
50
|
-
representing a project or community include using an official project e-mail
|
|
51
|
-
address, posting via an official social media account, or acting as an appointed
|
|
52
|
-
representative at an online or offline event. Representation of a project may be
|
|
53
|
-
further defined and clarified by project maintainers.
|
|
54
|
-
|
|
55
|
-
## Enforcement
|
|
56
|
-
|
|
57
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
58
|
-
reported by contacting the project team at fabio@fh1.ch. The project team will
|
|
59
|
-
review and investigate all complaints, and will respond in a way that it deems
|
|
60
|
-
appropriate to the circumstances. The project team is obligated to maintain
|
|
61
|
-
confidentiality with regard to the reporter of an incident. Further details of
|
|
62
|
-
specific enforcement policies may be posted separately.
|
|
63
|
-
|
|
64
|
-
Project maintainers who do not follow or enforce the Code of Conduct in good
|
|
65
|
-
faith may face temporary or permanent repercussions as determined by other
|
|
66
|
-
members of the project's leadership.
|
|
67
|
-
|
|
68
|
-
## Attribution
|
|
69
|
-
|
|
70
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
71
|
-
version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
|
|
72
|
-
|
|
73
|
-
[homepage]: http://contributor-covenant.org
|
|
74
|
-
[version]: http://contributor-covenant.org/version/1/4/
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
# Contributing
|
|
2
|
-
|
|
3
|
-
Implementing and maintaining a protocol stack is a lot of work, therefore any
|
|
4
|
-
help is appreciated, from creating issues, to contributing documentation, fixing
|
|
5
|
-
issues and adding new features.
|
|
6
|
-
|
|
7
|
-
Please follow the best-practice contribution guidelines as mentioned below when
|
|
8
|
-
submitting any changes.
|
|
9
|
-
|
|
10
|
-
### Conventional Changelog
|
|
11
|
-
|
|
12
|
-
This module has a changelog which is automatically generated based on Git commit
|
|
13
|
-
messages. This mechanism requires that all commit messages comply with the
|
|
14
|
-
[Conventional Changelog](https://github.com/bcoe/conventional-changelog-standard/blob/master/convention.md).
|
|
15
|
-
You can check if your commit messages complies with those guidelines by using:
|
|
16
|
-
|
|
17
|
-
``` sh
|
|
18
|
-
yarn changelog
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
### Code Style
|
|
22
|
-
|
|
23
|
-
This module uses the [Google JavaScript Code-Style](https://google.github.io/styleguide/javascriptguide.xml)
|
|
24
|
-
and enforces it using [ESlint](https://eslint.org/) as primary. You can test if
|
|
25
|
-
your changes comply with the code style by executing:
|
|
26
|
-
|
|
27
|
-
``` sh
|
|
28
|
-
yarn lint
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
### Testing and Coverage
|
|
32
|
-
|
|
33
|
-
Testing is done using [Jest](https://jestjs.io/) and is separated into two
|
|
34
|
-
sets, `unit` and `integration`. While unit tries to test on function level,
|
|
35
|
-
including synthetic decoding and encoding, the integration tests are using real
|
|
36
|
-
recorded data and are only mocking the transport layer.
|
|
37
|
-
|
|
38
|
-
For both sets, the test-coverage is calculated using [Istanbul](https://istanbul.js.org/).
|
|
39
|
-
Running the tests and calculating the coverage can be done locally by executing:
|
|
40
|
-
|
|
41
|
-
``` sh
|
|
42
|
-
yarn test
|
|
43
|
-
yarn integration
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
It is expected that new features or fixes do not negatively impact the test
|
|
47
|
-
results or the coverage.
|
|
48
|
-
|
|
49
|
-
### Compliance Testing
|
|
50
|
-
|
|
51
|
-
Besides the `unit` and `integration` test-sets, which are ensuring functionality
|
|
52
|
-
using synthetical data, the `compliance` test-set is using a well established
|
|
53
|
-
3rd BACNET device emulator to test against. It uses the same test setup with
|
|
54
|
-
[Jest](https://jestjs.io/) and [Istanbul](https://istanbul.js.org/), but runs
|
|
55
|
-
inside a Docker container, while using the [BACStack Compliance Docker](https://github.com/fh1ch/bacstack-compliance-docker)
|
|
56
|
-
image to test against.
|
|
57
|
-
|
|
58
|
-
The compliance tests can be executed locally and require Docker and
|
|
59
|
-
Docker-Compose. To do so, simply run:
|
|
60
|
-
|
|
61
|
-
``` sh
|
|
62
|
-
docker-compose build
|
|
63
|
-
docker-compose up --abort-on-container-exit --exit-code-from bacnet-client
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### Documentation
|
|
67
|
-
|
|
68
|
-
The API documentation is generated using [JSDoc](http://usejsdoc.org/) and
|
|
69
|
-
relies on in-line JSDoc3 syntax. The documentation can also be built locally by
|
|
70
|
-
executing:
|
|
71
|
-
|
|
72
|
-
``` sh
|
|
73
|
-
yarn docs
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
It is expected that new features or changes are reflected in the documentation
|
|
77
|
-
as well.
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
FROM node:16-alpine
|
|
2
|
-
|
|
3
|
-
# Set working directory
|
|
4
|
-
WORKDIR /bacstack
|
|
5
|
-
|
|
6
|
-
# Install dependencies
|
|
7
|
-
COPY package.json .
|
|
8
|
-
COPY yarn.lock .
|
|
9
|
-
RUN yarn --frozen-lockfile
|
|
10
|
-
|
|
11
|
-
# Add node-bacstack
|
|
12
|
-
Add . .
|
|
13
|
-
|
|
14
|
-
# Run compliance tests
|
|
15
|
-
CMD yarn compliance
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
# Frequently Asked Questions
|
|
2
|
-
|
|
3
|
-
This file contains a collection of frequently asked questions and additional
|
|
4
|
-
background information.
|
|
5
|
-
|
|
6
|
-
## Why can't I connect to my local device simulator?
|
|
7
|
-
|
|
8
|
-
BACnet uses unicast and broadcast UDP telegrams on a single port to communicate
|
|
9
|
-
with other devices. This makes it impossible to run two BACnet stacks on the
|
|
10
|
-
same machine without taking a detour. The most promising way is either to rely
|
|
11
|
-
on something like Docker an use it's internal network (e.g. see
|
|
12
|
-
`docker-compose.yml`) or use a secondary IP for your local machine.
|
|
13
|
-
|
|
14
|
-
## I receive the error `ERR_TIMEOUT`. What does this mean?
|
|
15
|
-
|
|
16
|
-
The error type `ERR_TIMEOUT` is created by Node BACstack itself, if no answer
|
|
17
|
-
has been received from a target device in the defined timeout window. This can
|
|
18
|
-
have a variety of root-causes like issues on the remote device itself (e.g.
|
|
19
|
-
communication disabled), network issues (e.g. wrong network topology), wrong
|
|
20
|
-
communication parameters (e.g. wrong port) or ignored limitations (stack doesn't
|
|
21
|
-
support routing). Some tips regarding debugging such issues are described in
|
|
22
|
-
this document.
|
|
23
|
-
|
|
24
|
-
## I receive the error `BacnetError - Class: X - Code: Y`. What does this mean?
|
|
25
|
-
|
|
26
|
-
The two error types `BacnetError` and `BacnetAbort` are application level errors
|
|
27
|
-
and are returned by a BACnet remote device in case of a failure. Both error
|
|
28
|
-
types also contain the reason for the failure, which can be interpreted like:
|
|
29
|
-
|
|
30
|
-
```txt
|
|
31
|
-
Error: BacnetError - Class: [X] - Code: [Y]
|
|
32
|
-
[X] => In `lib/enum.js` see `ErrorClass`.
|
|
33
|
-
[Y] => In `lib/enum.js` see `ErrorCode`.
|
|
34
|
-
|
|
35
|
-
Error: BacnetAbort - Reason: [Z]
|
|
36
|
-
[Z] => In `lib/enum.js` see `RejectReason`.
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
We therefore can encode the example `Error: BacnetError - Class: 2 - Code: 32`
|
|
40
|
-
to `Error: BacnetError - Class: PROPERTY - Code: UNKNOWN_PROPERTY`, meaning the
|
|
41
|
-
property we tried to read or modify doesn't exist.
|
|
42
|
-
|
|
43
|
-
## What is the easiest way to debug failing operations?
|
|
44
|
-
|
|
45
|
-
A good way to start debugging all sort of failures, is to cross-check the
|
|
46
|
-
attempted function with another BACnet tool, such as one of the many freely
|
|
47
|
-
available BACnet browsers. This verifies, if the attempted function itself works
|
|
48
|
-
with the target device and rules-out other issues like connectivity.
|
|
49
|
-
|
|
50
|
-
This stack also has internal debug messages, which can be enabled with
|
|
51
|
-
`export DEBUG=bacstack`. It will print all sorts of internals to the console,
|
|
52
|
-
which can be used to get an idea, if or why messages are getting dropped.
|
|
53
|
-
|
|
54
|
-
Another powerful tool to not only identify network issues, but also verify sent
|
|
55
|
-
and received messages is [Wireshark](https://wireshark.org/). It comes with
|
|
56
|
-
inbuilt BACnet analysis tooling, which can help to make all BACnet telegrams
|
|
57
|
-
visible and also checks if they comply to the BACnet standard.
|
|
58
|
-
|
|
59
|
-
## Where can I get more information / examples on undocumented functions?
|
|
60
|
-
|
|
61
|
-
Beneath the rendered documentation itself, a good starting point for even more
|
|
62
|
-
examples are the compliance tests. They use the stack via it's public interface
|
|
63
|
-
and test a wide variety of scenarios. The tests are splitted into individual
|
|
64
|
-
files per function and can be found in `test/compliance/`.
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
# Node BACstack
|
|
2
|
-
|
|
3
|
-
A BACnet protocol stack written in pure JavaScript. BACnet is a protocol to
|
|
4
|
-
interact with building automation devices defined by ASHRAE.
|
|
5
|
-
|
|
6
|
-
[](http://badge.fury.io/js/bacstack)
|
|
7
|
-
[](https://travis-ci.org/fh1ch/node-bacstack)
|
|
8
|
-
[](https://coveralls.io/r/fh1ch/node-bacstack?branch=master)
|
|
9
|
-
[](https://codeclimate.com/github/fh1ch/node-bacstack)
|
|
10
|
-
[](https://david-dm.org/fh1ch/node-bacstack)
|
|
11
|
-
|
|
12
|
-
> **Note:** This is an early prototype and shall not be considered as stable.
|
|
13
|
-
> Use it with caution and at your own risk!
|
|
14
|
-
|
|
15
|
-
## Usage
|
|
16
|
-
|
|
17
|
-
Add Node BACstack to your project by using:
|
|
18
|
-
|
|
19
|
-
``` sh
|
|
20
|
-
npm install --save bacstack
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
The API documentation is available under **[fh1ch.github.io/node-bacstack](https://fh1ch.github.io/node-bacstack)**.
|
|
24
|
-
|
|
25
|
-
### Features
|
|
26
|
-
|
|
27
|
-
The BACNET standard defines a wide variety of services as part of it's
|
|
28
|
-
specification. While Node BACstack tries to be as complete as possible,
|
|
29
|
-
following services are already supported at this point in time:
|
|
30
|
-
|
|
31
|
-
| Service | Execute | Handle |
|
|
32
|
-
|--------------------------------|:-------:|:------:|
|
|
33
|
-
| Who Is / I Am | yes | yes¹ |
|
|
34
|
-
| Who Has / I Have | yes¹ | yes¹ |
|
|
35
|
-
| Time Sync | yes | yes¹ |
|
|
36
|
-
| UTC Time Sync | yes | yes¹ |
|
|
37
|
-
| Read Property | yes | yes¹ |
|
|
38
|
-
| Read Property Multiple | yes | yes¹ |
|
|
39
|
-
| Read Range | yes¹ | yes¹ |
|
|
40
|
-
| Write Property | yes | yes¹ |
|
|
41
|
-
| Write Property Multiple | yes | yes¹ |
|
|
42
|
-
| Add List Element | yes¹ | |
|
|
43
|
-
| Remove List Element | yes¹ | |
|
|
44
|
-
| Create Object | yes¹ | yes¹ |
|
|
45
|
-
| Delete Object | yes¹ | yes¹ |
|
|
46
|
-
| Subscribe COV | yes¹ | yes¹ |
|
|
47
|
-
| Subscribe Property | yes¹ | yes¹ |
|
|
48
|
-
| Atomic Read File | yes¹ | yes¹ |
|
|
49
|
-
| Atomic Write File | yes¹ | yes¹ |
|
|
50
|
-
| Reinitialize Device | yes | yes¹ |
|
|
51
|
-
| Device Communication Control | yes | yes¹ |
|
|
52
|
-
| Get Alarm Summary | yes¹ | |
|
|
53
|
-
| Get Event Information | yes¹ | |
|
|
54
|
-
| Get Enrollment Summary | | |
|
|
55
|
-
| Acknowledge Alarm | yes¹ | |
|
|
56
|
-
| Confirmed Event Notification | | yes¹ |
|
|
57
|
-
| Unconfirmed Event Notification | | yes¹ |
|
|
58
|
-
| Unconfirmed Private Transfer | | |
|
|
59
|
-
| Confirmed Private Transfer | | |
|
|
60
|
-
|
|
61
|
-
¹ Support implemented as Beta (untested, undocumented, breaking interface)
|
|
62
|
-
|
|
63
|
-
### Example
|
|
64
|
-
|
|
65
|
-
``` js
|
|
66
|
-
var bacnet = require('bacstack');
|
|
67
|
-
|
|
68
|
-
// Initialize BACStack
|
|
69
|
-
var client = new bacnet({adpuTimeout: 6000});
|
|
70
|
-
|
|
71
|
-
// Discover Devices
|
|
72
|
-
client.on('iAm', function(device) {
|
|
73
|
-
console.log('address: ', device.address);
|
|
74
|
-
console.log('deviceId: ', device.deviceId);
|
|
75
|
-
console.log('maxAdpu: ', device.maxAdpu);
|
|
76
|
-
console.log('segmentation: ', device.segmentation);
|
|
77
|
-
console.log('vendorId: ', device.vendorId);
|
|
78
|
-
});
|
|
79
|
-
client.whoIs();
|
|
80
|
-
|
|
81
|
-
// Read Device Object
|
|
82
|
-
var requestArray = [{
|
|
83
|
-
objectId: {type: 8, instance: 4194303},
|
|
84
|
-
properties: [{id: 8}]
|
|
85
|
-
}];
|
|
86
|
-
client.readPropertyMultiple('192.168.1.43', requestArray, function(err, value) {
|
|
87
|
-
console.log('value: ', value);
|
|
88
|
-
});
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
## Contributing
|
|
92
|
-
|
|
93
|
-
Implementing and maintaining a protocol stack is a lot of work, therefore any
|
|
94
|
-
help is appreciated, from creating issues, to contributing documentation, fixing
|
|
95
|
-
issues and adding new features.
|
|
96
|
-
|
|
97
|
-
Please follow the best-practice contribution guidelines as mentioned below when
|
|
98
|
-
submitting any changes.
|
|
99
|
-
|
|
100
|
-
### Conventional Changelog
|
|
101
|
-
|
|
102
|
-
This module has a changelog which is automatically generated based on Git commit
|
|
103
|
-
messages. This mechanism requires that all commit messages comply with the
|
|
104
|
-
[Conventional Changelog](https://github.com/bcoe/conventional-changelog-standard/blob/master/convention.md).
|
|
105
|
-
You can check if your commit messages complies with those guidelines by using:
|
|
106
|
-
|
|
107
|
-
``` sh
|
|
108
|
-
npm run changelog
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
### Code Style
|
|
112
|
-
|
|
113
|
-
This module uses the [Google JavaScript Code-Style](https://google.github.io/styleguide/javascriptguide.xml)
|
|
114
|
-
and enforces it using [JSCS](http://jscs.info/) as additional linter beneath
|
|
115
|
-
[JSHint](http://jshint.com/). You can test if your changes comply with the code
|
|
116
|
-
style by executing:
|
|
117
|
-
|
|
118
|
-
``` sh
|
|
119
|
-
npm run lint
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
### Testing and Coverage
|
|
123
|
-
|
|
124
|
-
Testing is done using [Mocha](https://mochajs.org/) and is separated into two
|
|
125
|
-
sets, `unit` and `integration`. While unit tries to test on function level,
|
|
126
|
-
including synthetic decoding and encoding, the integration tests are using real
|
|
127
|
-
recorded data and are only mocking the transport layer.
|
|
128
|
-
|
|
129
|
-
For both sets, the test-coverage is calculated using [Istanbul](https://istanbul.js.org/).
|
|
130
|
-
Running the tests and calculating the coverage can be done locally by executing:
|
|
131
|
-
|
|
132
|
-
``` sh
|
|
133
|
-
npm run test
|
|
134
|
-
npm run integration
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
It is expected that new features or fixes do not negatively impact the test
|
|
138
|
-
results or the coverage.
|
|
139
|
-
|
|
140
|
-
### Documentation
|
|
141
|
-
|
|
142
|
-
The API documentation is generated using [JSDoc](http://usejsdoc.org/) and
|
|
143
|
-
relies on in-line JSDoc3 syntax. The documentation can also be built locally by
|
|
144
|
-
executing:
|
|
145
|
-
|
|
146
|
-
``` sh
|
|
147
|
-
npm run docs
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
It is expected that new features or changes are reflected in the documentation
|
|
151
|
-
as well.
|
|
152
|
-
|
|
153
|
-
## License
|
|
154
|
-
|
|
155
|
-
[The MIT License](http://opensource.org/licenses/MIT)
|
|
156
|
-
|
|
157
|
-
Copyright (c) 2017 Fabio Huser <fabio@fh1.ch>
|