New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

node-red-contrib-modbus

Package Overview
Dependencies
Maintainers
1
Versions
197
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-red-contrib-modbus - npm Package Compare versions

Comparing version 5.5.0 to 5.5.1

78

CHANGELOG.md

@@ -1,8 +0,4 @@

# Changelog
## [5.5.1](https://github.com/biancoroyal/node-red-contrib-modbus/compare/v5.5.0...v5.5.1) (2020-04-01)
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
## [5.5.0](https://github.com/biancoroyal/node-red-contrib-modbus/compare/v5.5.0-beta.2...v5.5.0) (2020-04-01)
### Bug Fixes

@@ -12,7 +8,11 @@

* issue [#175](https://github.com/biancoroyal/node-red-contrib-modbus/issues/175) less update queue info node on queue-changes ([45eae4e](https://github.com/biancoroyal/node-red-contrib-modbus/commit/45eae4e405fa788e5189d19c1c55d828b03b52b1))
* serial lock toggle for issue [#175](https://github.com/biancoroyal/node-red-contrib-modbus/issues/175) ([45e4be8](https://github.com/biancoroyal/node-red-contrib-modbus/commit/45e4be85710eb6db18cb4cbc7d3a21e62a3eea68))
* serial multiple UnitIds issue [#175](https://github.com/biancoroyal/node-red-contrib-modbus/issues/175) ([2f6fedf](https://github.com/biancoroyal/node-red-contrib-modbus/commit/2f6fedfb7a815f92434f22ee9110bf1b6a5fa68a))
* similar empty msg structure ([cfbd834](https://github.com/biancoroyal/node-red-contrib-modbus/commit/cfbd8345cc489d2766708a2413d6c5b14f5bc021))
## [5.5.0-beta.2](https://github.com/biancoroyal/node-red-contrib-modbus/compare/v5.5.0-beta.0...v5.5.0-beta.2) (2020-04-01)
# [5.5.0-beta.2](https://github.com/biancoroyal/node-red-contrib-modbus/compare/v5.5.0-beta.0...v5.5.0-beta.2) (2020-04-01)
### Bug Fixes

@@ -23,12 +23,12 @@

## [5.5.0-beta.1](https://github.com/biancoroyal/node-red-contrib-modbus/compare/v5.5.0-beta.0...v5.5.0-beta.1) (2020-03-31)
# [5.5.0-beta.0](https://github.com/biancoroyal/node-red-contrib-modbus/compare/v5.4.1-beta.1...v5.5.0-beta.0) (2020-03-30)
### Bug Fixes
* testing works with new flaqs and clean code ([65dba5e](https://github.com/biancoroyal/node-red-contrib-modbus/commit/65dba5e744030221c006ce249499e340fafed7a4))
* response delay in server in not available for now ([4542763](https://github.com/biancoroyal/node-red-contrib-modbus/commit/45427637a5a18a3a345594311e2eae1969fdea2f))
## [5.5.0-beta.0](https://github.com/biancoroyal/node-red-contrib-modbus/compare/v5.4.1-beta.1...v5.5.0-beta.0) (2020-03-30)
### Features

@@ -39,53 +39,38 @@

### Bug Fixes
* response delay in server in not available for now ([4542763](https://github.com/biancoroyal/node-red-contrib-modbus/commit/45427637a5a18a3a345594311e2eae1969fdea2f))
## [5.4.1-beta.1](https://github.com/biancoroyal/node-red-contrib-modbus/compare/v5.4.0...v5.4.1-beta.1) (2020-03-30)
### [5.4.1-beta.1](https://github.com/biancoroyal/node-red-contrib-modbus/compare/v5.4.1-beta.0...v5.4.1-beta.1) (2020-03-30)
### Bug Fixes
* [#178](https://github.com/biancoroyal/node-red-contrib-modbus/issues/178) debug per node to see where it is not correct or fallback core log ([ff69134](https://github.com/biancoroyal/node-red-contrib-modbus/commit/ff691343ab7c93451642922bf6fa237f777b934f))
* [#178](https://github.com/biancoroyal/node-red-contrib-modbus/issues/178) too get no crash on internal debug log ([a0389e7](https://github.com/biancoroyal/node-red-contrib-modbus/commit/a0389e7b051d736bc958fee4fbfeb1879cda99e3)), closes [#180](https://github.com/biancoroyal/node-red-contrib-modbus/issues/180)
* activate sending with promise ([fcb816e](https://github.com/biancoroyal/node-red-contrib-modbus/commit/fcb816e39754ab3f8840a0d481b0831f375e6a3f))
* issue [#182](https://github.com/biancoroyal/node-red-contrib-modbus/issues/182) to get better information from the FSM ([78be12b](https://github.com/biancoroyal/node-red-contrib-modbus/commit/78be12b72403e6de12d6f8c1ee11f633828ff04e))
* issue [#179](https://github.com/biancoroyal/node-red-contrib-modbus/issues/179) ([1824032](https://github.com/biancoroyal/node-red-contrib-modbus/commit/18240323cb0b50716987a9dfec2a5de0f9930d12))
* issue [#180](https://github.com/biancoroyal/node-red-contrib-modbus/issues/180) msg as expected from other msg structures ([f1e9a43](https://github.com/biancoroyal/node-red-contrib-modbus/commit/f1e9a4381449d99cc32109844d60ef98dfb0920c))
* less EMPTY switches to the FSM ([29d79bc](https://github.com/biancoroyal/node-red-contrib-modbus/commit/29d79bc7e81a2ef9b890371950045f58a6b9126b))
* needs new on re-register nodes ([464662b](https://github.com/biancoroyal/node-red-contrib-modbus/commit/464662b711a92ad94691cf266e9ebff5ac0ca4ce))
* the server does not support that feature since jsmodbus is used instead of node-modbus ([abd88d8](https://github.com/biancoroyal/node-red-contrib-modbus/commit/abd88d889e738f1e43e7de6623b9740a3f5ddcfa))
* travis build ([7a7294e](https://github.com/biancoroyal/node-red-contrib-modbus/commit/7a7294e9fd2fa14d54412586af8c81e25d5b30cd))
* **client:** FSM message FSM Reset while failure handling and on unplanned state changes, now it raises only on failures ([944786c](https://github.com/biancoroyal/node-red-contrib-modbus/commit/944786cdd6f9e8322c3e3264cd1ef8aa4a244118))
### [5.4.1-beta.0](https://github.com/biancoroyal/node-red-contrib-modbus/compare/v5.4.0...v5.4.1-beta.0) (2020-03-29)
# [5.4.0](https://github.com/biancoroyal/node-red-contrib-modbus/compare/v5.4.0-alpha.4...v5.4.0) (2020-03-28)
### Features
* [#180](https://github.com/biancoroyal/node-red-contrib-modbus/issues/180) msg on fail pre-release alpha ([282a7c4](https://github.com/biancoroyal/node-red-contrib-modbus/commit/282a7c46a26c91f387b024ec1703f090a14f1816))
* msg or error on flex connector ([16a947b](https://github.com/biancoroyal/node-red-contrib-modbus/commit/16a947b9eed12a600b5315bf41e63606305ccbd4))
* new output for flex config ([f78e775](https://github.com/biancoroyal/node-red-contrib-modbus/commit/f78e775f2e84ae5d8ce406457a2b747daa3abd38))
* set default on serial for queue by the type checkbox switch ([65edb52](https://github.com/biancoroyal/node-red-contrib-modbus/commit/65edb52b393a421d7c5db3dd8749a2a0da7d4393))
# [5.4.0-alpha.4](https://github.com/biancoroyal/node-red-contrib-modbus/compare/v5.4.0-alpha.3...v5.4.0-alpha.4) (2020-03-27)
# [5.2.0](https://github.com/biancoroyal/node-red-contrib-modbus/compare/v4.1.3...v5.2.0) (2019-12-08)
### Bug Fixes
* needs new on re-register nodes ([464662b](https://github.com/biancoroyal/node-red-contrib-modbus/commit/464662b711a92ad94691cf266e9ebff5ac0ca4ce))
# [5.4.0-alpha.3](https://github.com/biancoroyal/node-red-contrib-modbus/compare/v5.4.0-alpha.2...v5.4.0-alpha.3) (2020-03-26)
### Bug Fixes
* issue [#182](https://github.com/biancoroyal/node-red-contrib-modbus/issues/182) to get better information from the FSM ([78be12b](https://github.com/biancoroyal/node-red-contrib-modbus/commit/78be12b72403e6de12d6f8c1ee11f633828ff04e))
# [5.4.0-alpha.2](https://github.com/biancoroyal/node-red-contrib-modbus/compare/5.1.0-0...v5.4.0-alpha.2) (2020-03-26)
### Bug Fixes
* **client:** FSM message FSM Reset while failure handling and on unplanned state changes, now it raises only on failures ([944786c](https://github.com/biancoroyal/node-red-contrib-modbus/commit/944786cdd6f9e8322c3e3264cd1ef8aa4a244118))
* [#160](https://github.com/biancoroyal/node-red-contrib-modbus/issues/160) error on show activities true ([af27fe6](https://github.com/biancoroyal/node-red-contrib-modbus/commit/af27fe616654eb074bb29f34a163d4ffabc742bd))
* [#178](https://github.com/biancoroyal/node-red-contrib-modbus/issues/178) debug per node to see where it is not correct or fallback core log ([ff69134](https://github.com/biancoroyal/node-red-contrib-modbus/commit/ff691343ab7c93451642922bf6fa237f777b934f))
* [#178](https://github.com/biancoroyal/node-red-contrib-modbus/issues/178) too get no crash on internal debug log ([a0389e7](https://github.com/biancoroyal/node-red-contrib-modbus/commit/a0389e7b051d736bc958fee4fbfeb1879cda99e3)), closes [#180](https://github.com/biancoroyal/node-red-contrib-modbus/issues/180)
* serialport list call ([f401c58](https://github.com/biancoroyal/node-red-contrib-modbus/commit/f401c58cb384ce87489aecaa99a3000f18e4222b))
* supporter file missing ([d24fad6](https://github.com/biancoroyal/node-red-contrib-modbus/commit/d24fad66e8730f9535b8d9edc0512087e55b7d07))
* travis build ([7a7294e](https://github.com/biancoroyal/node-red-contrib-modbus/commit/7a7294e9fd2fa14d54412586af8c81e25d5b30cd))
* typo config node client ([9be8b16](https://github.com/biancoroyal/node-red-contrib-modbus/commit/9be8b1634469abfe6b8b6fb471a16f9387b6cee4))

@@ -97,14 +82,2 @@

* [#161](https://github.com/biancoroyal/node-red-contrib-modbus/issues/161) multiple RTU devices via UnitID ([b0b5011](https://github.com/biancoroyal/node-red-contrib-modbus/commit/b0b5011be4ab5e7c06ab44fd9df7b0ff5ddd0fd8))
* [#180](https://github.com/biancoroyal/node-red-contrib-modbus/issues/180) msg on fail pre-release alpha ([282a7c4](https://github.com/biancoroyal/node-red-contrib-modbus/commit/282a7c46a26c91f387b024ec1703f090a14f1816))
* msg or error on flex connector ([16a947b](https://github.com/biancoroyal/node-red-contrib-modbus/commit/16a947b9eed12a600b5315bf41e63606305ccbd4))
* new output for flex config ([f78e775](https://github.com/biancoroyal/node-red-contrib-modbus/commit/f78e775f2e84ae5d8ce406457a2b747daa3abd38))
* set default on serial for queue by the type checkbox switch ([65edb52](https://github.com/biancoroyal/node-red-contrib-modbus/commit/65edb52b393a421d7c5db3dd8749a2a0da7d4393))
# [5.1.0-0](https://github.com/biancoroyal/node-red-contrib-modbus/compare/v4.1.3...5.1.0-0) (2019-11-24)
### Features
* new state machine from xstate ([57aef99](https://github.com/biancoroyal/node-red-contrib-modbus/commit/57aef9956187ee9d70e862b226f3a3ef5e091528))

@@ -119,4 +92,4 @@

* **log:** remove console logs ([a859d91](https://github.com/biancoroyal/node-red-contrib-modbus/commit/a859d91a9ad8dad56f985457916a5b809b22a586))
* modbus flex server ([7d332f0](https://github.com/biancoroyal/node-red-contrib-modbus/commit/7d332f0add6e6912f2dd91e8c92bce751d97e6d7))
* **log:** remove console logs ([a859d91](https://github.com/biancoroyal/node-red-contrib-modbus/commit/a859d91a9ad8dad56f985457916a5b809b22a586))

@@ -226,1 +199,4 @@

# 1.0.0 (2017-01-18)

@@ -1,2 +0,2 @@

"use strict";require("source-map-support").install();var de=de||{biancoroyal:{modbus:{core:{client:{}}}}};de.biancoroyal.modbus.core.client.internalDebug=de.biancoroyal.modbus.core.client.internalDebug||require("debug")("contribModbus:core:client"),de.biancoroyal.modbus.core.client.internalDebugFSM=de.biancoroyal.modbus.core.client.internalDebugFSM||require("debug")("contribModbus:core:client:fsm"),de.biancoroyal.modbus.core.client.modbusSerialDebug=de.biancoroyal.modbus.core.client.modbusSerialDebug||require("debug")("modbus-serial"),de.biancoroyal.modbus.core.client.XStateFSM=de.biancoroyal.modbus.core.client.XStateFSM||require("@xstate/fsm"),de.biancoroyal.modbus.core.client.stateLogEnabled=de.biancoroyal.modbus.core.client.stateLogEnabled||!1,de.biancoroyal.modbus.core.client.networkErrors=["ESOCKETTIMEDOUT","ETIMEDOUT","ECONNRESET","ENETRESET","ECONNABORTED","ECONNREFUSED","ENETUNREACH","ENOTCONN","ESHUTDOWN","EHOSTDOWN","ENETDOWN","EWOULDBLOCK","EAGAIN","EHOSTUNREACH"],de.biancoroyal.modbus.core.client.createStateMachineService=function(){return this.stateLogEnabled=!1,this.XStateFSM.createMachine({id:"modbus",initial:"new",states:{new:{on:{INIT:"init",BREAK:"broken",STOP:"stopped"}},broken:{on:{INIT:"init",STOP:"stopped",FAILURE:"failed",ACTIVATE:"activated",RECONNECT:"reconnecting"}},reconnecting:{on:{INIT:"init",BREAK:"broken",FAILURE:"failed",STOP:"stopped"}},init:{on:{OPENSERIAL:"opened",CONNECT:"connected",BREAK:"broken",FAILURE:"failed",STOP:"stopped"}},opened:{on:{CONNECT:"connected",BREAK:"broken",FAILURE:"failed",CLOSE:"closed",STOP:"stopped"}},connected:{on:{CLOSE:"closed",ACTIVATE:"activated",QUEUE:"queueing",BREAK:"broken",FAILURE:"failed",STOP:"stopped"}},activated:{on:{READ:"reading",WRITE:"writing",QUEUE:"queueing",BREAK:"broken",CLOSE:"closed",FAILURE:"failed",STOP:"stopped"}},queueing:{on:{ACTIVATE:"activated",READ:"reading",WRITE:"writing",EMPTY:"empty",BREAK:"broken",CLOSE:"closed",FAILURE:"failed",STOP:"stopped"}},empty:{on:{QUEUE:"queueing",BREAK:"broken",FAILURE:"failed",CLOSE:"closed",STOP:"stopped"}},reading:{on:{ACTIVATE:"activated",BREAK:"broken",FAILURE:"failed",STOP:"stopped"}},writing:{on:{ACTIVATE:"activated",BREAK:"broken",FAILURE:"failed",STOP:"stopped"}},closed:{on:{FAILURE:"failed",BREAK:"broken",CONNECT:"connected",RECONNECT:"reconnecting",INIT:"init",STOP:"stopped"}},failed:{on:{CLOSE:"closed",BREAK:"broken",STOP:"stopped"}},stopped:{on:{NEW:"new",STOP:"stopped"}}}})},de.biancoroyal.modbus.core.client.getActualUnitId=function(e,n){return parseInt(n.payload.unitid)||parseInt(n.queueUnitId)||parseInt(e.unit_id)},de.biancoroyal.modbus.core.client.startStateService=function(e){return this.XStateFSM.interpret(e).start()},de.biancoroyal.modbus.core.client.checkUnitId=function(e,n){return"tcp"===n?0<=e&&e<=255:1<=e&&e<=247},de.biancoroyal.modbus.core.client.getLogFunction=function(e){return e.internalDebugLog?e.internalDebugLog:de.biancoroyal.modbus.core.client.internalDebug},de.biancoroyal.modbus.core.client.activateSendingOnSuccess=function(e,n,o,a,t){e.sendingAllowed.set(t.queueUnitId,!0),e.activateSending(t).then(function(){n(a,t)}).catch(function(e){o(e,t)})},de.biancoroyal.modbus.core.client.activateSendingOnFailure=function(e,n,o,a){e.sendingAllowed.set(a.queueUnitId,!0),e.activateSending(a).then(function(){n(o,a)}).catch(function(e){n(e,a)})},de.biancoroyal.modbus.core.client.readModbusByFunctionCodeOne=function(n,o,a,t){var i=de.biancoroyal.modbus.core.client;n.client.readCoils(parseInt(o.payload.address),parseInt(o.payload.quantity)).then(function(e){i.activateSendingOnSuccess(n,a,t,e,o)}).catch(function(e){i.activateSendingOnFailure(n,t,e,o),n.modbusErrorHandling(e)})},de.biancoroyal.modbus.core.client.readModbusByFunctionCodeTwo=function(n,o,a,t){var i=de.biancoroyal.modbus.core.client;n.client.readDiscreteInputs(parseInt(o.payload.address),parseInt(o.payload.quantity)).then(function(e){i.activateSendingOnSuccess(n,a,t,e,o)}).catch(function(e){i.activateSendingOnFailure(n,t,e,o),n.modbusErrorHandling(e)})},de.biancoroyal.modbus.core.client.readModbusByFunctionCodeThree=function(n,o,a,t){var i=de.biancoroyal.modbus.core.client;n.client.readHoldingRegisters(parseInt(o.payload.address),parseInt(o.payload.quantity)).then(function(e){i.activateSendingOnSuccess(n,a,t,e,o)}).catch(function(e){i.activateSendingOnFailure(n,t,e,o),n.modbusErrorHandling(e)})},de.biancoroyal.modbus.core.client.readModbusByFunctionCodeFour=function(n,o,a,t){var i=de.biancoroyal.modbus.core.client;n.client.readInputRegisters(parseInt(o.payload.address),parseInt(o.payload.quantity)).then(function(e){i.activateSendingOnSuccess(n,a,t,e,o)}).catch(function(e){i.activateSendingOnFailure(n,t,e,o),n.modbusErrorHandling(e)})},de.biancoroyal.modbus.core.client.readModbusByFunctionCode=function(e,n,o,a){var t=de.biancoroyal.modbus.core.client,i=de.biancoroyal.modbus.core.client.getLogFunction(e);switch(parseInt(n.payload.fc)){case 1:t.readModbusByFunctionCodeOne(e,n,o,a);break;case 2:t.readModbusByFunctionCodeTwo(e,n,o,a);break;case 3:t.readModbusByFunctionCodeThree(e,n,o,a);break;case 4:t.readModbusByFunctionCodeFour(e,n,o,a);break;default:t.activateSendingOnFailure(e,a,new Error("Function Code Unknown"),n),i("Function Code Unknown %s",n.payload.fc)}},de.biancoroyal.modbus.core.client.readModbus=function(n,o,e,a){var t=de.biancoroyal.modbus.core.client,i=de.biancoroyal.modbus.core.client.getLogFunction(n);if(n.client){n.bufferCommands?n.queueLog(JSON.stringify({info:"read msg via Modbus",message:o.payload,queueUnitId:o.queueUnitId,timeout:n.client.getTimeout(),state:n.actualServiceState.value})):"tcp"!==n.clienttype&&n.stateService.send("READ"),n.setUnitIdFromPayload(o),n.client.setTimeout(n.clientTimeout);try{t.readModbusByFunctionCode(n,o,e,a)}catch(e){i(e.message),t.activateSendingOnFailure(n,a,e,o),n.modbusErrorHandling(e)}}else i("Client Not Ready As Object On Reading Modbus")},de.biancoroyal.modbus.core.client.writeModbusByFunctionCodeFive=function(n,o,a,t){var i=de.biancoroyal.modbus.core.client;o.payload.value?o.payload.value=!0:o.payload.value=!1,n.client.writeCoil(parseInt(o.payload.address),o.payload.value).then(function(e){i.activateSendingOnSuccess(n,a,t,e,o)}).catch(function(e){i.activateSendingOnFailure(n,t,e,o),n.modbusErrorHandling(e)})},de.biancoroyal.modbus.core.client.writeModbusByFunctionCodeFifteen=function(n,o,a,t){var i=de.biancoroyal.modbus.core.client;parseInt(o.payload.value.length)!==parseInt(o.payload.quantity)?i.activateSendingOnFailure(n,t,new Error("Quantity should be less or equal to coil payload array length: "+o.payload.value.length+" Addr: "+o.payload.address+" Q: "+o.payload.quantity),o):n.client.writeCoils(parseInt(o.payload.address),o.payload.value).then(function(e){i.activateSendingOnSuccess(n,a,t,e,o)}).catch(function(e){n.activateSending(o),t(e,o),n.modbusErrorHandling(e)})},de.biancoroyal.modbus.core.client.writeModbusByFunctionCodeSix=function(n,o,a,t){var i=de.biancoroyal.modbus.core.client;n.client.writeRegister(parseInt(o.payload.address),parseInt(o.payload.value)).then(function(e){i.activateSendingOnSuccess(n,a,t,e,o)}).catch(function(e){i.activateSendingOnFailure(n,t,e,o),n.modbusErrorHandling(e)})},de.biancoroyal.modbus.core.client.writeModbusByFunctionCodeSixteen=function(n,o,a,t){var i=de.biancoroyal.modbus.core.client;parseInt(o.payload.value.length)!==parseInt(o.payload.quantity)?i.activateSendingOnFailure(n,t,new Error("Quantity should be less or equal to register payload array length: "+o.payload.value.length+" Addr: "+o.payload.address+" Q: "+o.payload.quantity),o):n.client.writeRegisters(parseInt(o.payload.address),o.payload.value).then(function(e){i.activateSendingOnSuccess(n,a,t,e,o)}).catch(function(e){i.activateSendingOnFailure(n,t,e,o),n.modbusErrorHandling(e)})},de.biancoroyal.modbus.core.client.writeModbus=function(n,o,e,a){var t=de.biancoroyal.modbus.core.client,i=de.biancoroyal.modbus.core.client.getLogFunction(n);if(n.client){n.bufferCommands?n.queueLog(JSON.stringify({info:"write msg",message:o.payload,queueUnitId:o.queueUnitId,timeout:n.client.getTimeout(),state:n.actualServiceState.value})):"tcp"!==n.clienttype&&n.stateService.send("WRITE"),n.setUnitIdFromPayload(o),n.client.setTimeout(n.clientTimeout);try{switch(parseInt(o.payload.fc)){case 15:t.writeModbusByFunctionCodeFifteen(n,o,e,a);break;case 5:t.writeModbusByFunctionCodeFive(n,o,e,a);break;case 16:t.writeModbusByFunctionCodeSixteen(n,o,e,a);break;case 6:t.writeModbusByFunctionCodeSix(n,o,e,a);break;default:t.activateSendingOnFailure(n,a,new Error("Function Code Unknown"),o),i("Function Code Unknown %s",o.payload.fc)}}catch(e){i(e.message),t.activateSendingOnFailure(n,a,e,o),n.modbusErrorHandling(e)}}else i("Client Not Ready As Object On Writing Modbus")},de.biancoroyal.modbus.core.client.setNewTCPNodeSettings=function(e,n){e.tcpHost=n.payload.tcpHost||e.tcpHost,e.tcpPort=n.payload.tcpPort||e.tcpPort,e.tcpType=n.payload.tcpType||e.tcpType},de.biancoroyal.modbus.core.client.setNewSerialNodeSettings=function(e,n){n.payload.serialPort&&(e.serialPort=n.payload.serialPort||e.serialPort),n.payload.serialBaudrate&&(e.serialBaudrate=parseInt(n.payload.serialBaudrate)||e.serialBaudrate),e.serialDatabits=n.payload.serialDatabits||e.serialDatabits,e.serialStopbits=n.payload.serialStopbits||e.serialStopbits,e.serialParity=n.payload.serialParity||e.serialParity,e.serialType=n.payload.serialType||e.serialType,n.payload.serialConnectionDelay&&(e.serialConnectionDelay=parseInt(n.payload.serialConnectionDelay)||e.serialConnectionDelay)},de.biancoroyal.modbus.core.client.setNewNodeOptionalSettings=function(e,n){n.payload.unitId&&(e.unit_id=parseInt(n.payload.unitId)||e.unit_id),n.payload.commandDelay&&(e.commandDelay=parseInt(n.payload.commandDelay)||e.commandDelay),n.payload.clientTimeout&&(e.clientTimeout=parseInt(n.payload.clientTimeout)||e.clientTimeout),n.payload.reconnectTimeout&&(e.reconnectTimeout=parseInt(n.payload.reconnectTimeout)||e.reconnectTimeout)},de.biancoroyal.modbus.core.client.setNewNodeSettings=function(e,n){var o=de.biancoroyal.modbus.core.client.getLogFunction(e),a=de.biancoroyal.modbus.core.client;if(!n)return o("New Connection message invalid."),!1;switch(n.payload.connectorType.toUpperCase()){case"TCP":a.setNewTCPNodeSettings(e,n),o("New Connection TCP Settings "+e.tcpHost+" "+e.tcpPort+" "+e.tcpType);break;case"SERIAL":a.setNewSerialNodeSettings(),o("New Connection Serial Settings "+e.serialPort+" "+e.serialBaudrate+" "+e.serialType);break;default:o("Unknown Dynamic Reconnect Type "+n.payload.connectorType)}return a.setNewNodeOptionalSettings(e,n),!0},de.biancoroyal.modbus.core.client.messagesAllowedStates=["activated","queueing","empty","connected"],module.exports=de.biancoroyal.modbus.core.client;
"use strict";require("source-map-support").install();var de=de||{biancoroyal:{modbus:{core:{client:{}}}}};de.biancoroyal.modbus.core.client.internalDebug=de.biancoroyal.modbus.core.client.internalDebug||require("debug")("contribModbus:core:client"),de.biancoroyal.modbus.core.client.internalDebugFSM=de.biancoroyal.modbus.core.client.internalDebugFSM||require("debug")("contribModbus:core:client:fsm"),de.biancoroyal.modbus.core.client.modbusSerialDebug=de.biancoroyal.modbus.core.client.modbusSerialDebug||require("debug")("modbus-serial"),de.biancoroyal.modbus.core.client.XStateFSM=de.biancoroyal.modbus.core.client.XStateFSM||require("@xstate/fsm"),de.biancoroyal.modbus.core.client.stateLogEnabled=de.biancoroyal.modbus.core.client.stateLogEnabled||!1,de.biancoroyal.modbus.core.client.networkErrors=["ESOCKETTIMEDOUT","ETIMEDOUT","ECONNRESET","ENETRESET","ECONNABORTED","ECONNREFUSED","ENETUNREACH","ENOTCONN","ESHUTDOWN","EHOSTDOWN","ENETDOWN","EWOULDBLOCK","EAGAIN","EHOSTUNREACH"],de.biancoroyal.modbus.core.client.createStateMachineService=function(){return this.stateLogEnabled=!1,this.XStateFSM.createMachine({id:"modbus",initial:"new",states:{new:{on:{INIT:"init",BREAK:"broken",STOP:"stopped"}},broken:{on:{INIT:"init",STOP:"stopped",FAILURE:"failed",ACTIVATE:"activated",RECONNECT:"reconnecting"}},reconnecting:{on:{INIT:"init",BREAK:"broken",FAILURE:"failed",STOP:"stopped"}},init:{on:{OPENSERIAL:"opened",CONNECT:"connected",BREAK:"broken",FAILURE:"failed",STOP:"stopped"}},opened:{on:{CONNECT:"connected",BREAK:"broken",FAILURE:"failed",CLOSE:"closed",STOP:"stopped"}},connected:{on:{CLOSE:"closed",ACTIVATE:"activated",QUEUE:"queueing",BREAK:"broken",FAILURE:"failed",STOP:"stopped"}},activated:{on:{READ:"reading",WRITE:"writing",QUEUE:"queueing",BREAK:"broken",CLOSE:"closed",FAILURE:"failed",STOP:"stopped"}},queueing:{on:{ACTIVATE:"activated",READ:"reading",WRITE:"writing",EMPTY:"empty",BREAK:"broken",CLOSE:"closed",FAILURE:"failed",STOP:"stopped"}},empty:{on:{QUEUE:"queueing",BREAK:"broken",FAILURE:"failed",CLOSE:"closed",STOP:"stopped"}},reading:{on:{ACTIVATE:"activated",BREAK:"broken",FAILURE:"failed",STOP:"stopped"}},writing:{on:{ACTIVATE:"activated",BREAK:"broken",FAILURE:"failed",STOP:"stopped"}},closed:{on:{FAILURE:"failed",BREAK:"broken",CONNECT:"connected",RECONNECT:"reconnecting",INIT:"init",STOP:"stopped"}},failed:{on:{CLOSE:"closed",BREAK:"broken",STOP:"stopped"}},stopped:{on:{NEW:"new",STOP:"stopped"}}}})},de.biancoroyal.modbus.core.client.getActualUnitId=function(e,n){return parseInt(n.payload.unitid)||parseInt(n.queueUnitId)||parseInt(e.unit_id)},de.biancoroyal.modbus.core.client.startStateService=function(e){return this.XStateFSM.interpret(e).start()},de.biancoroyal.modbus.core.client.checkUnitId=function(e,n){return"tcp"===n?0<=e&&e<=255:1<=e&&e<=247},de.biancoroyal.modbus.core.client.getLogFunction=function(e){return e.internalDebugLog?e.internalDebugLog:de.biancoroyal.modbus.core.client.internalDebug},de.biancoroyal.modbus.core.client.activateSendingOnSuccess=function(e,n,o,a,t){e.activateSending(t).then(function(){n(a,t)}).catch(function(e){o(e,t)})},de.biancoroyal.modbus.core.client.activateSendingOnFailure=function(e,n,o,a){e.activateSending(a).then(function(){n(o,a)}).catch(function(e){n(e,a)})},de.biancoroyal.modbus.core.client.readModbusByFunctionCodeOne=function(n,o,a,t){var i=de.biancoroyal.modbus.core.client;n.client.readCoils(parseInt(o.payload.address),parseInt(o.payload.quantity)).then(function(e){i.activateSendingOnSuccess(n,a,t,e,o)}).catch(function(e){i.activateSendingOnFailure(n,t,e,o),n.modbusErrorHandling(e)})},de.biancoroyal.modbus.core.client.readModbusByFunctionCodeTwo=function(n,o,a,t){var i=de.biancoroyal.modbus.core.client;n.client.readDiscreteInputs(parseInt(o.payload.address),parseInt(o.payload.quantity)).then(function(e){i.activateSendingOnSuccess(n,a,t,e,o)}).catch(function(e){i.activateSendingOnFailure(n,t,e,o),n.modbusErrorHandling(e)})},de.biancoroyal.modbus.core.client.readModbusByFunctionCodeThree=function(n,o,a,t){var i=de.biancoroyal.modbus.core.client;n.client.readHoldingRegisters(parseInt(o.payload.address),parseInt(o.payload.quantity)).then(function(e){i.activateSendingOnSuccess(n,a,t,e,o)}).catch(function(e){i.activateSendingOnFailure(n,t,e,o),n.modbusErrorHandling(e)})},de.biancoroyal.modbus.core.client.readModbusByFunctionCodeFour=function(n,o,a,t){var i=de.biancoroyal.modbus.core.client;n.client.readInputRegisters(parseInt(o.payload.address),parseInt(o.payload.quantity)).then(function(e){i.activateSendingOnSuccess(n,a,t,e,o)}).catch(function(e){i.activateSendingOnFailure(n,t,e,o),n.modbusErrorHandling(e)})},de.biancoroyal.modbus.core.client.readModbusByFunctionCode=function(e,n,o,a){var t=de.biancoroyal.modbus.core.client,i=de.biancoroyal.modbus.core.client.getLogFunction(e);switch(parseInt(n.payload.fc)){case 1:t.readModbusByFunctionCodeOne(e,n,o,a);break;case 2:t.readModbusByFunctionCodeTwo(e,n,o,a);break;case 3:t.readModbusByFunctionCodeThree(e,n,o,a);break;case 4:t.readModbusByFunctionCodeFour(e,n,o,a);break;default:t.activateSendingOnFailure(e,a,new Error("Function Code Unknown"),n),i("Function Code Unknown %s",n.payload.fc)}},de.biancoroyal.modbus.core.client.readModbus=function(n,o,e,a){var t=de.biancoroyal.modbus.core.client,i=de.biancoroyal.modbus.core.client.getLogFunction(n);if(n.client){n.bufferCommands?n.queueLog(JSON.stringify({info:"read msg via Modbus",message:o.payload,queueUnitId:o.queueUnitId,timeout:n.client.getTimeout(),state:n.actualServiceState.value})):"tcp"!==n.clienttype&&n.stateService.send("READ"),n.setUnitIdFromPayload(o),n.client.setTimeout(n.clientTimeout);try{t.readModbusByFunctionCode(n,o,e,a)}catch(e){i(e.message),t.activateSendingOnFailure(n,a,e,o),n.modbusErrorHandling(e)}}else i("Client Not Ready As Object On Reading Modbus")},de.biancoroyal.modbus.core.client.writeModbusByFunctionCodeFive=function(n,o,a,t){var i=de.biancoroyal.modbus.core.client;o.payload.value?o.payload.value=!0:o.payload.value=!1,n.client.writeCoil(parseInt(o.payload.address),o.payload.value).then(function(e){i.activateSendingOnSuccess(n,a,t,e,o)}).catch(function(e){i.activateSendingOnFailure(n,t,e,o),n.modbusErrorHandling(e)})},de.biancoroyal.modbus.core.client.writeModbusByFunctionCodeFifteen=function(n,o,a,t){var i=de.biancoroyal.modbus.core.client;parseInt(o.payload.value.length)!==parseInt(o.payload.quantity)?i.activateSendingOnFailure(n,t,new Error("Quantity should be less or equal to coil payload array length: "+o.payload.value.length+" Addr: "+o.payload.address+" Q: "+o.payload.quantity),o):n.client.writeCoils(parseInt(o.payload.address),o.payload.value).then(function(e){i.activateSendingOnSuccess(n,a,t,e,o)}).catch(function(e){n.activateSending(o),t(e,o),n.modbusErrorHandling(e)})},de.biancoroyal.modbus.core.client.writeModbusByFunctionCodeSix=function(n,o,a,t){var i=de.biancoroyal.modbus.core.client;n.client.writeRegister(parseInt(o.payload.address),parseInt(o.payload.value)).then(function(e){i.activateSendingOnSuccess(n,a,t,e,o)}).catch(function(e){i.activateSendingOnFailure(n,t,e,o),n.modbusErrorHandling(e)})},de.biancoroyal.modbus.core.client.writeModbusByFunctionCodeSixteen=function(n,o,a,t){var i=de.biancoroyal.modbus.core.client;parseInt(o.payload.value.length)!==parseInt(o.payload.quantity)?i.activateSendingOnFailure(n,t,new Error("Quantity should be less or equal to register payload array length: "+o.payload.value.length+" Addr: "+o.payload.address+" Q: "+o.payload.quantity),o):n.client.writeRegisters(parseInt(o.payload.address),o.payload.value).then(function(e){i.activateSendingOnSuccess(n,a,t,e,o)}).catch(function(e){i.activateSendingOnFailure(n,t,e,o),n.modbusErrorHandling(e)})},de.biancoroyal.modbus.core.client.writeModbus=function(n,o,e,a){var t=de.biancoroyal.modbus.core.client,i=de.biancoroyal.modbus.core.client.getLogFunction(n);if(n.client){n.bufferCommands?n.queueLog(JSON.stringify({info:"write msg",message:o.payload,queueUnitId:o.queueUnitId,timeout:n.client.getTimeout(),state:n.actualServiceState.value})):"tcp"!==n.clienttype&&n.stateService.send("WRITE"),n.setUnitIdFromPayload(o),n.client.setTimeout(n.clientTimeout);try{switch(parseInt(o.payload.fc)){case 15:t.writeModbusByFunctionCodeFifteen(n,o,e,a);break;case 5:t.writeModbusByFunctionCodeFive(n,o,e,a);break;case 16:t.writeModbusByFunctionCodeSixteen(n,o,e,a);break;case 6:t.writeModbusByFunctionCodeSix(n,o,e,a);break;default:t.activateSendingOnFailure(n,a,new Error("Function Code Unknown"),o),i("Function Code Unknown %s",o.payload.fc)}}catch(e){i(e.message),t.activateSendingOnFailure(n,a,e,o),n.modbusErrorHandling(e)}}else i("Client Not Ready As Object On Writing Modbus")},de.biancoroyal.modbus.core.client.setNewTCPNodeSettings=function(e,n){e.tcpHost=n.payload.tcpHost||e.tcpHost,e.tcpPort=n.payload.tcpPort||e.tcpPort,e.tcpType=n.payload.tcpType||e.tcpType},de.biancoroyal.modbus.core.client.setNewSerialNodeSettings=function(e,n){n.payload.serialPort&&(e.serialPort=n.payload.serialPort||e.serialPort),n.payload.serialBaudrate&&(e.serialBaudrate=parseInt(n.payload.serialBaudrate)||e.serialBaudrate),e.serialDatabits=n.payload.serialDatabits||e.serialDatabits,e.serialStopbits=n.payload.serialStopbits||e.serialStopbits,e.serialParity=n.payload.serialParity||e.serialParity,e.serialType=n.payload.serialType||e.serialType,n.payload.serialConnectionDelay&&(e.serialConnectionDelay=parseInt(n.payload.serialConnectionDelay)||e.serialConnectionDelay)},de.biancoroyal.modbus.core.client.setNewNodeOptionalSettings=function(e,n){n.payload.unitId&&(e.unit_id=parseInt(n.payload.unitId)||e.unit_id),n.payload.commandDelay&&(e.commandDelay=parseInt(n.payload.commandDelay)||e.commandDelay),n.payload.clientTimeout&&(e.clientTimeout=parseInt(n.payload.clientTimeout)||e.clientTimeout),n.payload.reconnectTimeout&&(e.reconnectTimeout=parseInt(n.payload.reconnectTimeout)||e.reconnectTimeout)},de.biancoroyal.modbus.core.client.setNewNodeSettings=function(e,n){var o=de.biancoroyal.modbus.core.client.getLogFunction(e),a=de.biancoroyal.modbus.core.client;if(!n)return o("New Connection message invalid."),!1;switch(n.payload.connectorType.toUpperCase()){case"TCP":a.setNewTCPNodeSettings(e,n),o("New Connection TCP Settings "+e.tcpHost+" "+e.tcpPort+" "+e.tcpType);break;case"SERIAL":a.setNewSerialNodeSettings(),o("New Connection Serial Settings "+e.serialPort+" "+e.serialBaudrate+" "+e.serialType);break;default:o("Unknown Dynamic Reconnect Type "+n.payload.connectorType)}return a.setNewNodeOptionalSettings(e,n),!0},de.biancoroyal.modbus.core.client.messagesAllowedStates=["activated","queueing","empty","connected"],module.exports=de.biancoroyal.modbus.core.client;
//# sourceMappingURL=../maps/core/modbus-client-core.js.map

@@ -1,2 +0,2 @@

"use strict";require("source-map-support").install();var de=de||{biancoroyal:{modbus:{queue:{core:{}}}}};de.biancoroyal.modbus.queue.core.internalDebug=de.biancoroyal.modbus.queue.core.internalDebug||require("debug")("contribModbus:queue:core"),de.biancoroyal.modbus.queue.core.core=de.biancoroyal.modbus.queue.core.core||require("./modbus-core"),de.biancoroyal.modbus.queue.core.initQueue=function(e){e.bufferCommandList.clear(),e.sendingAllowed.clear(),e.unitSendingAllowed=[];for(var u=0;u<=255;u++)e.bufferCommandList.set(u,[]),e.sendingAllowed.set(u,!0)},de.biancoroyal.modbus.queue.core.checkQueuesAreEmpty=function(e){for(var u=!0,o=0;o<=255;o++)u&=0===e.bufferCommandList.get(o).length;return u},de.biancoroyal.modbus.queue.core.sequentialDequeueCommand=function(t){return new Promise(function(e,u){var o=de.biancoroyal.modbus.queue.core;if(t.parallelUnitIdsAllowed)for(var n=0;n<256;n+=1)o.sendQueueDataToModbus(t,n);else{var d=t.unitSendingAllowed.shift();o.isValidUnitId(d)&&t.sendingAllowed.get(d)&&o.sendQueueDataToModbus(t,d)}e()})},de.biancoroyal.modbus.queue.core.sendQueueDataToModbus=function(e,u){var o=e.bufferCommandList.get(u).length;if(o){e.queueLog(JSON.stringify({type:"queue sending data to Modbus",unitId:u,queueLength:o,sendingAllowed:e.sendingAllowed.get(u)}));var n=e.bufferCommandList.get(u).shift();if(!n)throw new Error("Command On Send Not Valid");e.sendingAllowed.set(u,!1),n.callModbus(e,n.msg,n.cb,n.cberr)}},de.biancoroyal.modbus.queue.core.dequeueLogEntry=function(e,u,o){e.queueLog(JSON.stringify({state:u.value,message:"".concat(o," ").concat(e.clienttype),delay:e.commandDelay}))},de.biancoroyal.modbus.queue.core.dequeueCommand=function(u){var o=de.biancoroyal.modbus.queue.core,n=u.actualServiceState;-1===u.messageAllowedStates.indexOf(n.value)?o.dequeueLogEntry(u,n,"dequeue command disallowed state"):o.sequentialDequeueCommand(u).then(function(){o.dequeueLogEntry(u,n,"dequeue command done")}).catch(function(e){o.dequeueLogEntry(u,n,"dequeue command error "+e.message)})},de.biancoroyal.modbus.queue.core.getUnitIdToQueue=function(e,u){return parseInt(u.payload.unitid)||parseInt(e.unit_id)},de.biancoroyal.modbus.queue.core.isValidUnitId=function(e){return 0<=e||e<=255},de.biancoroyal.modbus.queue.core.getQueueLengthByUnitId=function(e,u){if(this.isValidUnitId(u))return e.bufferCommandList.get(u).length;throw new Error("(0-255) Got A Wrong Unit-Id: "+u)},de.biancoroyal.modbus.queue.core.pushToQueueByUnitId=function(d,t,r,a,i){var s=de.biancoroyal.modbus.queue.core;return new Promise(function(e,u){try{var o=s.getUnitIdToQueue(d,r),n=s.getQueueLengthByUnitId(d,o);r.queueLengthByUnitId={unitId:o,queueLength:n},r.queueUnitId=o,d.parallelUnitIdsAllowed||d.unitSendingAllowed.push(o),d.bufferCommandList.get(o).push({callModbus:t,msg:r,cb:a,cberr:i}),d.queueLog(JSON.stringify({info:"pushed to Queue by Unit-Id",message:r.payload,unitId:o})),e()}catch(e){u(e)}})},module.exports=de.biancoroyal.modbus.queue.core;
"use strict";require("source-map-support").install();var de=de||{biancoroyal:{modbus:{queue:{core:{}}}}};de.biancoroyal.modbus.queue.core.internalDebug=de.biancoroyal.modbus.queue.core.internalDebug||require("debug")("contribModbus:queue:core"),de.biancoroyal.modbus.queue.core.core=de.biancoroyal.modbus.queue.core.core||require("./modbus-core"),de.biancoroyal.modbus.queue.core.initQueue=function(e){e.bufferCommandList.clear(),e.sendingAllowed.clear(),e.unitSendingAllowed=[];for(var u=0;u<=255;u++)e.bufferCommandList.set(u,[]),e.sendingAllowed.set(u,!0)},de.biancoroyal.modbus.queue.core.checkQueuesAreEmpty=function(e){for(var u=!0,o=0;o<=255;o++)u&=0===e.bufferCommandList.get(o).length;return u},de.biancoroyal.modbus.queue.core.sequentialDequeueCommand=function(r){return new Promise(function(e,u){var o=de.biancoroyal.modbus.queue.core;if(r.parallelUnitIdsAllowed)for(var n=0;n<256;n+=1)o.sendQueueDataToModbus(r,n);else{var d=r.unitSendingAllowed.shift();r.serialSendingAllowed&&o.isValidUnitId(d)&&r.sendingAllowed.get(d)&&(r.serialSendingAllowed=!1,o.sendQueueDataToModbus(r,d))}e()})},de.biancoroyal.modbus.queue.core.sendQueueDataToModbus=function(e,u){var o=e.bufferCommandList.get(u).length;if(o){e.queueLog(JSON.stringify({type:"queue sending data to Modbus",unitId:u,queueLength:o,sendingAllowed:e.sendingAllowed.get(u)}));var n=e.bufferCommandList.get(u).shift();if(!n)throw new Error("Command On Send Not Valid");e.sendingAllowed.set(u,!1),n.callModbus(e,n.msg,n.cb,n.cberr)}},de.biancoroyal.modbus.queue.core.dequeueLogEntry=function(e,u,o){e.queueLog(JSON.stringify({state:u.value,message:"".concat(o," ").concat(e.clienttype),delay:e.commandDelay}))},de.biancoroyal.modbus.queue.core.dequeueCommand=function(u){var o=de.biancoroyal.modbus.queue.core,n=u.actualServiceState;-1===u.messageAllowedStates.indexOf(n.value)?o.dequeueLogEntry(u,n,"dequeue command disallowed state"):o.sequentialDequeueCommand(u).then(function(){o.dequeueLogEntry(u,n,"dequeue command done")}).catch(function(e){o.dequeueLogEntry(u,n,"dequeue command error "+e.message)})},de.biancoroyal.modbus.queue.core.getUnitIdToQueue=function(e,u){return parseInt(u.payload.unitid)||parseInt(e.unit_id)},de.biancoroyal.modbus.queue.core.isValidUnitId=function(e){return 0<=e||e<=255},de.biancoroyal.modbus.queue.core.getQueueLengthByUnitId=function(e,u){if(this.isValidUnitId(u))return e.bufferCommandList.get(u).length;throw new Error("(0-255) Got A Wrong Unit-Id: "+u)},de.biancoroyal.modbus.queue.core.pushToQueueByUnitId=function(d,r,t,a,i){var s=de.biancoroyal.modbus.queue.core;return new Promise(function(e,u){try{var o=s.getUnitIdToQueue(d,t),n=s.getQueueLengthByUnitId(d,o);t.queueLengthByUnitId={unitId:o,queueLength:n},t.queueUnitId=o,d.parallelUnitIdsAllowed||d.unitSendingAllowed.push(o),d.bufferCommandList.get(o).push({callModbus:r,msg:t,cb:a,cberr:i}),d.queueLog(JSON.stringify({info:"pushed to Queue by Unit-Id",message:t.payload,unitId:o})),e()}catch(e){u(e)}})},module.exports=de.biancoroyal.modbus.queue.core;
//# sourceMappingURL=../maps/core/modbus-queue-core.js.map

@@ -1,2 +0,2 @@

"use strict";module.exports=function(c){require("source-map-support").install();var u=require("./modbus-basics"),l=require("./core/modbus-client-core"),d=require("./core/modbus-queue-core");c.nodes.registerType("modbus-client",function(e){c.nodes.createNode(this,e);var t=require("modbus-serial"),n=500,i=2e3,o=" Get More About It By Logging";this.clienttype=e.clienttype,void 0===e.parallelUnitIdsAllowed?this.bufferCommands=!0:this.bufferCommands=e.bufferCommands,this.queueLogEnabled=e.queueLogEnabled,this.stateLogEnabled=e.stateLogEnabled,this.tcpHost=e.tcpHost,this.tcpPort=parseInt(e.tcpPort)||502,this.tcpType=e.tcpType,this.serialPort=e.serialPort,this.serialBaudrate=e.serialBaudrate,this.serialDatabits=e.serialDatabits,this.serialStopbits=e.serialStopbits,this.serialParity=e.serialParity,this.serialType=e.serialType,this.serialConnectionDelay=parseInt(e.serialConnectionDelay)||n,this.unit_id=parseInt(e.unit_id)||1,this.commandDelay=parseInt(e.commandDelay)||1,this.clientTimeout=parseInt(e.clientTimeout)||1e3,this.reconnectTimeout=parseInt(e.reconnectTimeout)||i,this.reconnectOnTimeout=e.reconnectOnTimeout,void 0===e.parallelUnitIdsAllowed?this.parallelUnitIdsAllowed=!0:this.parallelUnitIdsAllowed=e.parallelUnitIdsAllowed;var r=this;function s(e){c.settings.verbose&&r.warn("Client -> "+e+r.serverInfo)}function a(e){c.settings.verbose&&l.internalDebug("Client -> "+e+r.serverInfo)}r.isFirstInitOfConnection=!0,r.closingModbus=!1,r.client=null,r.bufferCommandList=new Map,r.sendingAllowed=new Map,r.unitSendingAllowed=[],r.messageAllowedStates=l.messagesAllowedStates,r.serverInfo="",r.stateMachine=null,r.stateService=null,r.stateMachine=l.createStateMachineService(),r.actualServiceState=r.stateMachine.initialState,r.actualServiceStateBefore=r.actualServiceState,r.stateService=l.startStateService(r.stateMachine),r.reconnectTimeoutId=0,r.setUnitIdFromPayload=function(e){var t=l.getActualUnitId(r,e);l.checkUnitId(t,r.clienttype)||(r.unit_id=1),r.client.setID(t),e.unitId=t},!Number.isNaN(r.unit_id)&&l.checkUnitId(r.unit_id,r.clienttype)||(r.unit_id=1),r.updateServerinfo=function(){"tcp"===r.clienttype?r.serverInfo=" TCP@"+r.tcpHost+":"+r.tcpPort:r.serverInfo=" Serial@"+r.serialPort+":"+r.serialBaudrate+"bit/s",r.serverInfo+=" default Unit-Id: "+r.unit_id},r.queueLog=function(e){r.bufferCommands&&r.queueLogEnabled&&a(e)},r.stateService.subscribe(function(e){var t;if(r.actualServiceStateBefore=r.actualServiceState,r.actualServiceState=e,t=e.value,r.stateLogEnabled&&a(t),e.matches("init")){r.updateServerinfo(),d.initQueue(r),r.reconnectTimeoutId=0;try{r.isFirstInitOfConnection?(r.isFirstInitOfConnection=!1,s("init in 500 ms"),setTimeout(r.connectClient,n)):(s("init in "+r.reconnectTimeout+" ms"),setTimeout(r.connectClient,r.reconnectTimeout))}catch(e){r.error(e,{payload:"client connection error "+o})}r.emit("mbinit")}e.matches("connected")&&r.emit("mbconnected"),e.matches("activated")&&(r.emit("mbactive"),r.bufferCommands&&!d.checkQueuesAreEmpty(r)&&r.stateService.send("QUEUE")),e.matches("queueing")&&(setTimeout(function(){d.dequeueCommand(r)},r.commandDelay),r.emit("mbqueue")),e.matches("opened")&&r.emit("mbopen"),e.matches("closed")&&(r.emit("mbclosed"),r.stateService.send("RECONNECT")),e.matches("stopped")&&(s("stopped state without reconnecting"),r.emit("mbclosed")),e.matches("failed")&&(r.emit("mberror","Modbus Failure On State "+r.actualServiceStateBefore.value+o),r.stateService.send("BREAK")),e.matches("broken")&&(r.emit("mbbroken","Modbus Broken On State "+r.actualServiceStateBefore.value+o),r.reconnectOnTimeout?(r.reconnectTimeout<=0&&(r.reconnectTimeout=i),r.stateService.send("RECONNECT")):r.stateService.send("ACTIVATE")),e.matches("reconnecting")&&(r.emit("mbreconnecting"),r.reconnectTimeout<=0&&(r.reconnectTimeout=i),setTimeout(function(){r.reconnectTimeoutId=0,r.stateService.send("INIT")},r.reconnectTimeout))}),r.connectClient=function(){if(r.client)try{r.client.close(function(){a("connection closed")}),a("connection close sent")}catch(e){a(e.message)}if(r.client=null,r.client=new t,r.clientTimeout||(r.clientTimeout=1e3),r.reconnectTimeout||(r.reconnectTimeout=i),"tcp"===r.clienttype){if(!l.checkUnitId(r.unit_id,r.clienttype))return r.error(new Error("wrong unit-id (0..255)"),{payload:r.unit_id}),void r.stateService.send("FAILURE");switch(r.tcpType){case"C701":a("C701 port UDP bridge"),r.client.connectC701(r.tcpHost,{port:r.tcpPort,autoOpen:!0}).then(r.setTCPConnectionOptions).then(r.setTCPConnected).catch(r.modbusTcpErrorHandling);break;case"TELNET":a("Telnet port"),r.client.connectTelnet(r.tcpHost,{port:r.tcpPort,autoOpen:!0}).then(r.setTCPConnectionOptions).catch(r.modbusTcpErrorHandling);break;case"TPC-RTU-BUFFERED":a("TCP RTU buffered port"),r.client.connectTcpRTUBuffered(r.tcpHost,{port:r.tcpPort,autoOpen:!0}).then(r.setTCPConnectionOptions).catch(r.modbusTcpErrorHandling);break;default:a("TCP port"),r.client.connectTCP(r.tcpHost,{port:r.tcpPort,autoOpen:!0}).then(r.setTCPConnectionOptions).catch(r.modbusTcpErrorHandling)}}else{if(!l.checkUnitId(r.unit_id,r.clienttype))return r.error(new Error("wrong unit-id serial (1..247)"),{payload:r.unit_id}),void r.stateService.send("FAILURE");if(r.serialConnectionDelay||(r.serialConnectionDelay=n),!r.serialPort)return r.error(new Error("wrong serial port"),{payload:r.serialPort}),void r.stateService.send("FAILURE");var e={baudRate:parseInt(r.serialBaudrate),dataBits:parseInt(r.serialDatabits),stopBits:parseInt(r.serialStopbits),parity:r.serialParity,autoOpen:!1};switch(r.serialType){case"ASCII":a("ASCII port serial"),r.client.connectAsciiSerial(r.serialPort,e).then(r.setSerialConnectionOptions).catch(r.modbusSerialErrorHandling);break;case"RTU":a("RTU port serial"),r.client.connectRTU(r.serialPort,e).then(r.setSerialConnectionOptions).catch(r.modbusSerialErrorHandling);break;default:a("RTU buffered port serial"),r.client.connectRTUBuffered(r.serialPort,e).then(r.setSerialConnectionOptions).catch(r.modbusSerialErrorHandling)}}},r.setTCPConnectionOptions=function(){r.client.setID(r.unit_id),r.client.setTimeout(r.clientTimeout),r.stateService.send("CONNECT")},r.setTCPConnected=function(){l.modbusSerialDebug("modbus tcp connected on "+r.tcpHost)},r.setSerialConnectionOptions=function(){r.stateService.send("OPENSERIAL"),setTimeout(r.openSerialClient,parseInt(r.serialConnectionDelay))},r.modbusErrorHandling=function(e){e.message?l.modbusSerialDebug("modbusErrorHandling:"+e.message):l.modbusSerialDebug("modbusErrorHandling:"+JSON.stringify(e)),e.errno&&l.networkErrors.includes(e.errno)&&r.stateService.send("FAILURE")},r.modbusTcpErrorHandling=function(e){r.showErrors&&r.error(e),e.message?l.modbusSerialDebug("modbusTcpErrorHandling:"+e.message):l.modbusSerialDebug("modbusTcpErrorHandling:"+JSON.stringify(e)),e.errno&&l.networkErrors.includes(e.errno)&&r.stateService.send("BREAK")},r.modbusSerialErrorHandling=function(e){r.showErrors&&r.error(e),e.message?l.modbusSerialDebug("modbusSerialErrorHandling:"+e.message):l.modbusSerialDebug("modbusSerialErrorHandling:"+JSON.stringify(e)),r.stateService.send("BREAK")},r.openSerialClient=function(){"opened"===r.actualServiceState.value?(a("time to open Unit "+r.unit_id),l.modbusSerialDebug("modbus connection opened"),r.client.setID(r.unit_id),r.client.setTimeout(parseInt(r.clientTimeout)),r.client._port.on("close",r.onModbusClose),r.stateService.send("CONNECT")):(a("wrong state on connect serial "+r.actualServiceState.value),l.modbusSerialDebug("modbus connection not opened state is %s",r.actualServiceState.value),r.stateService.send("BREAK"))},r.onModbusClose=function(){s("Modbus closed port"),l.modbusSerialDebug("modbus closed port"),r.stateService.send("CLOSE")},r.on("readModbus",function(t,e,n){var i=r.actualServiceState;-1===r.messageAllowedStates.indexOf(i.value)?n(new Error("Client Not Ready To Read At State "+i.value),t):r.bufferCommands?d.pushToQueueByUnitId(r,l.readModbus,t,e,n).then(function(){r.queueLog(JSON.stringify({info:"queued read msg",message:t.payload,state:i.value,queueLength:r.bufferCommandList.get(t.queueUnitId).length}))}).catch(function(e){n(e,t)}).finally(function(){r.stateService.send("QUEUE")}):l.readModbus(r,t,e,n)}),r.on("writeModbus",function(t,e,n){var i=r.actualServiceState;-1===r.messageAllowedStates.indexOf(i.value)?n(new Error("Client Not Ready To Write At State "+i.value),t):r.bufferCommands?d.pushToQueueByUnitId(r,l.writeModbus,t,e,n).then(function(){r.queueLog(JSON.stringify({info:"queued write msg",message:t.payload,state:i.value,queueLength:r.bufferCommandList.get(t.queueUnitId).length}))}).catch(function(e){n(e,t)}).finally(function(){r.stateService.send("QUEUE")}):l.writeModbus(r,t,e,n)}),r.activateSending=function(n){return new Promise(function(e,t){try{r.bufferCommands?(r.queueLog(JSON.stringify({info:"queue response activate sending",message:n.payload,queueLength:r.bufferCommandList.length,queueUnitId:n.queueUnitId})),d.checkQueuesAreEmpty(r)?r.stateService.send("EMPTY"):r.stateService.send("ACTIVATE")):r.stateService.send("ACTIVATE"),e()}catch(e){t(e)}})},a("initialized"),r.setMaxListeners(0),r.on("reconnect",function(){r.stateService.send("CLOSE")}),r.on("dynamicReconnect",function(e,t,n){if(u.invalidPayloadIn(e))throw new Error("Message Or Payload Not Valid");l.internalDebug("Dynamic Reconnect Parameters "+JSON.stringify(e.payload)),l.setNewNodeSettings(r,e)?t(e):n(new Error("Message Or Payload Not Valid"),e),l.internalDebug("Dynamic Reconnect Starts on actual state "+r.actualServiceState.value),r.stateService.send("CLOSE")}),r.on("close",function(t){r.closingModbus=!0,a("stop fsm on close "+r.name),r.stateService.send("STOP"),a("close node "+r.name),r.client?r.client.isOpen?r.client.close(function(e){a(e?"Connection closed with error "+r.name:"Connection closed well "+r.name),t()}):(a("connection was closed "+r.name),t()):(a("Connection closed simple "+r.name),t())}),r.registeredNodeList={},r.registerForModbus=function(e){r.registeredNodeList[e.id]=e,1===Object.keys(r.registeredNodeList).length&&(r.closingModbus=!1,r.stateService.send("NEW"),r.stateService.send("INIT"))},r.closeConnectionWithoutRegisteredNodes=function(e){0===Object.keys(r.registeredNodeList).length?(r.closingModbus=!0,r.client&&"stopped"!==r.actualServiceState.value&&r.client.isOpen?r.client.close(function(){r.stateService.send("STOP"),e()}):(r.stateService.send("STOP"),e())):e()},r.deregisterForModbus=function(e,t){delete r.registeredNodeList[e.id],r.closingModbus?t():r.closeConnectionWithoutRegisteredNodes(t)}}),c.httpAdmin.get("/modbus/serial/ports",c.auth.needsPermission("serial.read"),function(e,t){require("serialport").list().then(function(e){t.json(e)}).catch(function(e){t.json([e.message]),l.internalDebug(e.message)})})};
"use strict";module.exports=function(c){require("source-map-support").install();var l=require("./modbus-basics"),u=require("./core/modbus-client-core"),d=require("./core/modbus-queue-core");c.nodes.registerType("modbus-client",function(e){c.nodes.createNode(this,e);var t=require("modbus-serial"),n=500,i=2e3,o=" Get More About It By Logging";this.clienttype=e.clienttype,void 0===e.parallelUnitIdsAllowed?this.bufferCommands=!0:this.bufferCommands=e.bufferCommands,this.queueLogEnabled=e.queueLogEnabled,this.stateLogEnabled=e.stateLogEnabled,this.tcpHost=e.tcpHost,this.tcpPort=parseInt(e.tcpPort)||502,this.tcpType=e.tcpType,this.serialPort=e.serialPort,this.serialBaudrate=e.serialBaudrate,this.serialDatabits=e.serialDatabits,this.serialStopbits=e.serialStopbits,this.serialParity=e.serialParity,this.serialType=e.serialType,this.serialConnectionDelay=parseInt(e.serialConnectionDelay)||n,this.unit_id=parseInt(e.unit_id)||1,this.commandDelay=parseInt(e.commandDelay)||1,this.clientTimeout=parseInt(e.clientTimeout)||1e3,this.reconnectTimeout=parseInt(e.reconnectTimeout)||i,this.reconnectOnTimeout=e.reconnectOnTimeout,void 0===e.parallelUnitIdsAllowed?this.parallelUnitIdsAllowed=!0:this.parallelUnitIdsAllowed=e.parallelUnitIdsAllowed;var r=this;function s(e){c.settings.verbose&&r.warn("Client -> "+e+r.serverInfo)}function a(e){c.settings.verbose&&u.internalDebug("Client -> "+e+r.serverInfo)}r.isFirstInitOfConnection=!0,r.closingModbus=!1,r.client=null,r.bufferCommandList=new Map,r.sendingAllowed=new Map,r.unitSendingAllowed=[],r.messageAllowedStates=u.messagesAllowedStates,r.serverInfo="",r.stateMachine=null,r.stateService=null,r.stateMachine=u.createStateMachineService(),r.actualServiceState=r.stateMachine.initialState,r.actualServiceStateBefore=r.actualServiceState,r.stateService=u.startStateService(r.stateMachine),r.reconnectTimeoutId=0,r.serialSendingAllowed=!1,r.setUnitIdFromPayload=function(e){var t=u.getActualUnitId(r,e);u.checkUnitId(t,r.clienttype)||(r.unit_id=1),r.client.setID(t),e.unitId=t},!Number.isNaN(r.unit_id)&&u.checkUnitId(r.unit_id,r.clienttype)||(r.unit_id=1),r.updateServerinfo=function(){"tcp"===r.clienttype?r.serverInfo=" TCP@"+r.tcpHost+":"+r.tcpPort:r.serverInfo=" Serial@"+r.serialPort+":"+r.serialBaudrate+"bit/s",r.serverInfo+=" default Unit-Id: "+r.unit_id},r.queueLog=function(e){r.bufferCommands&&r.queueLogEnabled&&a(e)},r.stateService.subscribe(function(e){var t;if(r.actualServiceStateBefore=r.actualServiceState,r.actualServiceState=e,t=e.value,r.stateLogEnabled&&a(t),e.matches("init")){r.updateServerinfo(),d.initQueue(r),r.reconnectTimeoutId=0;try{r.isFirstInitOfConnection?(r.isFirstInitOfConnection=!1,s("init in 500 ms"),setTimeout(r.connectClient,n)):(s("init in "+r.reconnectTimeout+" ms"),setTimeout(r.connectClient,r.reconnectTimeout))}catch(e){r.error(e,{payload:"client connection error "+o})}r.emit("mbinit")}e.matches("connected")&&r.emit("mbconnected"),e.matches("activated")&&(r.emit("mbactive"),r.bufferCommands&&!d.checkQueuesAreEmpty(r)&&r.stateService.send("QUEUE")),e.matches("queueing")&&(setTimeout(function(){d.dequeueCommand(r)},r.commandDelay),r.emit("mbqueue")),e.matches("opened")&&(r.serialSendingAllowed=!0,r.emit("mbopen")),e.matches("closed")&&(r.emit("mbclosed"),r.stateService.send("RECONNECT")),e.matches("stopped")&&(s("stopped state without reconnecting"),r.emit("mbclosed")),e.matches("failed")&&(r.emit("mberror","Modbus Failure On State "+r.actualServiceStateBefore.value+o),r.stateService.send("BREAK")),e.matches("broken")&&(r.emit("mbbroken","Modbus Broken On State "+r.actualServiceStateBefore.value+o),r.reconnectOnTimeout?(r.reconnectTimeout<=0&&(r.reconnectTimeout=i),r.stateService.send("RECONNECT")):r.stateService.send("ACTIVATE")),e.matches("reconnecting")&&(r.serialSendingAllowed=!1,r.emit("mbreconnecting"),r.reconnectTimeout<=0&&(r.reconnectTimeout=i),setTimeout(function(){r.reconnectTimeoutId=0,r.stateService.send("INIT")},r.reconnectTimeout))}),r.connectClient=function(){if(r.client)try{r.client.close(function(){a("connection closed")}),a("connection close sent")}catch(e){a(e.message)}if(r.client=null,r.client=new t,r.clientTimeout||(r.clientTimeout=1e3),r.reconnectTimeout||(r.reconnectTimeout=i),"tcp"===r.clienttype){if(!u.checkUnitId(r.unit_id,r.clienttype))return r.error(new Error("wrong unit-id (0..255)"),{payload:r.unit_id}),void r.stateService.send("FAILURE");switch(r.tcpType){case"C701":a("C701 port UDP bridge"),r.client.connectC701(r.tcpHost,{port:r.tcpPort,autoOpen:!0}).then(r.setTCPConnectionOptions).then(r.setTCPConnected).catch(r.modbusTcpErrorHandling);break;case"TELNET":a("Telnet port"),r.client.connectTelnet(r.tcpHost,{port:r.tcpPort,autoOpen:!0}).then(r.setTCPConnectionOptions).catch(r.modbusTcpErrorHandling);break;case"TPC-RTU-BUFFERED":a("TCP RTU buffered port"),r.client.connectTcpRTUBuffered(r.tcpHost,{port:r.tcpPort,autoOpen:!0}).then(r.setTCPConnectionOptions).catch(r.modbusTcpErrorHandling);break;default:a("TCP port"),r.client.connectTCP(r.tcpHost,{port:r.tcpPort,autoOpen:!0}).then(r.setTCPConnectionOptions).catch(r.modbusTcpErrorHandling)}}else{if(!u.checkUnitId(r.unit_id,r.clienttype))return r.error(new Error("wrong unit-id serial (1..247)"),{payload:r.unit_id}),void r.stateService.send("FAILURE");if(r.serialConnectionDelay||(r.serialConnectionDelay=n),!r.serialPort)return r.error(new Error("wrong serial port"),{payload:r.serialPort}),void r.stateService.send("FAILURE");var e={baudRate:parseInt(r.serialBaudrate),dataBits:parseInt(r.serialDatabits),stopBits:parseInt(r.serialStopbits),parity:r.serialParity,autoOpen:!1};switch(r.serialType){case"ASCII":a("ASCII port serial"),r.client.connectAsciiSerial(r.serialPort,e).then(r.setSerialConnectionOptions).catch(r.modbusSerialErrorHandling);break;case"RTU":a("RTU port serial"),r.client.connectRTU(r.serialPort,e).then(r.setSerialConnectionOptions).catch(r.modbusSerialErrorHandling);break;default:a("RTU buffered port serial"),r.client.connectRTUBuffered(r.serialPort,e).then(r.setSerialConnectionOptions).catch(r.modbusSerialErrorHandling)}}},r.setTCPConnectionOptions=function(){r.client.setID(r.unit_id),r.client.setTimeout(r.clientTimeout),r.stateService.send("CONNECT")},r.setTCPConnected=function(){u.modbusSerialDebug("modbus tcp connected on "+r.tcpHost)},r.setSerialConnectionOptions=function(){r.stateService.send("OPENSERIAL"),setTimeout(r.openSerialClient,parseInt(r.serialConnectionDelay))},r.modbusErrorHandling=function(e){e.message?u.modbusSerialDebug("modbusErrorHandling:"+e.message):u.modbusSerialDebug("modbusErrorHandling:"+JSON.stringify(e)),e.errno&&u.networkErrors.includes(e.errno)&&r.stateService.send("FAILURE")},r.modbusTcpErrorHandling=function(e){r.showErrors&&r.error(e),e.message?u.modbusSerialDebug("modbusTcpErrorHandling:"+e.message):u.modbusSerialDebug("modbusTcpErrorHandling:"+JSON.stringify(e)),e.errno&&u.networkErrors.includes(e.errno)&&r.stateService.send("BREAK")},r.modbusSerialErrorHandling=function(e){r.showErrors&&r.error(e),e.message?u.modbusSerialDebug("modbusSerialErrorHandling:"+e.message):u.modbusSerialDebug("modbusSerialErrorHandling:"+JSON.stringify(e)),r.stateService.send("BREAK")},r.openSerialClient=function(){"opened"===r.actualServiceState.value?(a("time to open Unit "+r.unit_id),u.modbusSerialDebug("modbus connection opened"),r.client.setID(r.unit_id),r.client.setTimeout(parseInt(r.clientTimeout)),r.client._port.on("close",r.onModbusClose),r.stateService.send("CONNECT")):(a("wrong state on connect serial "+r.actualServiceState.value),u.modbusSerialDebug("modbus connection not opened state is %s",r.actualServiceState.value),r.stateService.send("BREAK"))},r.onModbusClose=function(){s("Modbus closed port"),u.modbusSerialDebug("modbus closed port"),r.stateService.send("CLOSE")},r.on("readModbus",function(t,e,n){var i=r.actualServiceState;-1===r.messageAllowedStates.indexOf(i.value)?n(new Error("Client Not Ready To Read At State "+i.value),t):r.bufferCommands?d.pushToQueueByUnitId(r,u.readModbus,t,e,n).then(function(){r.queueLog(JSON.stringify({info:"queued read msg",message:t.payload,state:i.value,queueLength:r.bufferCommandList.get(t.queueUnitId).length}))}).catch(function(e){n(e,t)}).finally(function(){r.stateService.send("QUEUE")}):u.readModbus(r,t,e,n)}),r.on("writeModbus",function(t,e,n){var i=r.actualServiceState;-1===r.messageAllowedStates.indexOf(i.value)?n(new Error("Client Not Ready To Write At State "+i.value),t):r.bufferCommands?d.pushToQueueByUnitId(r,u.writeModbus,t,e,n).then(function(){r.queueLog(JSON.stringify({info:"queued write msg",message:t.payload,state:i.value,queueLength:r.bufferCommandList.get(t.queueUnitId).length}))}).catch(function(e){n(e,t)}).finally(function(){r.stateService.send("QUEUE")}):u.writeModbus(r,t,e,n)}),r.activateSending=function(n){return r.sendingAllowed.set(n.queueUnitId,!0),r.serialSendingAllowed=!0,new Promise(function(e,t){try{r.bufferCommands?(r.queueLog(JSON.stringify({info:"queue response activate sending",message:n.payload,queueLength:r.bufferCommandList.length,queueUnitId:n.queueUnitId})),d.checkQueuesAreEmpty(r)?r.stateService.send("EMPTY"):r.stateService.send("ACTIVATE")):r.stateService.send("ACTIVATE"),e()}catch(e){t(e)}})},a("initialized"),r.setMaxListeners(0),r.on("reconnect",function(){r.stateService.send("CLOSE")}),r.on("dynamicReconnect",function(e,t,n){if(l.invalidPayloadIn(e))throw new Error("Message Or Payload Not Valid");u.internalDebug("Dynamic Reconnect Parameters "+JSON.stringify(e.payload)),u.setNewNodeSettings(r,e)?t(e):n(new Error("Message Or Payload Not Valid"),e),u.internalDebug("Dynamic Reconnect Starts on actual state "+r.actualServiceState.value),r.stateService.send("CLOSE")}),r.on("close",function(t){r.closingModbus=!0,a("stop fsm on close "+r.name),r.stateService.send("STOP"),a("close node "+r.name),r.client?r.client.isOpen?r.client.close(function(e){a(e?"Connection closed with error "+r.name:"Connection closed well "+r.name),t()}):(a("connection was closed "+r.name),t()):(a("Connection closed simple "+r.name),t())}),r.registeredNodeList={},r.registerForModbus=function(e){r.registeredNodeList[e.id]=e,1===Object.keys(r.registeredNodeList).length&&(r.closingModbus=!1,r.stateService.send("NEW"),r.stateService.send("INIT"))},r.closeConnectionWithoutRegisteredNodes=function(e){0===Object.keys(r.registeredNodeList).length?(r.closingModbus=!0,r.client&&"stopped"!==r.actualServiceState.value&&r.client.isOpen?r.client.close(function(){r.stateService.send("STOP"),e()}):(r.stateService.send("STOP"),e())):e()},r.deregisterForModbus=function(e,t){delete r.registeredNodeList[e.id],r.closingModbus?t():r.closeConnectionWithoutRegisteredNodes(t)}}),c.httpAdmin.get("/modbus/serial/ports",c.auth.needsPermission("serial.read"),function(e,t){require("serialport").list().then(function(e){t.json(e)}).catch(function(e){t.json([e.message]),u.internalDebug(e.message)})})};
//# sourceMappingURL=maps/modbus-client.js.map
{
"name": "node-red-contrib-modbus",
"version": "5.5.0",
"version": "5.5.1",
"private": false,

@@ -5,0 +5,0 @@ "description": "The all in one Modbus TCP and Serial contribution package for Node-RED.",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc