@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.
Files changed (181) hide show
  1. package/bacnet_client.js +650 -233
  2. package/bacnet_device.js +65 -16
  3. package/bacnet_gateway.html +242 -99
  4. package/bacnet_gateway.js +211 -27
  5. package/bacnet_object.js +1 -1
  6. package/bacnet_read.html +211 -133
  7. package/bacnet_read.js +24 -24
  8. package/bacnet_server.js +321 -0
  9. package/bacnet_write.html +24 -15
  10. package/bacnet_write.js +0 -2
  11. package/common.js +95 -9
  12. package/edge-bacnet-datastore.cfg +0 -0
  13. package/package.json +6 -4
  14. package/resources/confirmationservice.min.js +1 -0
  15. package/resources/confirmdialog.min.js +1 -0
  16. package/resources/fonts/primeicons.woff2 +0 -0
  17. package/resources/node-bacnet/CHANGELOG.md +481 -0
  18. package/resources/{bacstack → node-bacnet}/LICENSE.md +3 -1
  19. package/resources/node-bacnet/README.md +91 -0
  20. package/resources/node-bacnet/docs/Client.html +4422 -0
  21. package/resources/node-bacnet/docs/bacnet-icon-quad.png +0 -0
  22. package/resources/node-bacnet/docs/bacnet-icon-quad128.png +0 -0
  23. package/resources/node-bacnet/docs/bacnet-icon-quad64.png +0 -0
  24. package/resources/node-bacnet/docs/bacnet-icon-small.xcf +0 -0
  25. package/resources/node-bacnet/docs/bacnet-icon.xcf +0 -0
  26. package/resources/node-bacnet/docs/bacnet.html +7032 -0
  27. package/resources/node-bacnet/docs/client.js.html +1759 -0
  28. package/resources/node-bacnet/docs/enum.js.html +2530 -0
  29. package/resources/node-bacnet/docs/global.html +2068 -0
  30. package/resources/node-bacnet/docs/images/mocha-logo.svg +65 -0
  31. package/resources/node-bacnet/docs/index.html +283 -0
  32. package/resources/node-bacnet/docs/scripts/collapse.js +11 -0
  33. package/resources/node-bacnet/docs/scripts/jquery-3.1.1.min.js +4 -0
  34. package/resources/node-bacnet/docs/scripts/linenumber.js +26 -0
  35. package/resources/node-bacnet/docs/scripts/prettify/Apache-License-2.0.txt +202 -0
  36. package/resources/node-bacnet/docs/scripts/prettify/lang-css.js +2 -0
  37. package/resources/node-bacnet/docs/scripts/prettify/prettify.js +28 -0
  38. package/resources/node-bacnet/docs/scripts/search.js +47 -0
  39. package/resources/node-bacnet/docs/services_i-am.js.html +157 -0
  40. package/resources/node-bacnet/docs/services_time-sync.js.html +118 -0
  41. package/resources/node-bacnet/docs/services_who-is.js.html +138 -0
  42. package/resources/node-bacnet/docs/styles/jsdoc.css +683 -0
  43. package/resources/node-bacnet/docs/styles/prettify.css +82 -0
  44. package/resources/node-bacnet/examples/discover-devices.js +66 -0
  45. package/resources/node-bacnet/examples/read-device.js +510 -0
  46. package/resources/node-bacnet/examples/subscribe-cov.js +75 -0
  47. package/resources/{bacstack → node-bacnet}/index.js +3 -0
  48. package/resources/{bacstack → node-bacnet}/lib/apdu.js +56 -39
  49. package/resources/{bacstack → node-bacnet}/lib/asn1.js +550 -532
  50. package/resources/node-bacnet/lib/bvlc.js +90 -0
  51. package/resources/node-bacnet/lib/client.js +1695 -0
  52. package/resources/node-bacnet/lib/enum.js +2463 -0
  53. package/resources/node-bacnet/lib/npdu.js +123 -0
  54. package/resources/{bacstack → node-bacnet}/lib/services/add-list-element.js +12 -6
  55. package/resources/{bacstack → node-bacnet}/lib/services/alarm-acknowledge.js +3 -3
  56. package/resources/{bacstack → node-bacnet}/lib/services/alarm-summary.js +5 -4
  57. package/resources/{bacstack → node-bacnet}/lib/services/atomic-read-file.js +49 -26
  58. package/resources/{bacstack → node-bacnet}/lib/services/atomic-write-file.js +40 -23
  59. package/resources/{bacstack → node-bacnet}/lib/services/cov-notify.js +33 -17
  60. package/resources/{bacstack → node-bacnet}/lib/services/create-object.js +23 -13
  61. package/resources/{bacstack → node-bacnet}/lib/services/delete-object.js +7 -2
  62. package/resources/{bacstack → node-bacnet}/lib/services/device-communication-control.js +8 -3
  63. package/resources/{bacstack → node-bacnet}/lib/services/error.js +7 -0
  64. package/resources/{bacstack → node-bacnet}/lib/services/event-information.js +10 -9
  65. package/resources/{bacstack → node-bacnet}/lib/services/event-notify-data.js +38 -16
  66. package/resources/{bacstack → node-bacnet}/lib/services/get-enrollment-summary.js +24 -11
  67. package/resources/{bacstack → node-bacnet}/lib/services/get-event-information.js +28 -13
  68. package/resources/node-bacnet/lib/services/i-am.js +90 -0
  69. package/resources/{bacstack/lib/services/i-have-broadcast.js → node-bacnet/lib/services/i-have.js} +3 -2
  70. package/resources/{bacstack → node-bacnet}/lib/services/index.js +7 -4
  71. package/resources/{bacstack → node-bacnet}/lib/services/life-safety-operation.js +3 -2
  72. package/resources/{bacstack → node-bacnet}/lib/services/private-transfer.js +3 -2
  73. package/resources/{bacstack → node-bacnet}/lib/services/read-property-multiple.js +11 -6
  74. package/resources/{bacstack → node-bacnet}/lib/services/read-property.js +42 -24
  75. package/resources/{bacstack → node-bacnet}/lib/services/read-range.js +37 -27
  76. package/resources/node-bacnet/lib/services/register-foreign-device.js +18 -0
  77. package/resources/{bacstack → node-bacnet}/lib/services/reinitialize-device.js +9 -4
  78. package/resources/{bacstack → node-bacnet}/lib/services/subscribe-cov.js +9 -4
  79. package/resources/{bacstack → node-bacnet}/lib/services/subscribe-property.js +18 -8
  80. package/resources/{bacstack → node-bacnet}/lib/services/time-sync.js +28 -5
  81. package/resources/{bacstack → node-bacnet}/lib/services/who-has.js +3 -3
  82. package/resources/{bacstack → node-bacnet}/lib/services/who-is.js +42 -9
  83. package/resources/{bacstack → node-bacnet}/lib/services/write-property-multiple.js +33 -16
  84. package/resources/{bacstack → node-bacnet}/lib/services/write-property.js +23 -13
  85. package/resources/node-bacnet/lib/transport.js +82 -0
  86. package/resources/node-bacnet/package.json +92 -0
  87. package/resources/primeicons.css +90 -2
  88. package/resources/bacstack/.codeclimate.yml +0 -15
  89. package/resources/bacstack/.dockerignore +0 -5
  90. package/resources/bacstack/.editorconfig +0 -13
  91. package/resources/bacstack/.eslintrc.yml +0 -13
  92. package/resources/bacstack/.github/ISSUE_TEMPLATE.md +0 -26
  93. package/resources/bacstack/.github/PULL_REQUEST_TEMPLATE.md +0 -14
  94. package/resources/bacstack/.github/workflows/ci.yml +0 -39
  95. package/resources/bacstack/.jscsrc +0 -8
  96. package/resources/bacstack/.jshintrc +0 -50
  97. package/resources/bacstack/.travis.yml +0 -27
  98. package/resources/bacstack/CHANGELOG.md +0 -232
  99. package/resources/bacstack/CODE_OF_CONDUCT.md +0 -74
  100. package/resources/bacstack/CONTRIBUTING.md +0 -77
  101. package/resources/bacstack/Dockerfile +0 -15
  102. package/resources/bacstack/FAQ.md +0 -64
  103. package/resources/bacstack/README.md +0 -157
  104. package/resources/bacstack/docker-compose.yml +0 -9
  105. package/resources/bacstack/lib/adpu.js +0 -190
  106. package/resources/bacstack/lib/bvlc.js +0 -43
  107. package/resources/bacstack/lib/client.js +0 -1028
  108. package/resources/bacstack/lib/enum.js +0 -1314
  109. package/resources/bacstack/lib/npdu.js +0 -119
  110. package/resources/bacstack/lib/services/i-am-broadcast.js +0 -51
  111. package/resources/bacstack/lib/services.js +0 -1963
  112. package/resources/bacstack/lib/transport.js +0 -52
  113. package/resources/bacstack/package-lock.json +0 -7974
  114. package/resources/bacstack/package.json +0 -84
  115. package/resources/bacstack/test/compliance/who-is.spec.js +0 -37
  116. package/resources/bacstack/test/integration/acknowledge-alarm.spec.js +0 -14
  117. package/resources/bacstack/test/integration/add-list-element.spec.js +0 -16
  118. package/resources/bacstack/test/integration/confirmed-event-notification.spec.js +0 -30
  119. package/resources/bacstack/test/integration/confirmed-private-transfer.spec.js +0 -15
  120. package/resources/bacstack/test/integration/create-object.spec.js +0 -16
  121. package/resources/bacstack/test/integration/delete-object.spec.js +0 -14
  122. package/resources/bacstack/test/integration/device-communication-control.spec.js +0 -14
  123. package/resources/bacstack/test/integration/get-alarm-summary.spec.js +0 -14
  124. package/resources/bacstack/test/integration/get-enrollment-summary.spec.js +0 -15
  125. package/resources/bacstack/test/integration/get-event-information.spec.js +0 -14
  126. package/resources/bacstack/test/integration/read-file.spec.js +0 -14
  127. package/resources/bacstack/test/integration/read-property-multiple.spec.js +0 -110
  128. package/resources/bacstack/test/integration/read-property.spec.js +0 -14
  129. package/resources/bacstack/test/integration/read-range.spec.js +0 -14
  130. package/resources/bacstack/test/integration/reinitialize-sevice.spec.js +0 -14
  131. package/resources/bacstack/test/integration/remove-list-element.spec.js +0 -16
  132. package/resources/bacstack/test/integration/subscribe-cov.spec.js +0 -14
  133. package/resources/bacstack/test/integration/subscribe-property.spec.js +0 -14
  134. package/resources/bacstack/test/integration/time-sync-utc.spec.js +0 -10
  135. package/resources/bacstack/test/integration/time-sync.spec.js +0 -10
  136. package/resources/bacstack/test/integration/unconfirmed-event-notification.spec.js +0 -28
  137. package/resources/bacstack/test/integration/unconfirmed-private-transfer.spec.js +0 -11
  138. package/resources/bacstack/test/integration/utils.js +0 -30
  139. package/resources/bacstack/test/integration/who-is.spec.js +0 -17
  140. package/resources/bacstack/test/integration/write-file.spec.js +0 -14
  141. package/resources/bacstack/test/integration/write-property-multiple.spec.js +0 -19
  142. package/resources/bacstack/test/integration/write-property.spec.js +0 -14
  143. package/resources/bacstack/test/unit/apdu.spec.js +0 -162
  144. package/resources/bacstack/test/unit/asn1.spec.js +0 -39
  145. package/resources/bacstack/test/unit/bacnet-apdu.spec.js +0 -161
  146. package/resources/bacstack/test/unit/bacnet-asn1.spec.js +0 -32
  147. package/resources/bacstack/test/unit/bacnet-bvlc.spec.js +0 -57
  148. package/resources/bacstack/test/unit/bacnet-npdu.spec.js +0 -118
  149. package/resources/bacstack/test/unit/bacnet-services.spec.js +0 -2052
  150. package/resources/bacstack/test/unit/bvlc.spec.js +0 -58
  151. package/resources/bacstack/test/unit/npdu.spec.js +0 -119
  152. package/resources/bacstack/test/unit/service-add-list-element.spec.js +0 -24
  153. package/resources/bacstack/test/unit/service-alarm-acknowledge.spec.js +0 -71
  154. package/resources/bacstack/test/unit/service-alarm-summary.spec.js +0 -22
  155. package/resources/bacstack/test/unit/service-atomic-read-file.spec.js +0 -54
  156. package/resources/bacstack/test/unit/service-atomic-write-file.spec.js +0 -56
  157. package/resources/bacstack/test/unit/service-cov-notify.spec.js +0 -98
  158. package/resources/bacstack/test/unit/service-create-object.spec.js +0 -90
  159. package/resources/bacstack/test/unit/service-delete-object.spec.js +0 -17
  160. package/resources/bacstack/test/unit/service-device-communication-control.spec.js +0 -29
  161. package/resources/bacstack/test/unit/service-error.spec.js +0 -17
  162. package/resources/bacstack/test/unit/service-event-information.spec.js +0 -48
  163. package/resources/bacstack/test/unit/service-event-notify-data.spec.js +0 -310
  164. package/resources/bacstack/test/unit/service-get-enrollment-summary.spec.js +0 -45
  165. package/resources/bacstack/test/unit/service-get-event-information.spec.js +0 -62
  166. package/resources/bacstack/test/unit/service-i-am.spec.js +0 -19
  167. package/resources/bacstack/test/unit/service-i-have-broadcast.spec.js +0 -18
  168. package/resources/bacstack/test/unit/service-life-safety-operation.spec.js +0 -19
  169. package/resources/bacstack/test/unit/service-private-transfer.spec.js +0 -18
  170. package/resources/bacstack/test/unit/service-read-property-multiple.spec.js +0 -131
  171. package/resources/bacstack/test/unit/service-read-property.spec.js +0 -541
  172. package/resources/bacstack/test/unit/service-read-range.spec.js +0 -97
  173. package/resources/bacstack/test/unit/service-reinitialize-device.spec.js +0 -27
  174. package/resources/bacstack/test/unit/service-subscribe-cov.spec.js +0 -32
  175. package/resources/bacstack/test/unit/service-subscribe-property.spec.js +0 -50
  176. package/resources/bacstack/test/unit/service-time-sync.spec.js +0 -18
  177. package/resources/bacstack/test/unit/service-who-has.spec.js +0 -33
  178. package/resources/bacstack/test/unit/service-who-is.spec.js +0 -17
  179. package/resources/bacstack/test/unit/service-write-property-multiple.spec.js +0 -143
  180. package/resources/bacstack/test/unit/service-write-property.spec.js +0 -198
  181. package/resources/bacstack/test/unit/utils.js +0 -6
