From 80eecb849b5f53716c84807628b395adc6cb5f12 Mon Sep 17 00:00:00 2001 From: tkulpa Date: Tue, 8 Feb 2022 15:46:58 +0100 Subject: [PATCH 1/2] Fix tests not disconnecting properly --- manualtest/test-toggle.js | 5 +- manualtest/test-writestorm.js | 4 + package.json | 3 +- src/Connection.js | 4 +- test/connection/test-connect-routing.js | 21 +- .../wiredtests/test-connect-routing-hybrid.js | 5 +- test/wiredtests/test-connect-tunnel.js | 2 +- test/wiredtests/test-control.js | 5 +- test/wiredtests/test-logotimer.js | 5 +- test/wiredtests/test-read.js | 5 +- test/wiredtests/test-readstorm.js | 5 +- typescript-sample/test-toggle-onoff.ts | 2 +- yarn.lock | 557 ++++++++++++++++++ 13 files changed, 607 insertions(+), 16 deletions(-) create mode 100644 yarn.lock diff --git a/manualtest/test-toggle.js b/manualtest/test-toggle.js index bcaedf4..9db7c8d 100644 --- a/manualtest/test-toggle.js +++ b/manualtest/test-toggle.js @@ -42,7 +42,10 @@ var connection = knx.Connection({ process.stdin.on('data', (data) => { console.log(JSON.stringify(data)); if (data[0] === 113) { - process.exit(0); + connection.disconnect(); + connection.on('disconnected', () => { + process.exit(0); + }) return; } dpVal = !dpVal; diff --git a/manualtest/test-writestorm.js b/manualtest/test-writestorm.js index 1cc180b..42c094e 100644 --- a/manualtest/test-writestorm.js +++ b/manualtest/test-writestorm.js @@ -35,6 +35,10 @@ var connection = knx.Connection({ setupSwitch('1/1/6', '1/1/106').write(v); setupSwitch('1/1/7', '1/1/107').write(v); setupSwitch('1/1/8', '1/1/108').write(v); + connection.disconnect(); + connection.on('disconnected', () => { + process.exit(0); + }) }, error: function( errmsg ) { console.error(errmsg); diff --git a/package.json b/package.json index 3dff772..a883f25 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,8 @@ "url": "https://ekarak@bitbucket.org/ekarak/knx.js.git" }, "scripts": { - "test": "multi-tape test/*/test-*.js" + "test": "multi-tape test/*/test-*.js", + "test-connection": "multi-tape test/*/test-connect-routing.js" }, "license": "MIT", "author": { diff --git a/src/Connection.js b/src/Connection.js index 5300d96..b518563 100644 --- a/src/Connection.js +++ b/src/Connection.js @@ -275,8 +275,8 @@ FSM.prototype.read = function(grpaddr, callback) { }); } -FSM.prototype.Disconnect = function(cb) { - this.transition("disconnecting"); +FSM.prototype.disconnect = function() { + this.transition('disconnecting'); // machina.js removeAllListeners equivalent: // this.off(); } diff --git a/test/connection/test-connect-routing.js b/test/connection/test-connect-routing.js index fbc7182..b415253 100644 --- a/test/connection/test-connect-routing.js +++ b/test/connection/test-connect-routing.js @@ -6,14 +6,22 @@ Error.stackTraceLimit = Infinity; const knx = require('../..'); -const address = require('../../src/Address.js'); -const assert = require('assert'); const test = require('tape'); -// test('KNX connect routing', function(t) { + let ipAddr; // FILL THIS + let ipPort; // FILL THIS + + if(!ipAddr || !ipPort) { + t.skip('No ip/port of test device') + t.end(); + process.exit(0); + } + var connection = knx.Connection({ - loglevel: 'trace', + loglevel: 'debug', + ipAddr, + ipPort, handlers: { connected: function() { console.log('----------'); @@ -21,7 +29,10 @@ test('KNX connect routing', function(t) { console.log('----------'); t.pass('connected in routing mode'); t.end(); - process.exit(0); + connection.disconnect(); + connection.on('disconnected', () => { + process.exit(0); + }) }, error: function() { t.fail('error connecting'); diff --git a/test/wiredtests/test-connect-routing-hybrid.js b/test/wiredtests/test-connect-routing-hybrid.js index d8eb7ab..f93fb77 100644 --- a/test/wiredtests/test-connect-routing-hybrid.js +++ b/test/wiredtests/test-connect-routing-hybrid.js @@ -28,7 +28,10 @@ if (process.env.hasOwnProperty('WIREDTEST')) { connected: function() { t.pass('connected in hybrid mode'); t.end(); - process.exit(0); + connection.disconnect(); + connection.on('disconnected', () => { + process.exit(0); + }) }, error: function(connstatus) { t.fail('error connecting: '+connstatus); diff --git a/test/wiredtests/test-connect-tunnel.js b/test/wiredtests/test-connect-tunnel.js index bbd1354..07c180a 100644 --- a/test/wiredtests/test-connect-tunnel.js +++ b/test/wiredtests/test-connect-tunnel.js @@ -34,7 +34,7 @@ if (process.env.hasOwnProperty('WIREDTEST')) { console.log('Connected!'); console.log('----------'); t.pass('connected in TUNNELING mode'); - this.Disconnect(); + connection.disconnect(); }, disconnected: function() { t.pass('disconnected in TUNNELING mode'); diff --git a/test/wiredtests/test-control.js b/test/wiredtests/test-control.js index 44ce019..3027c82 100644 --- a/test/wiredtests/test-control.js +++ b/test/wiredtests/test-control.js @@ -38,7 +38,10 @@ if (process.env.hasOwnProperty('WIREDTEST')) { if (counter == 4) { t.pass('all 4 responses received'); t.end(); - process.exit(0); + connection.disconnect(); + connection.on('disconnected', () => { + process.exit(0); + }) } }); // operation 1 diff --git a/test/wiredtests/test-logotimer.js b/test/wiredtests/test-logotimer.js index 87e9625..8ce35fc 100644 --- a/test/wiredtests/test-logotimer.js +++ b/test/wiredtests/test-logotimer.js @@ -29,7 +29,10 @@ if (process.env.hasOwnProperty('WIREDTEST')) { timer_status.read(function(src, response) { t.pass(util.format("**** Timer status response: %j", response)); t.end(); - process.exit(0); + connection.disconnect(); + connection.on('disconnected', () => { + process.exit(0); + }) }); timer_control.write(12); } diff --git a/test/wiredtests/test-read.js b/test/wiredtests/test-read.js index 993fc0d..47526b0 100644 --- a/test/wiredtests/test-read.js +++ b/test/wiredtests/test-read.js @@ -31,7 +31,10 @@ if (process.env.hasOwnProperty('WIREDTEST')) { console.log("KNX response from %s: %j", src, response); t.pass(util.format('read temperature: %s', response)); t.end(); - process.exit(0); + connection.disconnect(); + connection.on('disconnected', () => { + process.exit(0); + }) }); }, error: function(connstatus) { diff --git a/test/wiredtests/test-readstorm.js b/test/wiredtests/test-readstorm.js index 145163d..0cbaabd 100644 --- a/test/wiredtests/test-readstorm.js +++ b/test/wiredtests/test-readstorm.js @@ -56,7 +56,10 @@ if (process.env.hasOwnProperty('WIREDTEST')) { if (Object.keys(readback).length == options.readstorm_range) { t.pass(util.format('readstorm: all %d datapoints accounted for', options.readstorm_range)); t.end(); - process.exit(0); + connection.disconnect(); + connection.on('disconnected', () => { + process.exit(0); + }) } } }, diff --git a/typescript-sample/test-toggle-onoff.ts b/typescript-sample/test-toggle-onoff.ts index 95ab9fa..d3e5a62 100644 --- a/typescript-sample/test-toggle-onoff.ts +++ b/typescript-sample/test-toggle-onoff.ts @@ -33,7 +33,7 @@ async function onConnected() { dp.write(0) await wait(2000) - connection.Disconnect() + connection.disconnect(); } function wait(ms: number) { diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..501e648 --- /dev/null +++ b/yarn.lock @@ -0,0 +1,557 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@types/node@^6.14.4": + version "6.14.13" + resolved "https://registry.yarnpkg.com/@types/node/-/node-6.14.13.tgz#b6649578fc0b5dac88c4ef48a46cab33c50a6c72" + integrity sha512-J1F0XJ/9zxlZel5ZlbeSuHW2OpabrUAqpFuC2sm2I3by8sERQ8+KCjNKUcq8QHuzpGMWiJpo9ZxeHrqrP2KzQw== + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +binary-parser@1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/binary-parser/-/binary-parser-1.1.5.tgz#7224d61a4e2fa7b5aede69fe4f0ea6a0902b79e8" + integrity sha1-ciTWGk4vp7Wu3mn+Tw6moJAreeg= + +binary-protocol@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/binary-protocol/-/binary-protocol-0.0.0.tgz#654e2d6c207c1d2eeaa65d5d6a2b3eba59aed36e" + integrity sha1-ZU4tbCB8HS7qpl1dais+ulmu024= + dependencies: + bluebird "~2.2.2" + +bluebird@~2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-2.2.2.tgz#f1bf05abc887cf9a703886237c28610a43b1f114" + integrity sha1-8b8Fq8iHz5pwOIYjfChhCkOx8RQ= + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +call-bind@^1.0.0, call-bind@^1.0.2, call-bind@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" + integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + +deep-equal@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.1.1.tgz#b5c98c942ceffaf7cb051e24e1434a25a2e6076a" + integrity sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g== + dependencies: + is-arguments "^1.0.4" + is-date-object "^1.0.1" + is-regex "^1.0.4" + object-is "^1.0.1" + object-keys "^1.1.1" + regexp.prototype.flags "^1.2.0" + +define-properties@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" + integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== + dependencies: + object-keys "^1.0.12" + +defined@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" + integrity sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM= + +dotignore@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/dotignore/-/dotignore-0.1.2.tgz#f942f2200d28c3a76fbdd6f0ee9f3257c8a2e905" + integrity sha512-UGGGWfSauusaVJC+8fgV+NVvBXkCTmVv7sk6nojDZZvuOUNGUy0Zk4UpHQD6EDjS0jpBwcACvH4eofvyzBcRDw== + dependencies: + minimatch "^3.0.4" + +es-abstract@^1.19.1: + version "1.19.1" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.19.1.tgz#d4885796876916959de78edaa0df456627115ec3" + integrity sha512-2vJ6tjA/UfqLm2MPs7jxVybLoB8i1t1Jd9R3kISld20sIxPcTbLuggQOUxeWeAvIUkduv/CfMjuh4WmiXr2v9w== + dependencies: + call-bind "^1.0.2" + es-to-primitive "^1.2.1" + function-bind "^1.1.1" + get-intrinsic "^1.1.1" + get-symbol-description "^1.0.0" + has "^1.0.3" + has-symbols "^1.0.2" + internal-slot "^1.0.3" + is-callable "^1.2.4" + is-negative-zero "^2.0.1" + is-regex "^1.1.4" + is-shared-array-buffer "^1.0.1" + is-string "^1.0.7" + is-weakref "^1.0.1" + object-inspect "^1.11.0" + object-keys "^1.1.1" + object.assign "^4.1.2" + string.prototype.trimend "^1.0.4" + string.prototype.trimstart "^1.0.4" + unbox-primitive "^1.0.1" + +es-to-primitive@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" + integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== + dependencies: + is-callable "^1.1.4" + is-date-object "^1.0.1" + is-symbol "^1.0.2" + +events-to-array@^1.0.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/events-to-array/-/events-to-array-1.1.2.tgz#2d41f563e1fe400ed4962fe1a4d5c6a7539df7f6" + integrity sha1-LUH1Y+H+QA7Uli/hpNXGp1Od9/Y= + +for-each@~0.3.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" + integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== + dependencies: + is-callable "^1.1.3" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + +get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6" + integrity sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.1" + +get-symbol-description@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" + integrity sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.1" + +glob@^7.1.6, glob@~7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" + integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +has-bigints@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.1.tgz#64fe6acb020673e3b78db035a5af69aa9d07b113" + integrity sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA== + +has-symbols@^1.0.1, has-symbols@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.2.tgz#165d3070c00309752a1236a479331e3ac56f1423" + integrity sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw== + +has-tostringtag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" + integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== + dependencies: + has-symbols "^1.0.2" + +has@^1.0.3, has@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@~2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +internal-slot@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.3.tgz#7347e307deeea2faac2ac6205d4bc7d34967f59c" + integrity sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA== + dependencies: + get-intrinsic "^1.1.0" + has "^1.0.3" + side-channel "^1.0.4" + +ipaddr.js@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.2.0.tgz#8aba49c9192799585bdd643e0ccb50e8ae777ba4" + integrity sha1-irpJyRknmVhb3WQ+DMtQ6K53e6Q= + +is-arguments@^1.0.4: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b" + integrity sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-bigint@^1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" + integrity sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg== + dependencies: + has-bigints "^1.0.1" + +is-boolean-object@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" + integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" + integrity sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w== + +is-core-module@^2.8.1: + version "2.8.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.8.1.tgz#f59fdfca701d5879d0a6b100a40aa1560ce27211" + integrity sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA== + dependencies: + has "^1.0.3" + +is-date-object@^1.0.1: + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" + integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== + dependencies: + has-tostringtag "^1.0.0" + +is-negative-zero@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" + integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== + +is-number-object@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.6.tgz#6a7aaf838c7f0686a50b4553f7e54a96494e89f0" + integrity sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g== + dependencies: + has-tostringtag "^1.0.0" + +is-regex@^1.0.4, is-regex@^1.1.4, is-regex@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" + integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-shared-array-buffer@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz#97b0c85fbdacb59c9c446fe653b82cf2b5b7cfe6" + integrity sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA== + +is-string@^1.0.5, is-string@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" + integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== + dependencies: + has-tostringtag "^1.0.0" + +is-symbol@^1.0.2, is-symbol@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" + integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== + dependencies: + has-symbols "^1.0.2" + +is-weakref@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" + integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== + dependencies: + call-bind "^1.0.2" + +lodash@^4.17.5: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + +log-driver@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.7.tgz#63b95021f0702fedfa2c9bb0a24e7797d71871d8" + integrity sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg== + +machina@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/machina/-/machina-4.0.2.tgz#7ba13ea317fafc5c64cde75337fad168e1ac3937" + integrity sha512-OOlFrW1rd783S6tF36v5Ie/TM64gfvSl9kYLWL2cPA31J71HHWW3XrgSe1BZSFAPkh8532CMJMLv/s9L2aopiA== + dependencies: + lodash "^4.17.5" + +minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + dependencies: + brace-expansion "^1.1.7" + +minimist@^1.2.5, minimist@~1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" + integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== + +minipass@^3.0.0: + version "3.1.6" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.6.tgz#3b8150aa688a711a1521af5e8779c1d3bb4f45ee" + integrity sha512-rty5kpw9/z8SX9dmxblFA6edItUmwJgMeYDZRrwlIVN27i8gysGbznJwUggw2V/FVqFSDdWy040ZPS811DYAqQ== + dependencies: + yallist "^4.0.0" + +multi-tape@^1.2.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/multi-tape/-/multi-tape-1.6.1.tgz#3a1c8b7709257cc77777f43b2cc675965ba8e969" + integrity sha512-2pHVXwn3CErjvE3e25k1P6PkYrO40z5oLvSex5UlsQWIdSOM5YBmLbQ3vJ7UEMrKFQucw4URPRe4jA0xwvG6FA== + dependencies: + glob "^7.1.6" + minimist "^1.2.5" + stream-buffers "^3.0.2" + tap-parser "^10.1.0" + tee "^0.2.0" + +object-inspect@^1.11.0, object-inspect@^1.9.0, object-inspect@~1.12.0: + version "1.12.0" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.0.tgz#6e2c120e868fd1fd18cb4f18c31741d0d6e776f0" + integrity sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g== + +object-is@^1.0.1: + version "1.1.5" + resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.5.tgz#b9deeaa5fc7f1846a0faecdceec138e5778f53ac" + integrity sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + +object-keys@^1.0.12, object-keys@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== + +object.assign@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" + integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + has-symbols "^1.0.1" + object-keys "^1.1.1" + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + dependencies: + wrappy "1" + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + +path-parse@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== + +regexp.prototype.flags@^1.2.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.4.1.tgz#b3f4c0059af9e47eca9f3f660e51d81307e72307" + integrity sha512-pMR7hBVUUGI7PMA37m2ofIdQCsomVnas+Jn5UPGAHQ+/LlwKm/aTLJHdasmHRzlfeZwHiAOaRSo2rbBDm3nNUQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + +resolve@~1.22.0: + version "1.22.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.0.tgz#5e0b8c67c15df57a89bdbabe603a002f21731198" + integrity sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw== + dependencies: + is-core-module "^2.8.1" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + +resumer@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/resumer/-/resumer-0.0.0.tgz#f1e8f461e4064ba39e82af3cdc2a8c893d076759" + integrity sha1-8ej0YeQGS6Oegq883CqMiT0HZ1k= + dependencies: + through "~2.3.4" + +side-channel@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" + integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== + dependencies: + call-bind "^1.0.0" + get-intrinsic "^1.0.2" + object-inspect "^1.9.0" + +stream-buffers@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/stream-buffers/-/stream-buffers-3.0.2.tgz#5249005a8d5c2d00b3a32e6e0a6ea209dc4f3521" + integrity sha512-DQi1h8VEBA/lURbSwFtEHnSTb9s2/pwLEaFuNhXwy1Dx3Sa0lOuYT2yNUr4/j2fs8oCAMANtrZ5OrPZtyVs3MQ== + +string.prototype.trim@~1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.5.tgz#a587bcc8bfad8cb9829a577f5de30dd170c1682c" + integrity sha512-Lnh17webJVsD6ECeovpVN17RlAKjmz4rF9S+8Y45CkMc/ufVpTkU3vZIyIC7sllQ1FCvObZnnCdNs/HXTUOTlg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.1" + +string.prototype.trimend@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz#e75ae90c2942c63504686c18b287b4a0b1a45f80" + integrity sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + +string.prototype.trimstart@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz#b36399af4ab2999b4c9c648bd7a3fb2bb26feeed" + integrity sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== + +tap-parser@^10.1.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/tap-parser/-/tap-parser-10.1.0.tgz#7b1aac40dbcaa4716c0b58952686eae65d2b74ad" + integrity sha512-FujQeciDaOiOvaIVGS1Rpb0v4R6XkOjvWCWowlz5oKuhPkEJ8U6pxgqt38xuzYhPt8dWEnfHn2jqpZdJEkW7pA== + dependencies: + events-to-array "^1.0.1" + minipass "^3.0.0" + tap-yaml "^1.0.0" + +tap-yaml@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/tap-yaml/-/tap-yaml-1.0.0.tgz#4e31443a5489e05ca8bbb3e36cef71b5dec69635" + integrity sha512-Rxbx4EnrWkYk0/ztcm5u3/VznbyFJpyXO12dDBHKWiDVxy7O2Qw6MRrwO5H6Ww0U5YhRY/4C/VzWmFPhBQc4qQ== + dependencies: + yaml "^1.5.0" + +tape@^4.10.1: + version "4.15.0" + resolved "https://registry.yarnpkg.com/tape/-/tape-4.15.0.tgz#1b8a9563b4bc7e51302216c137732fb2ce6d1a99" + integrity sha512-SfRmG2I8QGGgJE/MCiLH8c11L5XxyUXxwK9xLRD0uiK5fehRkkSZGmR6Y1pxOt8vJ19m3sY+POTQpiaVv45/LQ== + dependencies: + call-bind "~1.0.2" + deep-equal "~1.1.1" + defined "~1.0.0" + dotignore "~0.1.2" + for-each "~0.3.3" + glob "~7.2.0" + has "~1.0.3" + inherits "~2.0.4" + is-regex "~1.1.4" + minimist "~1.2.5" + object-inspect "~1.12.0" + resolve "~1.22.0" + resumer "~0.0.0" + string.prototype.trim "~1.2.5" + through "~2.3.8" + +tee@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/tee/-/tee-0.2.0.tgz#d87b58207a0c99bd627179c2c2c6235e3d39d725" + integrity sha1-2HtYIHoMmb1icXnCwsYjXj051yU= + dependencies: + through "~1.1.1" + +through@~1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/through/-/through-1.1.2.tgz#344a5425a3773314ca7e0eb6512fbafaf76c0bfe" + integrity sha1-NEpUJaN3MxTKfg62US+6+vdsC/4= + +through@~2.3.4, through@~2.3.8: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= + +unbox-primitive@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.1.tgz#085e215625ec3162574dc8859abee78a59b14471" + integrity sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw== + dependencies: + function-bind "^1.1.1" + has-bigints "^1.0.1" + has-symbols "^1.0.2" + which-boxed-primitive "^1.0.2" + +which-boxed-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" + integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== + dependencies: + is-bigint "^1.0.1" + is-boolean-object "^1.1.0" + is-number-object "^1.0.4" + is-string "^1.0.5" + is-symbol "^1.0.3" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + +yaml@^1.5.0: + version "1.10.2" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" + integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== From 9c0e1652822d963abae3add20c207a13544ed090 Mon Sep 17 00:00:00 2001 From: tkulpa Date: Wed, 9 Feb 2022 15:38:42 +0100 Subject: [PATCH 2/2] Revert uppercase removal of disconnect method --- manualtest/test-toggle.js | 2 +- manualtest/test-writestorm.js | 2 +- src/Connection.js | 2 +- test/connection/test-connect-routing.js | 2 +- test/wiredtests/test-connect-routing-hybrid.js | 2 +- test/wiredtests/test-connect-tunnel.js | 2 +- test/wiredtests/test-control.js | 2 +- test/wiredtests/test-logotimer.js | 2 +- test/wiredtests/test-read.js | 2 +- test/wiredtests/test-readstorm.js | 2 +- typescript-sample/test-toggle-onoff.ts | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/manualtest/test-toggle.js b/manualtest/test-toggle.js index 9db7c8d..f095d0b 100644 --- a/manualtest/test-toggle.js +++ b/manualtest/test-toggle.js @@ -42,7 +42,7 @@ var connection = knx.Connection({ process.stdin.on('data', (data) => { console.log(JSON.stringify(data)); if (data[0] === 113) { - connection.disconnect(); + connection.Disconnect(); connection.on('disconnected', () => { process.exit(0); }) diff --git a/manualtest/test-writestorm.js b/manualtest/test-writestorm.js index 42c094e..872cb43 100644 --- a/manualtest/test-writestorm.js +++ b/manualtest/test-writestorm.js @@ -35,7 +35,7 @@ var connection = knx.Connection({ setupSwitch('1/1/6', '1/1/106').write(v); setupSwitch('1/1/7', '1/1/107').write(v); setupSwitch('1/1/8', '1/1/108').write(v); - connection.disconnect(); + connection.Disconnect(); connection.on('disconnected', () => { process.exit(0); }) diff --git a/src/Connection.js b/src/Connection.js index b518563..75ad94a 100644 --- a/src/Connection.js +++ b/src/Connection.js @@ -275,7 +275,7 @@ FSM.prototype.read = function(grpaddr, callback) { }); } -FSM.prototype.disconnect = function() { +FSM.prototype.Disconnect = function() { this.transition('disconnecting'); // machina.js removeAllListeners equivalent: // this.off(); diff --git a/test/connection/test-connect-routing.js b/test/connection/test-connect-routing.js index b415253..d0bcc2e 100644 --- a/test/connection/test-connect-routing.js +++ b/test/connection/test-connect-routing.js @@ -29,7 +29,7 @@ test('KNX connect routing', function(t) { console.log('----------'); t.pass('connected in routing mode'); t.end(); - connection.disconnect(); + connection.Disconnect(); connection.on('disconnected', () => { process.exit(0); }) diff --git a/test/wiredtests/test-connect-routing-hybrid.js b/test/wiredtests/test-connect-routing-hybrid.js index f93fb77..bf2d788 100644 --- a/test/wiredtests/test-connect-routing-hybrid.js +++ b/test/wiredtests/test-connect-routing-hybrid.js @@ -28,7 +28,7 @@ if (process.env.hasOwnProperty('WIREDTEST')) { connected: function() { t.pass('connected in hybrid mode'); t.end(); - connection.disconnect(); + connection.Disconnect(); connection.on('disconnected', () => { process.exit(0); }) diff --git a/test/wiredtests/test-connect-tunnel.js b/test/wiredtests/test-connect-tunnel.js index 07c180a..52c85ad 100644 --- a/test/wiredtests/test-connect-tunnel.js +++ b/test/wiredtests/test-connect-tunnel.js @@ -34,7 +34,7 @@ if (process.env.hasOwnProperty('WIREDTEST')) { console.log('Connected!'); console.log('----------'); t.pass('connected in TUNNELING mode'); - connection.disconnect(); + connection.Disconnect(); }, disconnected: function() { t.pass('disconnected in TUNNELING mode'); diff --git a/test/wiredtests/test-control.js b/test/wiredtests/test-control.js index 3027c82..10d2b6d 100644 --- a/test/wiredtests/test-control.js +++ b/test/wiredtests/test-control.js @@ -38,7 +38,7 @@ if (process.env.hasOwnProperty('WIREDTEST')) { if (counter == 4) { t.pass('all 4 responses received'); t.end(); - connection.disconnect(); + connection.Disconnect(); connection.on('disconnected', () => { process.exit(0); }) diff --git a/test/wiredtests/test-logotimer.js b/test/wiredtests/test-logotimer.js index 8ce35fc..241009c 100644 --- a/test/wiredtests/test-logotimer.js +++ b/test/wiredtests/test-logotimer.js @@ -29,7 +29,7 @@ if (process.env.hasOwnProperty('WIREDTEST')) { timer_status.read(function(src, response) { t.pass(util.format("**** Timer status response: %j", response)); t.end(); - connection.disconnect(); + connection.Disconnect(); connection.on('disconnected', () => { process.exit(0); }) diff --git a/test/wiredtests/test-read.js b/test/wiredtests/test-read.js index 47526b0..3b24344 100644 --- a/test/wiredtests/test-read.js +++ b/test/wiredtests/test-read.js @@ -31,7 +31,7 @@ if (process.env.hasOwnProperty('WIREDTEST')) { console.log("KNX response from %s: %j", src, response); t.pass(util.format('read temperature: %s', response)); t.end(); - connection.disconnect(); + connection.Disconnect(); connection.on('disconnected', () => { process.exit(0); }) diff --git a/test/wiredtests/test-readstorm.js b/test/wiredtests/test-readstorm.js index 0cbaabd..13b2ca0 100644 --- a/test/wiredtests/test-readstorm.js +++ b/test/wiredtests/test-readstorm.js @@ -56,7 +56,7 @@ if (process.env.hasOwnProperty('WIREDTEST')) { if (Object.keys(readback).length == options.readstorm_range) { t.pass(util.format('readstorm: all %d datapoints accounted for', options.readstorm_range)); t.end(); - connection.disconnect(); + connection.Disconnect(); connection.on('disconnected', () => { process.exit(0); }) diff --git a/typescript-sample/test-toggle-onoff.ts b/typescript-sample/test-toggle-onoff.ts index d3e5a62..13d83bc 100644 --- a/typescript-sample/test-toggle-onoff.ts +++ b/typescript-sample/test-toggle-onoff.ts @@ -33,7 +33,7 @@ async function onConnected() { dp.write(0) await wait(2000) - connection.disconnect(); + connection.Disconnect(); } function wait(ms: number) {