wi-sunモジュールでstartDiscovery時にException発生 #6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
状況: wi-sunモジュールを使用してSmrtMeterをstartDiscoveryで検索する時
_activeScanの中で”EVENT 22”を受けたときの処理でthis.SERIAL_SEND_INTERVALでstartDiscoveryを再度呼び出す処理があるが、startDiscoveryの第1引数が抜けているためExceptionが発生している。
対応:activeScanにbufを渡して、startDiscovery呼び出し時にbufを使用するように変更。
以下、発生したException
[[ Exception ]]
Mon Jan 30 2017 22:03:22 GMT+0900 (JST)
TypeError: "list" argument must be an Array of Buffers
at Function.Buffer.concat (buffer.js:314:13)
at EchonetLiteNetWisunbAdapter.createBufferSKSENDTO (/home/test/wisun_test/node_modules/node-echonet-lite/lib/net/wisunb-bp35a1.js:29:23)
at EchonetLiteNetWisunb.send (/home/test/wisun_test/node_modules/node-echonet-lite/lib/net/wisunb.js:429:33)
at Timeout.setTimeout (/home/test/wisun_test/node_modules/node-echonet-lite/lib/net/wisunb.js:286:10)
at ontimeout (timers.js:365:14)
at tryOnTimeout (timers.js:237:5)
at Timer.listOnTimeout (timers.js:207:5)
TypeError: "list" argument must be an Array of Buffers
at Function.Buffer.concat (buffer.js:314:13)
at EchonetLiteNetWisunbAdapter.createBufferSKSENDTO (/home/test/wisun_test/node_modules/node-echonet-lite/lib/net/wisunb-bp35a1.js:29:23)
at EchonetLiteNetWisunb.send (/home/test/wisun_test/node_modules/node-echonet-lite/lib/net/wisunb.js:429:33)
at Timeout.setTimeout (/home/test/wisun_test/node_modules/node-echonet-lite/lib/net/wisunb.js:286:10)
at ontimeout (timers.js:365:14)
at tryOnTimeout (timers.js:237:5)
at Timer.listOnTimeout (timers.js:207:5)