@@ -0,0 +1,138 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+
5
+ <meta charset="utf-8">
6
+ <title>services/who-is.js - Documentation</title>
7
+
8
+
9
+ <script src="scripts/prettify/prettify.js"></script>
10
+ <script src="scripts/prettify/lang-css.js"></script>
11
+
12
+ <link type="text/css" rel="stylesheet" href="https://fonts.googleapis.com/css?family=Montserrat:400,700">
13
+ <link type="text/css" rel="stylesheet" href="styles/prettify.css">
14
+ <link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
15
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
16
+ </head>
17
+ <body>
18
+
19
+ <input type="checkbox" id="nav-trigger" class="nav-trigger" />
20
+ <label for="nav-trigger" class="navicon-button x">
21
+ <div class="navicon"></div>
22
+ </label>
23
+
24
+ <label for="nav-trigger" class="overlay"></label>
25
+
26
+ <nav >
27
+
28
+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="bacnet.html">bacnet</a><ul class='methods'><li data-type='method'><a href="bacnet.html#.close">close</a></li><li data-type='method'><a href="bacnet.html#.confirmedCOVNotification">confirmedCOVNotification</a></li><li data-type='method'><a href="bacnet.html#.deviceCommunicationControl">deviceCommunicationControl</a></li><li data-type='method'><a href="bacnet.html#.iAmResponse">iAmResponse</a></li><li data-type='method'><a href="bacnet.html#.readProperty">readProperty</a></li><li data-type='method'><a href="bacnet.html#.readPropertyMultiple">readPropertyMultiple</a></li><li data-type='method'><a href="bacnet.html#.readPropertyResponse">readPropertyResponse</a></li><li data-type='method'><a href="bacnet.html#.reinitializeDevice">reinitializeDevice</a></li><li data-type='method'><a href="bacnet.html#.resultResponse">resultResponse</a></li><li data-type='method'><a href="bacnet.html#.timeSync">timeSync</a></li><li data-type='method'><a href="bacnet.html#.timeSyncUTC">timeSyncUTC</a></li><li data-type='method'><a href="bacnet.html#.unconfirmedCOVNotification">unconfirmedCOVNotification</a></li><li data-type='method'><a href="bacnet.html#.whoIs">whoIs</a></li><li data-type='method'><a href="bacnet.html#.writeProperty">writeProperty</a></li><li data-type='method'><a href="bacnet.html#.writePropertyMultiple">writePropertyMultiple</a></li></ul></li><li><a href="Client.html">Client</a><ul class='methods'><li data-type='method'><a href="Client.html#.createBitstring">createBitstring</a></li><li data-type='method'><a href="Client.html#acknowledgeAlarm">acknowledgeAlarm</a></li><li data-type='method'><a href="Client.html#addListElement">addListElement</a></li><li data-type='method'><a href="Client.html#confirmedEventNotification">confirmedEventNotification</a></li><li data-type='method'><a href="Client.html#confirmedPrivateTransfer">confirmedPrivateTransfer</a></li><li data-type='method'><a href="Client.html#createObject">createObject</a></li><li data-type='method'><a href="Client.html#deleteObject">deleteObject</a></li><li data-type='method'><a href="Client.html#errorResponse">errorResponse</a></li><li data-type='method'><a href="Client.html#getAlarmSummary">getAlarmSummary</a></li><li data-type='method'><a href="Client.html#getEnrollmentSummary">getEnrollmentSummary</a></li><li data-type='method'><a href="Client.html#getEventInformation">getEventInformation</a></li><li data-type='method'><a href="Client.html#iHaveResponse">iHaveResponse</a></li><li data-type='method'><a href="Client.html#readFile">readFile</a></li><li data-type='method'><a href="Client.html#readRange">readRange</a></li><li data-type='method'><a href="Client.html#removeListElement">removeListElement</a></li><li data-type='method'><a href="Client.html#sendBvlc">sendBvlc</a></li><li data-type='method'><a href="Client.html#simpleAckResponse">simpleAckResponse</a></li><li data-type='method'><a href="Client.html#subscribeCov">subscribeCov</a></li><li data-type='method'><a href="Client.html#subscribeProperty">subscribeProperty</a></li><li data-type='method'><a href="Client.html#unconfirmedEventNotification">unconfirmedEventNotification</a></li><li data-type='method'><a href="Client.html#unconfirmedPrivateTransfer">unconfirmedPrivateTransfer</a></li><li data-type='method'><a href="Client.html#writeFile">writeFile</a></li></ul></li></ul><h3>Events</h3><ul><li><a href="bacnet.html#.event:error">error</a></li><li><a href="bacnet.html#.event:iAm">iAm</a></li><li><a href="bacnet.html#.event:timeSync">timeSync</a></li><li><a href="bacnet.html#.event:whoIs">whoIs</a></li></ul><h3>Global</h3><ul><li><a href="global.html#ApplicationTag">ApplicationTag</a></li><li><a href="global.html#EnableDisable">EnableDisable</a></li><li><a href="global.html#MaxApduLengthAccepted">MaxApduLengthAccepted</a></li><li><a href="global.html#MaxSegmentsAccepted">MaxSegmentsAccepted</a></li><li><a href="global.html#ReinitializedState">ReinitializedState</a></li><li><a href="global.html#usc">usc</a></li></ul>
29
+ </nav>
30
+
31
+ <div id="main">
32
+
33
+ <h1 class="page-title">services/who-is.js</h1>
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+ <section>
42
+ <article>
43
+ <pre class="prettyprint source linenums"><code>/**
44
+ * The whoIs event represents the request for an IAm reponse to detect all
45
+ * devices in a BACNET network.
46
+ *
47
+ * @event bacnet.whoIs
48
+ * @param {number=} lowLimit - The lowest BACnet ID being queried.
49
+ * @param {number=} highLimit - The highest BACnet ID being queried.
50
+ *
51
+ * @example
52
+ * const bacnet = require('node-bacnet');
53
+ * const client = new bacnet();
54
+ *
55
+ * client.on('whoIs', (msg) => {
56
+ * console.log(
57
+ * 'address: ', msg.header.address,
58
+ * ' - lowLimit: ', msg.payload.lowLimit,
59
+ * ' - highLimit: ', msg.payload.highLimit
60
+ * );
61
+ * });
62
+ */
63
+
64
+ 'use strict';
65
+
66
+ const baAsn1 = require('../asn1');
67
+ const baEnum = require('../enum');
68
+
69
+ module.exports.encode = (buffer, lowLimit, highLimit) => {
70
+ if ((lowLimit >= 0) &amp;&amp; (lowLimit &lt;= baEnum.ASN1_MAX_INSTANCE) &amp;&amp; (highLimit >= 0) &amp;&amp; (highLimit &lt;= baEnum.ASN1_MAX_INSTANCE)) {
71
+ baAsn1.encodeContextUnsigned(buffer, 0, lowLimit);
72
+ baAsn1.encodeContextUnsigned(buffer, 1, highLimit);
73
+ }
74
+ };
75
+
76
+ module.exports.decode = (buffer, offset, apduLen) => {
77
+ let len = 0;
78
+ let value = {};
79
+ if (apduLen &lt;= 0) {
80
+ return {}; // TODO: why??
81
+ }
82
+ let result = baAsn1.decodeTagNumberAndValue(buffer, offset + len);
83
+ len += result.len;
84
+ if (result.tagNumber !== 0) {
85
+ return undefined;
86
+ }
87
+ if (apduLen &lt;= len) {
88
+ return undefined;
89
+ }
90
+ let decodedValue = baAsn1.decodeUnsigned(buffer, offset + len, result.value);
91
+ len += decodedValue.len;
92
+ if (decodedValue.value &lt;= baEnum.ASN1_MAX_INSTANCE) {
93
+ value.lowLimit = decodedValue.value;
94
+ }
95
+ if (apduLen &lt;= len) {
96
+ return undefined;
97
+ }
98
+ result = baAsn1.decodeTagNumberAndValue(buffer, offset + len);
99
+ len += result.len;
100
+ if (result.tagNumber !== 1) {
101
+ return undefined;
102
+ }
103
+ if (apduLen &lt;= len) {
104
+ return undefined;
105
+ }
106
+ decodedValue = baAsn1.decodeUnsigned(buffer, offset + len, result.value);
107
+ len += decodedValue.len;
108
+ if (decodedValue.value &lt;= baEnum.ASN1_MAX_INSTANCE) {
109
+ value.highLimit = decodedValue.value;
110
+ }
111
+ value.len = len;
112
+ return value;
113
+ };
114
+ </code></pre>
115
+ </article>
116
+ </section>
117
+
118
+
119
+
120
+
121
+
122
+
123
+ </div>
124
+
125
+ <br class="clear">
126
+
127
+ <footer>
128
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.4</a> on Tue Jun 02 2020 20:24:55 GMT+0200 (Central European Summer Time) using the <a href="https://github.com/mochajs/mocha-docdash">@mocha/docdash</a> theme.
129
+ </footer>
130
+
131
+ <script src="scripts/prettify/prettify.js"></script>
132
+ <script src="scripts/prettify/lang-css.js"></script>
133
+ <script>prettyPrint();</script>
134
+ <script src="scripts/linenumber.js"></script>
135
+
136
+
137
+ </body>
138
+ </html>