@things-factory/integration-modbus 6.2.65 → 6.2.70

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -31,18 +31,27 @@ class ModbusTCPConnector {
31
31
  /*
32
32
  try to keep connecting if keepalive is true
33
33
  */
34
+ var clientIdx = 1;
34
35
  var connected = false;
36
+ var looped = true;
35
37
  while (true) {
36
38
  var clientSocket = new net_1.Socket();
37
39
  clientSocket = new net_1.Socket();
38
40
  var promiseSocket = new promise_socket_1.default(clientSocket);
39
- var client = new modbus.client.TCP(clientSocket, 5, 10000);
41
+ var client = new modbus.client.TCP(clientSocket, clientIdx++, 10000);
40
42
  clientSocket.on('error', async (ex) => {
41
43
  debug(ex);
42
44
  integration_base_1.ConnectionManager.logger.error(`modbus tcp connection error: ${ex}`);
43
45
  });
46
+ clientSocket.on('close', async () => {
47
+ debug(`modbus tcp connection closed`);
48
+ if (keepalive && !looped) {
49
+ await this.disconnect(connection);
50
+ await this.connect(connection);
51
+ }
52
+ });
44
53
  debug(`connecting to ${connection.endpoint}...`);
45
- let isConnectionInstance = integration_base_1.ConnectionManager.getConnectionInstances(connection.domain).hasOwnProperty(connection.name);
54
+ looped = true;
46
55
  await promiseSocket
47
56
  .connect(port, host)
48
57
  .then(() => {
@@ -52,110 +61,54 @@ class ModbusTCPConnector {
52
61
  promiseSocket && promiseSocket.destroy();
53
62
  });
54
63
  // if the current connections have the connection with the same name, the current try should be stopped.
55
- if (!keepalive || connected || isConnectionInstance) {
64
+ if (!keepalive || connected) {
65
+ looped = false;
56
66
  break;
57
67
  }
58
68
  await (0, utils_1.sleep)(1000);
59
69
  }
60
70
  var queue = new p_queue_1.default({ concurrency: 1 });
61
- if (!this.checkConnectionInstance(connection.domain, connection.name)) {
62
- throw new Error(`remove a previously invalid connection(${connection.name})`);
63
- }
64
71
  integration_base_1.ConnectionManager.addConnectionInstance(connection, {
65
- client,
66
- readModBus: async function (client, objectType, address, quantity, { logger }) {
72
+ readModBus: async function (objectType, address, quantity, { logger }) {
67
73
  return await queue.add(async () => {
68
- while (true) {
69
- try {
70
- var response;
71
- switch (objectType) {
72
- case 'descrete input':
73
- response = await client.readDiscreteInputs(address, quantity);
74
- break;
75
- case 'input register':
76
- response = await client.readInputRegisters(address, quantity);
77
- break;
78
- case 'holding register':
79
- response = await client.readHoldingRegisters(address, quantity);
80
- break;
81
- default:
82
- response = await client.readCoils(address, quantity);
83
- }
84
- var data = response && response.response._body.valuesAsArray.slice(0, quantity);
85
- logger.info(`${JSON.stringify(data)}`);
86
- return {
87
- data
88
- };
89
- }
90
- catch (e) {
91
- debug('readModBus command failed - ', e);
92
- debug(`connections: ${JSON.stringify(integration_base_1.ConnectionManager.getConnectionInstances(connection.domain))}`);
93
- if (keepalive) {
94
- debug('[readModBus] reconnecting...');
95
- promiseSocket && promiseSocket.destroy();
96
- clientSocket = new net_1.Socket();
97
- promiseSocket = new promise_socket_1.default(clientSocket);
98
- client = new modbus.client.TCP(clientSocket);
99
- clientSocket.on('error', async (ex) => {
100
- debug(`modbus tcp connection error: ${ex}`);
101
- integration_base_1.ConnectionManager.logger.error(`modbus tcp connection error: ${ex}`);
102
- });
103
- await promiseSocket.connect(port, host).catch(ex => {
104
- debug(`${connection.name} can't connect to ${connection.endpoint}`);
105
- });
106
- await (0, utils_1.sleep)(1000);
107
- }
108
- else {
109
- debug(`[readModBus] ${e}`);
110
- throw e;
111
- }
112
- }
74
+ var response;
75
+ switch (objectType) {
76
+ case 'descrete input':
77
+ response = await client.readDiscreteInputs(address, quantity);
78
+ break;
79
+ case 'input register':
80
+ response = await client.readInputRegisters(address, quantity);
81
+ break;
82
+ case 'holding register':
83
+ response = await client.readHoldingRegisters(address, quantity);
84
+ break;
85
+ default:
86
+ response = await client.readCoils(address, quantity);
113
87
  }
88
+ var data = response && response.response._body.valuesAsArray.slice(0, quantity);
89
+ logger.info(`${JSON.stringify(data)}`);
90
+ return {
91
+ data
92
+ };
114
93
  });
115
94
  },
116
- writeSingleModBus: async function (client, objectType, address, value, { logger }) {
95
+ writeSingleModBus: async function (objectType, address, value, { logger }) {
117
96
  return await queue.add(async () => {
118
- while (true) {
119
- try {
120
- var response;
121
- switch (objectType) {
122
- case 'holding register':
123
- await client.writeSingleRegister(address, parseInt(value));
124
- response = await client.readHoldingRegisters(address, 1);
125
- break;
126
- default:
127
- await client.writeSingleCoil(address, !!Number(value));
128
- response = await client.readCoils(address, 1);
129
- }
130
- var data = response && response.response._body.valuesAsArray[0];
131
- logger.info(data);
132
- return {
133
- data
134
- };
135
- }
136
- catch (e) {
137
- debug('writeSingleModBus command failed - ', e);
138
- if (keepalive) {
139
- debug('[writeSingleModBus] reconnecting...');
140
- promiseSocket && promiseSocket.destroy();
141
- clientSocket = new net_1.Socket();
142
- promiseSocket = new promise_socket_1.default(clientSocket);
143
- client = new modbus.client.TCP(clientSocket);
144
- clientSocket.on('error', async (ex) => {
145
- debug(`modbus tcp connection error: ${ex}`);
146
- integration_base_1.ConnectionManager.logger.error(`modbus tcp connection error: ${ex}`);
147
- });
148
- await promiseSocket.connect(port, host).catch(ex => {
149
- debug(`${connection.name} can't connect to ${connection.endpoint}`);
150
- });
151
- await (0, utils_1.sleep)(1000);
152
- }
153
- else {
154
- debug(`[writeSingleModBus] ${e}`);
155
- throw e;
156
- }
157
- }
97
+ var response;
98
+ switch (objectType) {
99
+ case 'holding register':
100
+ await client.writeSingleRegister(address, parseInt(value));
101
+ response = await client.readHoldingRegisters(address, 1);
102
+ break;
103
+ default:
104
+ await client.writeSingleCoil(address, !!Number(value));
105
+ response = await client.readCoils(address, 1);
158
106
  }
107
+ var data = response && response.response._body.valuesAsArray[0];
108
+ logger.info(data);
109
+ return {
110
+ data
111
+ };
159
112
  });
160
113
  },
161
114
  close: function () {
@@ -1 +1 @@
1
- {"version":3,"file":"modbus-tcp.js","sourceRoot":"","sources":["../../../server/engine/connector/modbus-tcp.ts"],"names":[],"mappings":";;;;AAAA,yDAAkC;AAClC,6BAA4B;A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BACjB;aACF;SACF,CAAA;IACH,CAAC;IAED,IAAI,YAAY;QACd,OAAO,CAAC,QAAQ,CAAC,CAAA;IACnB,CAAC;IAED,IAAI,IAAI;QACN,OAAO,kCAAkC,CAAA;IAC3C,CAAC;CACF;AAnND,gDAmNC;AAED,oCAAiB,CAAC,iBAAiB,CAAC,YAAY,EAAE,IAAI,kBAAkB,EAAE,CAAC,CAAA","sourcesContent":["import * as modbus from 'jsmodbus'\nimport { Socket } from 'net'\nimport PQueue from 'p-queue'\nimport PromiseSocket from 'promise-socket'\n\nimport { Connection, ConnectionManager, Connector } from '@things-factory/integration-base'\nimport { sleep } from '@things-factory/utils'\n\nconst debug = require('debug')('things-factory:modbus-tcp-connector')\n\nexport class ModbusTCPConnector implements Connector {\n async ready(connectionConfigs) {\n await Promise.all(connectionConfigs.map(this.connect.bind(this)))\n\n ConnectionManager.logger.info('modbus-tcp connections are ready')\n }\n\n checkConnectionInstance(domain, connectionName): boolean {\n let connectionInstances = ConnectionManager.getConnectionInstances(domain)\n if (\n !connectionInstances.hasOwnProperty(connectionName) ||\n (connectionInstances?.[connectionName] &&\n connectionInstances?.[connectionName]?.client?.connectionState !== 'online')\n ) {\n return true\n }\n return false\n }\n\n async connect(connection) {\n var [host, port = 502] = connection.endpoint.split(':')\n var {\n params: { keepalive = true }\n } = connection\n\n try {\n /*\n try to keep connecting if keepalive is true\n */\n var connected: boolean = false\n while (true) {\n var clientSocket = new Socket()\n clientSocket = new Socket()\n var promiseSocket = new PromiseSocket(clientSocket)\n\n var client = new modbus.client.TCP(clientSocket, 5, 10000)\n\n clientSocket.on('error', async ex => {\n debug(ex)\n ConnectionManager.logger.error(`modbus tcp connection error: ${ex}`)\n })\n\n debug(`connecting to ${connection.endpoint}...`)\n let isConnectionInstance: boolean = ConnectionManager.getConnectionInstances(connection.domain).hasOwnProperty(\n connection.name\n )\n\n await promiseSocket\n .connect(port, host)\n .then(() => {\n connected = true\n })\n .catch(ex => {\n promiseSocket && promiseSocket.destroy()\n })\n\n // if the current connections have the connection with the same name, the current try should be stopped.\n if (!keepalive || connected || isConnectionInstance) {\n break\n }\n\n await sleep(1000)\n }\n\n var queue = new PQueue({ concurrency: 1 })\n\n if (!this.checkConnectionInstance(connection.domain, connection.name)) {\n throw new Error(`remove a previously invalid connection(${connection.name})`)\n }\n\n ConnectionManager.addConnectionInstance(connection, {\n client,\n readModBus: async function (client, objectType, address, quantity, { logger }) {\n return await queue.add(async () => {\n while (true) {\n try {\n var response\n\n switch (objectType) {\n case 'descrete input':\n response = await client.readDiscreteInputs(address, quantity)\n break\n case 'input register':\n response = await client.readInputRegisters(address, quantity)\n break\n case 'holding register':\n response = await client.readHoldingRegisters(address, quantity)\n break\n default:\n response = await client.readCoils(address, quantity)\n }\n\n var data = response && response.response._body.valuesAsArray.slice(0, quantity)\n logger.info(`${JSON.stringify(data)}`)\n return {\n data\n }\n } catch (e) {\n debug('readModBus command failed - ', e)\n\n debug(`connections: ${JSON.stringify(ConnectionManager.getConnectionInstances(connection.domain))}`)\n if (keepalive) {\n debug('[readModBus] reconnecting...')\n promiseSocket && promiseSocket.destroy()\n clientSocket = new Socket()\n promiseSocket = new PromiseSocket(clientSocket)\n client = new modbus.client.TCP(clientSocket)\n clientSocket.on('error', async ex => {\n debug(`modbus tcp connection error: ${ex}`)\n ConnectionManager.logger.error(`modbus tcp connection error: ${ex}`)\n })\n await promiseSocket.connect(port, host).catch(ex => {\n debug(`${connection.name} can't connect to ${connection.endpoint}`)\n })\n await sleep(1000)\n } else {\n debug(`[readModBus] ${e}`)\n throw e\n }\n }\n }\n })\n },\n writeSingleModBus: async function (client, objectType, address, value, { logger }) {\n return await queue.add(async () => {\n while (true) {\n try {\n var response\n\n switch (objectType) {\n case 'holding register':\n await client.writeSingleRegister(address, parseInt(value))\n response = await client.readHoldingRegisters(address, 1)\n break\n default:\n await client.writeSingleCoil(address, !!Number(value))\n response = await client.readCoils(address, 1)\n }\n\n var data = response && response.response._body.valuesAsArray[0]\n logger.info(data)\n return {\n data\n }\n } catch (e) {\n debug('writeSingleModBus command failed - ', e)\n if (keepalive) {\n debug('[writeSingleModBus] reconnecting...')\n promiseSocket && promiseSocket.destroy()\n clientSocket = new Socket()\n promiseSocket = new PromiseSocket(clientSocket)\n client = new modbus.client.TCP(clientSocket)\n clientSocket.on('error', async ex => {\n debug(`modbus tcp connection error: ${ex}`)\n ConnectionManager.logger.error(`modbus tcp connection error: ${ex}`)\n })\n await promiseSocket.connect(port, host).catch(ex => {\n debug(`${connection.name} can't connect to ${connection.endpoint}`)\n })\n await sleep(1000)\n } else {\n debug(`[writeSingleModBus] ${e}`)\n throw e\n }\n }\n }\n })\n },\n close: function () {\n queue.clear()\n keepalive = false\n promiseSocket.destroy()\n }\n })\n\n ConnectionManager.logger.info(`modbus-tcp connection(${connection.name}:${connection.endpoint}) is connected`)\n } catch (ex) {\n ConnectionManager.logger.info(\n `modbus-tcp connection(${connection.name}:${connection.endpoint}) failed to connect`\n )\n throw ex\n }\n }\n\n async disconnect(connection: Connection) {\n var { close } = ConnectionManager.removeConnectionInstance(connection)\n close()\n\n ConnectionManager.logger.info(`modbus-tcp connection(${connection.name}) is disconnected`)\n }\n\n get parameterSpec() {\n return [\n {\n type: 'checkbox',\n name: 'keepalive',\n label: 'keepalive',\n property: {\n value: 'checked'\n }\n }\n ]\n }\n\n get taskPrefixes() {\n return ['modbus']\n }\n\n get help() {\n return 'integration/connector/modbus-tcp'\n }\n}\n\nConnectionManager.registerConnector('modbus-tcp', new ModbusTCPConnector())\n"]}
1
+ {"version":3,"file":"modbus-tcp.js","sourceRoot":"","sources":["../../../server/engine/connector/modbus-tcp.ts"],"names":[],"mappings":";;;;AAAA,yDAAkC;AAClC,6BAA4B;AAC5B,8DAA4B;AAC5B,4EAA0C;AAE1C,uEAA2F;AAC3F,iDAA6C;AAE7C,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,qCAAqC,CAAC,CAAA;AAErE,MAAa,kBAAkB;IAC7B,KAA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AyB,UAAU,CAAC,IAAI,mBAAmB,CAAC,CAAA;IAC5F,CAAC;IAED,IAAI,aAAa;QACf,OAAO;YACL;gBACE,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,WAAW;gBACjB,KAAK,EAAE,WAAW;gBAClB,QAAQ,EAAE;oBACR,KAAK,EAAE,SAAS;iBACjB;aACF;SACF,CAAA;IACH,CAAC;IAED,IAAI,YAAY;QACd,OAAO,CAAC,QAAQ,CAAC,CAAA;IACnB,CAAC;IAED,IAAI,IAAI;QACN,OAAO,kCAAkC,CAAA;IAC3C,CAAC;CACF;AApKD,gDAoKC;AAED,oCAAiB,CAAC,iBAAiB,CAAC,YAAY,EAAE,IAAI,kBAAkB,EAAE,CAAC,CAAA","sourcesContent":["import * as modbus from 'jsmodbus'\nimport { Socket } from 'net'\nimport PQueue from 'p-queue'\nimport PromiseSocket from 'promise-socket'\n\nimport { Connection, ConnectionManager, Connector } from '@things-factory/integration-base'\nimport { sleep } from '@things-factory/utils'\n\nconst debug = require('debug')('things-factory:modbus-tcp-connector')\n\nexport class ModbusTCPConnector implements Connector {\n async ready(connectionConfigs) {\n await Promise.all(connectionConfigs.map(this.connect.bind(this)))\n\n ConnectionManager.logger.info('modbus-tcp connections are ready')\n }\n\n checkConnectionInstance(domain, connectionName): boolean {\n let connectionInstances = ConnectionManager.getConnectionInstances(domain)\n if (\n !connectionInstances.hasOwnProperty(connectionName) ||\n (connectionInstances?.[connectionName] &&\n connectionInstances?.[connectionName]?.client?.connectionState !== 'online')\n ) {\n return true\n }\n return false\n }\n\n async connect(connection) {\n var [host, port = 502] = connection.endpoint.split(':')\n var {\n params: { keepalive = true }\n } = connection\n\n try {\n /*\n try to keep connecting if keepalive is true\n */\n var clientIdx = 1\n var connected: boolean = false\n var looped: boolean = true\n while (true) {\n var clientSocket = new Socket()\n clientSocket = new Socket()\n var promiseSocket = new PromiseSocket(clientSocket)\n\n var client = new modbus.client.TCP(clientSocket, clientIdx++, 10000)\n\n clientSocket.on('error', async ex => {\n debug(ex)\n ConnectionManager.logger.error(`modbus tcp connection error: ${ex}`)\n })\n\n clientSocket.on('close', async () => {\n debug(`modbus tcp connection closed`)\n if (keepalive && !looped) {\n await this.disconnect(connection)\n await this.connect(connection)\n }\n })\n\n debug(`connecting to ${connection.endpoint}...`)\n\n looped = true\n await promiseSocket\n .connect(port, host)\n .then(() => {\n connected = true\n })\n .catch(ex => {\n promiseSocket && promiseSocket.destroy()\n })\n\n // if the current connections have the connection with the same name, the current try should be stopped.\n if (!keepalive || connected) {\n looped = false\n break\n }\n\n await sleep(1000)\n }\n\n var queue = new PQueue({ concurrency: 1 })\n ConnectionManager.addConnectionInstance(connection, {\n readModBus: async function (objectType, address, quantity, { logger }) {\n return await queue.add(async () => {\n var response\n\n switch (objectType) {\n case 'descrete input':\n response = await client.readDiscreteInputs(address, quantity)\n break\n case 'input register':\n response = await client.readInputRegisters(address, quantity)\n break\n case 'holding register':\n response = await client.readHoldingRegisters(address, quantity)\n break\n default:\n response = await client.readCoils(address, quantity)\n }\n\n var data = response && response.response._body.valuesAsArray.slice(0, quantity)\n logger.info(`${JSON.stringify(data)}`)\n return {\n data\n }\n })\n },\n writeSingleModBus: async function (objectType, address, value, { logger }) {\n return await queue.add(async () => {\n var response\n\n switch (objectType) {\n case 'holding register':\n await client.writeSingleRegister(address, parseInt(value))\n response = await client.readHoldingRegisters(address, 1)\n break\n default:\n await client.writeSingleCoil(address, !!Number(value))\n response = await client.readCoils(address, 1)\n }\n\n var data = response && response.response._body.valuesAsArray[0]\n logger.info(data)\n return {\n data\n }\n })\n },\n close: function () {\n queue.clear()\n keepalive = false\n promiseSocket.destroy()\n }\n })\n\n ConnectionManager.logger.info(`modbus-tcp connection(${connection.name}:${connection.endpoint}) is connected`)\n } catch (ex) {\n ConnectionManager.logger.info(\n `modbus-tcp connection(${connection.name}:${connection.endpoint}) failed to connect`\n )\n throw ex\n }\n }\n\n async disconnect(connection: Connection) {\n var { close } = ConnectionManager.removeConnectionInstance(connection)\n close()\n\n ConnectionManager.logger.info(`modbus-tcp connection(${connection.name}) is disconnected`)\n }\n\n get parameterSpec() {\n return [\n {\n type: 'checkbox',\n name: 'keepalive',\n label: 'keepalive',\n property: {\n value: 'checked'\n }\n }\n ]\n }\n\n get taskPrefixes() {\n return ['modbus']\n }\n\n get help() {\n return 'integration/connector/modbus-tcp'\n }\n}\n\nConnectionManager.registerConnector('modbus-tcp', new ModbusTCPConnector())\n"]}
@@ -15,8 +15,8 @@ async function modbusRead(step, { logger, domain, data }) {
15
15
  debug(`invalid number address : ${address}`);
16
16
  throw new Error(`invalid number address : ${address}`);
17
17
  }
18
- var { client, readModBus } = connectionInstance;
19
- var content = await readModBus(client, objectType, address, quantity, { logger });
18
+ var { readModBus } = connectionInstance;
19
+ var content = await readModBus(objectType, address, quantity, { logger });
20
20
  debug(`result : ${JSON.stringify(content)}`);
21
21
  return content;
22
22
  }
@@ -1 +1 @@
1
- {"version":3,"file":"modbus-read.js","sourceRoot":"","sources":["../../../server/engine/task/modbus-read.ts"],"names":[],"mappings":";;AAAA,iDAA8C;AAC9C,uEAAkF;AAElF,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,4BAA4B,CAAC,CAAA;AAE5D,KAAK,UAAU,UAAU,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE;IACtD,IAAI,EACF,UAAU,EACV,MAAM,EAAE,EAAE,UAAU,GAAG,MAAM,EAAE,OAAO,EAAE,QAAQ,GAAG,CAAC,EAAE,eAAe,EAAE,EACxE,GAAG,IAAI,CAAA;IAER,IAAI,kBAAkB,GAAG,oCAAiB,CAAC,2BAA2B,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA;IAC1F,IAAI,CAAC,kBAAkB,EAAE;QACvB,KAAK,CAAC,mBAAmB,UAAU,EAAE,CAAC,CAAA;QACtC,MAAM,IAAI,KAAK,CAAC,mBAAmB,UAAU,EAAE,CAAC,CAAA;KACjD;IAED,OAAO,GAAG,eAAe,CAAC,CAAC,CAAC,IAAA,cAAM,EAAC,eAAe,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAA;IACnE,IAAI,KAAK,CAAC,OAAO,CAAC,EAAE;QAClB,KAAK,CAAC,4BAA4B,OAAO,EAAE,CAAC,CAAA;QAC5C,MAAM,IAAI,KAAK,CAAC,4BAA4B,OAAO,EAAE,CAAC,CAAA;KACvD;IAED,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,kBAAkB,CAAA;IAC/C,IAAI,OAAO,GAAG,MAAM,UAAU,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,MAAM,EAAE,CAAC,CAAA;IACjF,KAAK,CAAC,YAAY,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;IAC5C,OAAO,OAAO,CAAA;AAChB,CAAC;AAED,UAAU,CAAC,aAAa,GAAG;IACzB;QACE,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,YAAY;QAClB,KAAK,EAAE,aAAa;QACpB,QAAQ,EAAE;YACR,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,kBAAkB,CAAC;SAC9E;KACF;IACD;QACE,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,SAAS;KACjB;IACD;QACE,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,UAAU;KAClB;IACD;QACE,IAAI,EAAE,qBAAqB;QAC3B,IAAI,EAAE,iBAAiB;QACvB,KAAK,EAAE,kBAAkB;KAC1B;CACF,CAAA;AAED,UAAU,CAAC,IAAI,GAAG,8BAA8B,CAAA;AAEhD,+BAAY,CAAC,mBAAmB,CAAC,aAAa,EAAE,UAAU,CAAC,CAAA","sourcesContent":["import { access } from '@things-factory/utils'\nimport { ConnectionManager, TaskRegistry } from '@things-factory/integration-base'\n\nconst debug = require('debug')('things-factory:modbus-read')\n\nasync function modbusRead(step, { logger, domain, data }) {\n var {\n connection,\n params: { objectType = 'coil', address, quantity = 1, accessorAddress }\n } = step\n\n var connectionInstance = ConnectionManager.getConnectionInstanceByName(domain, connection)\n if (!connectionInstance) {\n debug(`no connection : ${connection}`)\n throw new Error(`no connection : ${connection}`)\n }\n\n address = accessorAddress ? access(accessorAddress, data) : address\n if (isNaN(address)) {\n debug(`invalid number address : ${address}`)\n throw new Error(`invalid number address : ${address}`)\n }\n\n var { client, readModBus } = connectionInstance\n var content = await readModBus(client, objectType, address, quantity, { logger })\n debug(`result : ${JSON.stringify(content)}`)\n return content\n}\n\nmodbusRead.parameterSpec = [\n {\n type: 'select',\n name: 'objectType',\n label: 'object-type',\n property: {\n options: ['', 'coil', 'descrete input', 'input register', 'holding register']\n }\n },\n {\n type: 'number',\n name: 'address',\n label: 'address'\n },\n {\n type: 'number',\n name: 'quantity',\n label: 'quantity'\n },\n {\n type: 'scenario-step-input',\n name: 'accessorAddress',\n label: 'accessor-address'\n }\n]\n\nmodbusRead.help = 'integration/task/modbus-read'\n\nTaskRegistry.registerTaskHandler('modbus-read', modbusRead)\n"]}
1
+ {"version":3,"file":"modbus-read.js","sourceRoot":"","sources":["../../../server/engine/task/modbus-read.ts"],"names":[],"mappings":";;AAAA,iDAA8C;AAC9C,uEAAkF;AAElF,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,4BAA4B,CAAC,CAAA;AAE5D,KAAK,UAAU,UAAU,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE;IACtD,IAAI,EACF,UAAU,EACV,MAAM,EAAE,EAAE,UAAU,GAAG,MAAM,EAAE,OAAO,EAAE,QAAQ,GAAG,CAAC,EAAE,eAAe,EAAE,EACxE,GAAG,IAAI,CAAA;IAER,IAAI,kBAAkB,GAAG,oCAAiB,CAAC,2BAA2B,CAAC,MAAM,EAAE,UAAU,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AG,8BAA8B,CAAA;AAEhD,+BAAY,CAAC,mBAAmB,CAAC,aAAa,EAAE,UAAU,CAAC,CAAA","sourcesContent":["import { access } from '@things-factory/utils'\nimport { ConnectionManager, TaskRegistry } from '@things-factory/integration-base'\n\nconst debug = require('debug')('things-factory:modbus-read')\n\nasync function modbusRead(step, { logger, domain, data }) {\n var {\n connection,\n params: { objectType = 'coil', address, quantity = 1, accessorAddress }\n } = step\n\n var connectionInstance = ConnectionManager.getConnectionInstanceByName(domain, connection)\n if (!connectionInstance) {\n debug(`no connection : ${connection}`)\n throw new Error(`no connection : ${connection}`)\n }\n\n address = accessorAddress ? access(accessorAddress, data) : address\n if (isNaN(address)) {\n debug(`invalid number address : ${address}`)\n throw new Error(`invalid number address : ${address}`)\n }\n\n var { readModBus } = connectionInstance\n var content = await readModBus(objectType, address, quantity, { logger })\n debug(`result : ${JSON.stringify(content)}`)\n return content\n}\n\nmodbusRead.parameterSpec = [\n {\n type: 'select',\n name: 'objectType',\n label: 'object-type',\n property: {\n options: ['', 'coil', 'descrete input', 'input register', 'holding register']\n }\n },\n {\n type: 'number',\n name: 'address',\n label: 'address'\n },\n {\n type: 'number',\n name: 'quantity',\n label: 'quantity'\n },\n {\n type: 'scenario-step-input',\n name: 'accessorAddress',\n label: 'accessor-address'\n }\n]\n\nmodbusRead.help = 'integration/task/modbus-read'\n\nTaskRegistry.registerTaskHandler('modbus-read', modbusRead)\n"]}
@@ -20,8 +20,8 @@ async function modbusWriteSingle(step, { logger, domain, data }) {
20
20
  if (isNaN(value)) {
21
21
  throw new Error(`invalid number value : ${value}`);
22
22
  }
23
- var { client, writeSingleModBus } = connectionInstance;
24
- var content = await writeSingleModBus(client, objectType, address, value, { logger });
23
+ var { writeSingleModBus } = connectionInstance;
24
+ var content = await writeSingleModBus(objectType, address, value, { logger });
25
25
  return content;
26
26
  }
27
27
  modbusWriteSingle.parameterSpec = [
@@ -1 +1 @@
1
- {"version":3,"file":"modbus-write-single.js","sourceRoot":"","sources":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iB,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,CAAC,CAAA;IACrF,OAAO,OAAO,CAAA;AAChB,CAAC;AAED,iBAAiB,CAAC,aAAa,GAAG;IAChC;QACE,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,YAAY;QAClB,KAAK,EAAE,aAAa;QACpB,QAAQ,EAAE;YACR,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,kBAAkB,CAAC;SAC1C;KACF;IACD;QACE,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,SAAS;KACjB;IACD;QACE,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,OAAO;KACf;IACD;QACE,IAAI,EAAE,qBAAqB;QAC3B,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,gBAAgB;KACxB;IACD;QACE,IAAI,EAAE,qBAAqB;QAC3B,IAAI,EAAE,iBAAiB;QACvB,KAAK,EAAE,kBAAkB;KAC1B;CACF,CAAA;AAED,iBAAiB,CAAC,IAAI,GAAG,sCAAsC,CAAA;AAE/D,+BAAY,CAAC,mBAAmB,CAAC,qBAAqB,EAAE,iBAAiB,CAAC,CAAA","sourcesContent":["import { access } from '@things-factory/utils'\nimport { ConnectionManager, TaskRegistry } from '@things-factory/integration-base'\n\nconst debug = require('debug')('things-factory:modbus-write-single')\n\nasync function modbusWriteSingle(step, { logger, domain, data }) {\n var {\n connection,\n params: { objectType = 'coil', accessorAddress, address, accessor, value }\n } = step\n\n var connectionInstance = ConnectionManager.getConnectionInstanceByName(domain, connection)\n if (!connectionInstance) {\n debug(`no connection : ${connection}`)\n throw new Error(`no connection : ${connection}`)\n }\n\n address = accessorAddress ? access(accessorAddress, data) : address\n if (isNaN(address)) {\n debug(`invalid number address : ${address}`)\n throw new Error(`invalid number address : ${address}`)\n }\n\n // determine accessor or value as a input value value\n value = accessor ? access(accessor, data) : value\n if (isNaN(value)) {\n throw new Error(`invalid number value : ${value}`)\n }\n\n var { client, writeSingleModBus } = connectionInstance\n var content = await writeSingleModBus(client, objectType, address, value, { logger })\n return content\n}\n\nmodbusWriteSingle.parameterSpec = [\n {\n type: 'select',\n name: 'objectType',\n label: 'object-type',\n property: {\n options: ['', 'coil', 'holding register']\n }\n },\n {\n type: 'number',\n name: 'address',\n label: 'address'\n },\n {\n type: 'number',\n name: 'value',\n label: 'value'\n },\n {\n type: 'scenario-step-input',\n name: 'accessor',\n label: 'accessor-value'\n },\n {\n type: 'scenario-step-input',\n name: 'accessorAddress',\n label: 'accessor-address'\n }\n]\n\nmodbusWriteSingle.help = 'integration/task/modbus-write-single'\n\nTaskRegistry.registerTaskHandler('modbus-write-single', modbusWriteSingle)\n"]}
1
+ {"version":3,"file":"modbus-write-single.js","sourceRoot":"","sources":["../../../server/engine/task/modbus-write-single.ts"],"names":[],"mappings":";;AAAA,iDAA8C;AAC9C,uEAAkF;AAElF,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,oCAAoC,CAAC,CAAA;AAEpE,KAAK,UAAU,iBAAiB,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE;IAC7D,IAAI,EACF,UAAU,EACV,MAAM,EAAE,EAAE,UAAU,GAAG,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,EAC3E,GAAG,IAAI,CAAA;IAER,IAAI,kBAAkB,GAAG,oCAAiB,CAAC,2BAA2B,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA;IAC1F,IAAI,CAAC,kBAAkB,EAAE;QACvB,KAAK,CAAC,mBAAmB,UAAU,EAAE,CAAC,CAAA;QACtC,MAAM,IAAI,KAAK,CAAC,mBAAmB,UAAU,EAAE,CAAC,CAAA;KACjD;IAED,OAAO,GAAG,eAAe,CAAC,CAAC,CAAC,IAAA,cAAM,EAAC,eAAe,EAAE,IAAI,CAAC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AAE/D,+BAAY,CAAC,mBAAmB,CAAC,qBAAqB,EAAE,iBAAiB,CAAC,CAAA","sourcesContent":["import { access } from '@things-factory/utils'\nimport { ConnectionManager, TaskRegistry } from '@things-factory/integration-base'\n\nconst debug = require('debug')('things-factory:modbus-write-single')\n\nasync function modbusWriteSingle(step, { logger, domain, data }) {\n var {\n connection,\n params: { objectType = 'coil', accessorAddress, address, accessor, value }\n } = step\n\n var connectionInstance = ConnectionManager.getConnectionInstanceByName(domain, connection)\n if (!connectionInstance) {\n debug(`no connection : ${connection}`)\n throw new Error(`no connection : ${connection}`)\n }\n\n address = accessorAddress ? access(accessorAddress, data) : address\n if (isNaN(address)) {\n debug(`invalid number address : ${address}`)\n throw new Error(`invalid number address : ${address}`)\n }\n\n // determine accessor or value as a input value value\n value = accessor ? access(accessor, data) : value\n if (isNaN(value)) {\n throw new Error(`invalid number value : ${value}`)\n }\n\n var { writeSingleModBus } = connectionInstance\n var content = await writeSingleModBus(objectType, address, value, { logger })\n return content\n}\n\nmodbusWriteSingle.parameterSpec = [\n {\n type: 'select',\n name: 'objectType',\n label: 'object-type',\n property: {\n options: ['', 'coil', 'holding register']\n }\n },\n {\n type: 'number',\n name: 'address',\n label: 'address'\n },\n {\n type: 'number',\n name: 'value',\n label: 'value'\n },\n {\n type: 'scenario-step-input',\n name: 'accessor',\n label: 'accessor-value'\n },\n {\n type: 'scenario-step-input',\n name: 'accessorAddress',\n label: 'accessor-address'\n }\n]\n\nmodbusWriteSingle.help = 'integration/task/modbus-write-single'\n\nTaskRegistry.registerTaskHandler('modbus-write-single', modbusWriteSingle)\n"]}
@@ -1 +1 @@
1
- {"program":{"fileNames":["../../../node_modules/lerna/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/tslib/tslib.d.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/assert/strict.d.ts","../../../node_modules/buffer/index.d.ts","../../../node_modules/undici-types/header.d.ts","../../../node_modules/undici-types/readable.d.ts","../../../node_modules/undici-types/file.d.ts","../../../node_modules/undici-types/fetch.d.ts","../../../node_modules/undici-types/formdata.d.ts","../../../node_modules/undici-types/connector.d.ts","../../../node_modules/undici-types/client.d.ts","../../../node_modules/undici-types/errors.d.ts","../../../node_modules/undici-types/dispatcher.d.ts","../../../node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/undici-types/global-origin.d.ts","../../../node_modules/undici-types/pool-stats.d.ts","../../../node_modules/undici-types/pool.d.ts","../../../node_modules/undici-types/handlers.d.ts","../../../node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/undici-types/agent.d.ts","../../../node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/undici-types/mock-agent.d.ts","../../../node_modules/undici-types/mock-client.d.ts","../../../node_modules/undici-types/mock-pool.d.ts","../../../node_modules/undici-types/mock-errors.d.ts","../../../node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/undici-types/api.d.ts","../../../node_modules/undici-types/cookies.d.ts","../../../node_modules/undici-types/patch.d.ts","../../../node_modules/undici-types/filereader.d.ts","../../../node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/undici-types/websocket.d.ts","../../../node_modules/undici-types/content-type.d.ts","../../../node_modules/undici-types/cache.d.ts","../../../node_modules/undici-types/interceptors.d.ts","../../../node_modules/undici-types/index.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/dns/promises.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/dom-events.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/readline/promises.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/stream/promises.d.ts","../../../node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/@types/node/stream/web.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/test.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/timers/promises.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/globals.global.d.ts","../../../node_modules/@types/node/index.d.ts","../../../node_modules/jsmodbus/dist/codes/errors.d.ts","../../../node_modules/jsmodbus/dist/codes/function-codes.d.ts","../../../node_modules/jsmodbus/dist/codes/index.d.ts","../../../node_modules/jsmodbus/dist/request/request-body.d.ts","../../../node_modules/jsmodbus/dist/request/exception.d.ts","../../../node_modules/jsmodbus/dist/request/read-coils.d.ts","../../../node_modules/jsmodbus/dist/request/read-discrete-inputs.d.ts","../../../node_modules/jsmodbus/dist/request/read-holding-registers.d.ts","../../../node_modules/jsmodbus/dist/request/read-input-registers.d.ts","../../../node_modules/jsmodbus/dist/request/write-multiple-coils.d.ts","../../../node_modules/jsmodbus/dist/request/write-multiple-registers.d.ts","../../../node_modules/jsmodbus/dist/request/write-single-coil.d.ts","../../../node_modules/jsmodbus/dist/request/write-single-register.d.ts","../../../node_modules/jsmodbus/dist/request/request-factory.d.ts","../../../node_modules/jsmodbus/dist/request/index.d.ts","../../../node_modules/jsmodbus/dist/abstract-request.d.ts","../../../node_modules/jsmodbus/dist/response/response-body.d.ts","../../../node_modules/jsmodbus/dist/response/exception.d.ts","../../../node_modules/jsmodbus/dist/constants/limits.d.ts","../../../node_modules/jsmodbus/dist/constants/primatives.d.ts","../../../node_modules/jsmodbus/dist/constants/index.d.ts","../../../node_modules/jsmodbus/dist/response/read-response-body.d.ts","../../../node_modules/jsmodbus/dist/response/read-coils.d.ts","../../../node_modules/jsmodbus/dist/response/read-discrete-inputs.d.ts","../../../node_modules/jsmodbus/dist/response/read-holding-registers.d.ts","../../../node_modules/jsmodbus/dist/response/read-input-registers.d.ts","../../../node_modules/jsmodbus/dist/response/write-response.body.d.ts","../../../node_modules/jsmodbus/dist/response/write-multiple-coils.d.ts","../../../node_modules/jsmodbus/dist/response/write-multiple-registers.d.ts","../../../node_modules/jsmodbus/dist/response/write-single-coil.d.ts","../../../node_modules/jsmodbus/dist/response/write-single-register.d.ts","../../../node_modules/jsmodbus/dist/response/response-factory.d.ts","../../../node_modules/jsmodbus/dist/response/index.d.ts","../../../node_modules/jsmodbus/dist/abstract-response.d.ts","../../../node_modules/jsmodbus/dist/rtu-request.d.ts","../../../node_modules/jsmodbus/dist/rtu-response.d.ts","../../../node_modules/jsmodbus/dist/tcp-request.d.ts","../../../node_modules/jsmodbus/dist/tcp-response.d.ts","../../../node_modules/jsmodbus/dist/request-response-map.d.ts","../../../node_modules/jsmodbus/dist/user-request-error.d.ts","../../../node_modules/jsmodbus/dist/user-request-metrics.d.ts","../../../node_modules/jsmodbus/dist/user-request.d.ts","../../../node_modules/jsmodbus/dist/client-request-handler.d.ts","../../../node_modules/jsmodbus/dist/client-response-handler.d.ts","../../../node_modules/jsmodbus/dist/errors/isinternalexception.d.ts","../../../node_modules/jsmodbus/dist/errors/isuserrequesterror.d.ts","../../../node_modules/jsmodbus/dist/errors/index.d.ts","../../../node_modules/jsmodbus/dist/modbus-client.d.ts","../../../node_modules/jsmodbus/dist/tcp-client-request-handler.d.ts","../../../node_modules/jsmodbus/dist/tcp-client-response-handler.d.ts","../../../node_modules/jsmodbus/dist/modbus-tcp-client.d.ts","../../../node_modules/jsmodbus/dist/rtu-client-request-handler.d.ts","../../../node_modules/jsmodbus/dist/rtu-client-response-handler.d.ts","../../../node_modules/jsmodbus/dist/modbus-rtu-client.d.ts","../../../node_modules/jsmodbus/dist/modbus-server-request-handler.d.ts","../../../node_modules/jsmodbus/dist/modbus-server-response-handler.d.ts","../../../node_modules/jsmodbus/dist/modbus-server-client.d.ts","../../../node_modules/jsmodbus/dist/modbus-server.d.ts","../../../node_modules/jsmodbus/dist/modbus-tcp-server.d.ts","../../../node_modules/jsmodbus/dist/modbus-rtu-server.d.ts","../../../node_modules/jsmodbus/dist/modbus.d.ts","../server/engine/connector/modbus-tcp-server.ts","../../../node_modules/eventemitter3/index.d.ts","../../../node_modules/p-queue/dist/queue.d.ts","../../../node_modules/p-queue/dist/options.d.ts","../../../node_modules/p-queue/dist/priority-queue.d.ts","../../../node_modules/p-queue/dist/index.d.ts","../../../node_modules/promise-readable/lib/promise-readable.d.ts","../../../node_modules/promise-writable/lib/promise-writable.d.ts","../../../node_modules/promise-duplex/lib/promise-duplex.d.ts","../../../node_modules/promise-socket/lib/timeout-error.d.ts","../../../node_modules/promise-socket/lib/promise-socket.d.ts","../server/engine/connector/modbus-tcp.ts","../server/engine/connector/index.ts","../server/engine/task/modbus-read.ts","../server/engine/task/modbus-write-single.ts","../server/engine/task/index.ts","../server/engine/index.ts","../server/index.ts","../../../node_modules/@jest/expect-utils/build/index.d.ts","../../../node_modules/chalk/index.d.ts","../../../node_modules/@sinclair/typebox/typebox.d.ts","../../../node_modules/@jest/schemas/build/index.d.ts","../../../node_modules/pretty-format/build/index.d.ts","../../../node_modules/jest-diff/build/index.d.ts","../../../node_modules/jest-matcher-utils/build/index.d.ts","../../../node_modules/expect/build/index.d.ts","../../../node_modules/@types/jest/index.d.ts"],"fileInfos":[{"version":"8730f4bf322026ff5229336391a18bcaa1f94d4f82416c8b2f3954e2ccaae2ba","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","4b421cbfb3a38a27c279dec1e9112c3d1da296f77a1a85ddadf7e7a425d45d18","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9",{"version":"3aafcb693fe5b5c3bd277bd4c3a617b53db474fe498fc5df067c5603b1eebde7","affectsGlobalScope":true},{"version":"f3d4da15233e593eacb3965cde7960f3fddf5878528d882bcedd5cbaba0193c7","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"5f406584aef28a331c36523df688ca3650288d14f39c5d2e555c95f0d2ff8f6f","affectsGlobalScope":true},{"version":"22f230e544b35349cfb3bd9110b6ef37b41c6d6c43c3314a31bd0d9652fcec72","affectsGlobalScope":true},{"version":"7ea0b55f6b315cf9ac2ad622b0a7813315bb6e97bf4bb3fbf8f8affbca7dc695","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"eb26de841c52236d8222f87e9e6a235332e0788af8c87a71e9e210314300410a","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"5e5e095c4470c8bab227dbbc61374878ecead104c74ab9960d3adcccfee23205","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"2768ef564cfc0689a1b76106c421a2909bdff0acbe87da010785adab80efdd5c","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true},"7a1971efcba559ea9002ada4c4e3c925004fb67a755300d53b5edf9399354900","efc7d584a33fe3422847783d228f315c4cd1afe74bd7cf8e3f0e4c1125129fef","7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","4967529644e391115ca5592184d4b63980569adf60ee685f968fd59ab1557188","5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","7180c03fd3cb6e22f911ce9ba0f8a7008b1a6ddbe88ccf16a9c8140ef9ac1686","25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","54cb85a47d760da1c13c00add10d26b5118280d44d58e6908d8e89abbd9d7725","3e4825171442666d31c845aeb47fcd34b62e14041bb353ae2b874285d78482aa","c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","a967bfe3ad4e62243eb604bf956101e4c740f5921277c60debaf325c1320bf88","e9775e97ac4877aebf963a0289c81abe76d1ec9a2a7778dbe637e5151f25c5f3","471e1da5a78350bc55ef8cef24eb3aca6174143c281b8b214ca2beda51f5e04a","cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","db3435f3525cd785bf21ec6769bf8da7e8a776be1a99e2e7efb5f244a2ef5fee","c3b170c45fc031db31f782e612adf7314b167e60439d304b49e704010e7bafe5","40383ebef22b943d503c6ce2cb2e060282936b952a01bea5f9f493d5fb487cc7","4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","3a84b7cb891141824bd00ef8a50b6a44596aded4075da937f180c90e362fe5f6","13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","33203609eba548914dc83ddf6cadbc0bcb6e8ef89f6d648ca0908ae887f9fcc5","0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","9f0a92164925aa37d4a5d9dd3e0134cff8177208dba55fd2310cd74beea40ee2","8bfdb79bf1a9d435ec48d9372dc93291161f152c0865b81fc0b2694aedb4578d","2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","d32275be3546f252e3ad33976caf8c5e842c09cb87d468cb40d5f4cf092d1acc","4a0c3504813a3289f7fb1115db13967c8e004aa8e4f8a9021b95285502221bd1",{"version":"cc5e65fb1729463665074b9d7163e78a4225b7af7f3a6b3c74492f415166612f","affectsGlobalScope":true},"cce1f5f86974c1e916ec4a8cab6eec9aa8e31e8148845bf07fbaa8e1d97b1a2c",{"version":"185282b122cbca820c297a02a57b89cf5967ab43e220e3e174d872d3f9a94d2c","affectsGlobalScope":true},"16d74fe4d8e183344d3beb15d48b123c5980ff32ff0cc8c3b96614ddcdf9b239","7b43160a49cf2c6082da0465876c4a0b164e160b81187caeb0a6ca7a281e85ba",{"version":"41fb2a1c108fbf46609ce5a451b7ec78eb9b5ada95fd5b94643e4b26397de0b3","affectsGlobalScope":true},"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb","e8968b394e4365588f8f89cfff86435258cf10062585c1d2224627ab92acda22","285e512c7a0db217a0599e18c462d565fa35be4a5153dd7b80bee88c83e83ddf","b5b719a47968cd61a6f83f437236bb6fe22a39223b6620da81ef89f5d7a78fb7","8806ae97308ef26363bd7ec8071bca4d07fb575f905ee3d8a91aff226df6d618","af5bf1db6f1804fb0069039ae77a05d60133c77a2158d9635ea27b6bb2828a8f","b7fe70be794e13d1b7940e318b8770cd1fb3eced7707805318a2e3aaac2c3e9e",{"version":"2c71199d1fc83bf17636ad5bf63a945633406b7b94887612bba4ef027c662b3e","affectsGlobalScope":true},{"version":"7ae9dc7dbb58cd843065639707815df85c044babaa0947116f97bdb824d07204","affectsGlobalScope":true},"7aae1df2053572c2cfc2089a77847aadbb38eedbaa837a846c6a49fb37c6e5bd","313a0b063f5188037db113509de1b934a0e286f14e9479af24fada241435e707","1f758340b027b18ae8773ac3d33a60648a2af49eaae9e4fde18d0a0dd608642c","87ef1a23caa071b07157c72077fa42b86d30568f9dc9e31eed24d5d14fc30ba8","396a8939b5e177542bdf9b5262b4eee85d29851b2d57681fa9d7eae30e225830","21773f5ac69ddf5a05636ba1f50b5239f4f2d27e4420db147fc2f76a5ae598ac",{"version":"dea4c00820d4fac5e530d4842aed2fb20d6744d75a674b95502cbd433f88bcb0","affectsGlobalScope":true},"a5fe4cc622c3bf8e09ababde5f4096ceac53163eefcd95e9cd53f062ff9bb67a","45b1053e691c5af9bfe85060a3e1542835f8d84a7e6e2e77ca305251eda0cb3c","0f05c06ff6196958d76b865ae17245b52d8fe01773626ac3c43214a2458ea7b7",{"version":"0d832a0650a74aafc276cb3f7bb26bde2e2270a6f87e6c871a64122e9203079b","affectsGlobalScope":true},{"version":"c6f3869f12bb5c3bb8ecd0b050ea20342b89b944eae18d313cde6b0ccc0925d7","affectsGlobalScope":true},"8abd0566d2854c4bd1c5e48e05df5c74927187f1541e6770001d9637ac41542e","d742ed2db6d5425b3b6ac5fb1f2e4b1ed2ae74fbeee8d0030d852121a4b05d2f","d8dba11dc34d50cb4202de5effa9a1b296d7a2f4a029eec871f894bddfb6430d","8b71dd18e7e63b6f991b511a201fad7c3bf8d1e0dd98acb5e3d844f335a73634","01d8e1419c84affad359cc240b2b551fb9812b450b4d3d456b64cda8102d4f60","8221b00f271cf7f535a8eeec03b0f80f0929c7a16116e2d2df089b41066de69b","269929a24b2816343a178008ac9ae9248304d92a8ba8e233055e0ed6dbe6ef71","93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","f8c87b19eae111f8720b0345ab301af8d81add39621b63614dfc2d15fd6f140a","831c22d257717bf2cbb03afe9c4bcffc5ccb8a2074344d4238bf16d3a857bb12",{"version":"2225100373ca3d63bcc7f206e1177152d2e2161285a0bd83c8374db1503a0d1f","affectsGlobalScope":true},{"version":"7052b7b0c3829df3b4985bab2fd74531074b4835d5a7b263b75c82f0916ad62f","affectsGlobalScope":true},"aa34c3aa493d1c699601027c441b9664547c3024f9dbab1639df7701d63d18fa","eefcdf86cefff36e5d87de36a3638ab5f7d16c2b68932be4a72c14bb924e43c1","7c651f8dce91a927ab62925e73f190763574c46098f2b11fb8ddc1b147a6709a","7440ab60f4cb031812940cc38166b8bb6fbf2540cfe599f87c41c08011f0c1df",{"version":"4d0405568cf6e0ff36a4861c4a77e641366feaefa751600b0a4d12a5e8f730a8","affectsGlobalScope":true},{"version":"f5b5dc128973498b75f52b1b8c2d5f8629869104899733ae485100c2309b4c12","affectsGlobalScope":true},"e393915d3dc385e69c0e2390739c87b2d296a610662eb0b1cb85224e55992250","79bad8541d5779c85e82a9fb119c1fe06af77a71cc40f869d62ad379473d4b75","4a34b074b11c3597fb2ff890bc8f1484375b3b80793ab01f974534808d5777c7",{"version":"629d20681ca284d9e38c0a019f647108f5fe02f9c59ac164d56f5694fc3faf4d","affectsGlobalScope":true},"e7dbf5716d76846c7522e910896c5747b6df1abd538fee8f5291bdc843461795",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"b510d0a18e3db42ac9765d26711083ec1e8b4e21caaca6dc4d25ae6e8623f447","d341cf78be6ddf3702405df97b1ada55718825221443eca107c8c5262a410744","55507316c7f090b48815e5975c1742b90935256d00a3573bd01e61642b566e46","6d9f2fd149fd07a4fff8d96976b545272173e993e8c034d838f9f298a43dfa23","ec4adb61037d4e7af78a8191aea712b82a0da52e6e8c98a938026943a3405000","3be27b6ca8e0c417f9194a0a08becbfa850ab7407aaf1ae453a17caf9e753e93","315bd7394eba279a3c42ab2a6c91ce6dea192fb0f9c01d876f4aa472ba8c3dd0","b0c84b3be3d1121685150c8311fbef852ca328cdd8c137aa2e04280fa38700af","d32254175184593ec6a3a6a3af277006d8cab37a63c0f2a6e0b985623d696c47","07d55442d36e1e2682c2aea486c24ef672882a803ff16570bfa76e2d782e7f1b","0248ee8a20faa3049386f7037ce1b369489646a86082af005c3608fec723cbcd","3b4c89dbe40653b29312d6508f3fc339f4ba07d396a07f6b0213af089a3a1fef","3343502059a603461171d480b5fdcd00d0bd79c100a7dba6ed64607ae2e0541f","d20d31b2177c3e18b4f13008b6464db57ac01da4635d354a4f343ec479e83cec","dd08ef4d2f2b21c353a4b119162363075bdf525a8c42031dc5a12b8f8982f334","8d122f18a4fe983ce731dc2de0c1badf5cef24d2464a9c83728804cfc2cf2bfa","68c2bf94e774be4d78e8f88bd337483af426b94379ee814b3c9d3ff9db76c662","425a50b3aad9fb608045554a9790d433c82c5762d5d3107f90297479f4cae4b0","9765a728b1aedb5c055bc04018ba4e8ec3ba237e38c4cdae1a43eb8e00b60150","8c4f222c4e8532b187756a8a3e4c6768a85cc7747ead7c0bcba9d835e0db27e2","661d285cffbd287601ec74d3123280c7ab4cff5b64b291a829602c7a74238f46","7b4ef81f018ff73404f7957a09292e46625676b7f90a24779140d995f0fc1996","ee2597631ece383cb2137d7db852b61ddc519cf4d62195f8b05ea328eb5de291","ad1cffefd62ad90ecc6fdca4c45c3e1b651c3d3f2af0cc8cd0d0705807876db1","54c9d33db8f452d31cbd268a00599705d40d8bbfa930eb1e3a734bbbaf6f9289","061f78cfad4951a6b00e51d9552e6a8248e5efded6db690c16abeb5a7840476f","b3604d94f7c819f0cdbc7964c2aaf1ff1dcbe58bc4099f56e5d95b4c9bc0a2ad","9ab64fa98e2ce5804713f478253c2e05da7cc61ca3636f453d1916c5a9a006af","b595135e2833fe1fa18c85fd5bf15938d114b540e15e609ac82daf010acbb77e","eb0f7c7c13509a4cd339483a13814fa6d3f27190ed8bc12eda68c82b17291232","a6295abc2db5e548c49bf8b3519fa5d0516b4e9c001c343891afc4447224bc16","880b7399179a3f2a755c853ccc18a8088a377609fb07b9de0194dcc204b95397","d567ce37963a59afe6217d1f4d69f03b23e76382706503daa2e81bf3aad34ada","86d09191e3d4c1946ed1289044a1aa67d8ccc623dd50b2593372bfb06f439c06","7f429a77b327587b2679f1d5ab47ad0d2a56472c209c840cc910d9997c9e6468","b01ccfb857e5f9b294a525a5c577581f9b5d1719ba3d0b41957fdef38df09e06","780ff541f5b032f99f439a6bd5a647f30a485d8d8f84c91a71a5f0728cf35883","63d784d76184a2f0fcd10aac46b8ecda19360711e07c4115a5eef9c938bf5e47","8c238329820cd24ca6ebe000f325a4db4e441b71ab1a56cbe8c7ef4ac56c868a","14a9a761300da79b6272afe526798f5816720c1c23b7ae02cf0564fbb08f5935","724ebcde24be6588f93057cf9f2c1a69f7ecc32d34d95a29ab442459ea2597ba","94c95a55dae3403cfdcf2cae4fa737f9bcc3faa42624208c3b6e4397bf273af6","5d65049c55bbcb5c9bf938a5a2b5461ad247659a36ba14584a07c69ecd655ddc","a4a806bbc0a706fb420de3da9c57073d96cd4744d0c2ac61989e2b438bed687e","09ef511b8c654a5d8cb4bc37d2d014a5ea52a1a813878dd9f813062f07050c8e","81b237718c602ef449151290a52140bf51536c09671dd9850a6d0433fa997d11","7f58bd3a0e390c92841e1bfcfb20da8ca7ca6e00c4042ce93665d682cee8eae6","91df55b139dab5b4ac8d602ff5264fd2bac42404bbfc727c8e70ed8baacf871a","6c9f57d6fdf407da27dd9e66e00b49ac0524d50730a147818f3c875e855437f0","73068c893ad2f4a4d12785bee0f887633339415948afc311ce80de3f043c2289","bbc0e15f6d673c1411e348059728bc61f079bc05557008d9dbdb1f83d8416b69","e7c2d8afe351059eb987a9ca22c5791aca23b1ccbb6b26eb00a1f5b2087bfe4d","e8db959db880e69654640f10480ff64be82577bb43e5a87c5db26fd8e2870a62","15b252763a1a9be7ca89f0e64dc1e20ea38250fd3abf6d2a6cf630ab958515df","93cddd037f298f3dded3fc131e2365b36d0968901a0e89482b8f88767a0f439b","df75b0df95576e85da2f262cc62f36b48918976b78ac070eb92326dac0a02d7f","1945680a65134c526609f114a893a13e8a315d7cd7d2535cdc4aed941834dced","033fd6c57b7a1dd510b91adead859149e45a6933b90712df2befbc1b6933b005","c9e8e79f6e8a6f94cca6b22c56cbaf395189b0047c716a1776f2aec58dacdebd","128447b768da362b98723ba741ada2f43c3b6568f82d02b0b9ec5e40134ece97","a4f9142af4bf7fcc2ccfc99542d65446f24c7732753223f707b83504b6b0aeca","b118145683a2238729c3eefcb3de7daf8f4c868e3da480ba28afded67d5c3fe2","a4ab3fee7b65f5cd1460b1027313c0aa6a3b194d4e36c79ab0f44ad8fdf96fbd","b80c780c52524beb13488942543972c8b0e54400e8b59cee0169f38d0fabb968","a0a118c9a66853bb5ec086c878963b5d178ecb3eec72d75dc553d86adef67801","4bbf82fc081be97a72c494d1055e4f62ad743957cdc52b5a597b49d262ae5fd4","4583bf6ebd196f0c7e9aa26bfe5dfee09ea69eee63c2e97448518ea5ee17bc64","2b16288372f6367cdb13e77cbd0e667d5af3034a5b733a0daa98a111cfee227f","23d8cc7a06506dac48b821ebff451b061367e9f1b79b1b296d4b53ace65f202e","bf438026a849e316dd2d4e197bc0fc10798e0cd21fe5a1912287660143f9e708","32903e7a7491fea192f1568fb2f9bbbf3281044e716e11a718b2f5dab1bbf126","b5802b9e18c5b496489713b651c9f7da089ffc751403a82481978ef4ff1d8c2d","97bbf1e8aa018c332f3a1e742625b9c4aebded25a93ae914f8e3a4b009e2fb2a","a26c1ae1ce3c065bb22d552f13810d6be30301ace107cf1c060eba405aaa6e4e","346871eebbc08b8ebf3472f66dbf39af1eb81f49d5eb21b4b7a72eb850abbccc","906a61ccd160d6aa9df636bf015d2860b43fa73aa9cff702969a16d219a5e156","b37335a38d4c511f67a03e8e80682e90685eb7978984219b0333bfe729222c26","8b2b2c2b072f5b0bd065f1eb58ff7ce10da79e44a27bfa4fd85a82019f8145ff","8547694bbf35e324d5bb64215ae218ab372807c759be08f9ce27a8adfc9af9fb","336b6d64b4cff6c2e09100b496e9870743d9c8005e718c18e6200bce7ec2975c","cdcc132f207d097d7d3aa75615ab9a2e71d6a478162dde8b67f88ea19f3e54de","0d14fa22c41fdc7277e6f71473b20ebc07f40f00e38875142335d5b63cdfc9d2","c085e9aa62d1ae1375794c1fb927a445fa105fed891a7e24edbb1c3300f7384a","f315e1e65a1f80992f0509e84e4ae2df15ecd9ef73df975f7c98813b71e4c8da","5b9586e9b0b6322e5bfbd2c29bd3b8e21ab9d871f82346cb71020e3d84bae73e","3e70a7e67c2cb16f8cd49097360c0309fe9d1e3210ff9222e9dac1f8df9d4fb6","ab68d2a3e3e8767c3fba8f80de099a1cfc18c0de79e42cb02ae66e22dfe14a66","d96cc6598148bf1a98fb2e8dcf01c63a4b3558bdaec6ef35e087fd0562eb40ec",{"version":"46894b2a21a60f8449ca6b2b7223b7179bba846a61b1434bed77b34b2902c306","affectsGlobalScope":true}],"options":{"allowSyntheticDefaultImports":true,"declaration":false,"emitDecoratorMetadata":true,"esModuleInterop":true,"experimentalDecorators":true,"importHelpers":true,"inlineSources":true,"module":1,"noEmitOnError":true,"noImplicitAny":false,"outDir":"./","skipLibCheck":true,"sourceMap":true,"strict":false,"target":4,"useDefineForClassFields":false},"fileIdsList":[[213],[215,218],[45],[81],[82,87,115],[83,94,95,102,112,123],[83,84,94,102],[85,124],[86,87,95,103],[87,112,120],[88,90,94,102],[89],[90,91],[94],[92,94],[81,94],[94,95,96,112,123],[94,95,96,109,112,115],[79,82,128],[90,94,97,102,112,123],[94,95,97,98,102,112,120,123],[97,99,112,120,123],[45,46,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130],[94,100],[101,123,128],[90,94,102,112],[103],[104],[81,105],[106,122,128],[107],[108],[94,109,110],[109,111,124,126],[82,94,112,113,114,115],[82,112,114],[112,113],[115],[116],[81,112],[94,118,119],[118,119],[87,102,112,120],[121],[102,122],[82,97,108,123],[87,124],[112,125],[101,126],[127],[82,87,94,96,105,112,123,126,128],[112,129],[211,217],[215],[212,216],[131,146],[131,146,147,164],[112,131,146,147,165,170,171,173],[131,165],[132,133],[150,151],[136,149,176,177],[171],[112,131,146,147,170,173,174,175,178],[166,179,183,184],[189],[112,131,147,165,186,187,189],[131,146,147],[131,147,164,165,189],[94,102,131,147,152,188],[102,131,168,179,180,181],[102,131,189],[134,146,147,164,165,168,169,170,171,172,173,174,175,178,179,182,185,190,191],[146,147,164,165,166,167,168,169],[131,134,135],[135,136,137,138,139,140,141,142,143,144,145],[131,135],[131,134],[131,136,137,138,139,140,141,142,143,144],[131,134,136,148],[148,149,154,155,156,157,159,160,161,162,163],[131,137,152,153],[131,138,152,153],[131,139,153],[131,140,153],[131,134,148,152],[131,149,154,155,156,157,159,160,161,162],[131,141,158],[131,142,158],[148],[131,143,158],[131,144,158],[135,166,167,173,174],[131,148,167,175],[131,135,136,137,138,139,140,141,142,143,144,147],[131,146,148,149,154,155,156,157,159,160,161,162,165,166],[102,131,135,168,169,173,174],[131,169,175],[131,146,148,149,154,155,156,157,159,160,161,162,165,168],[165],[131,147,166,168,170,171,172],[194,195,196,197],[195],[195,196],[214],[112,131,199,200],[131],[102,131,201,202],[56,60,123],[56,112,123],[51],[53,56,120,123],[102,120],[51,131],[53,56,102,123],[48,49,52,55,82,94,112,123],[48,54],[52,56,82,115,123,131],[82,131],[72,82,131],[50,51,131],[56],[50,51,52,53,54,55,56,57,58,60,61,62,63,64,65,66,67,68,69,70,71,73,74,75,76,77,78],[56,63,64],[54,56,64,65],[55],[48,51,56],[56,60,64,65],[60],[54,56,59,123],[48,53,54,56,60,63],[82,112],[51,56,72,82,128,131],[44,193,204],[44,102,192],[44,102,192,198,203],[44,205,208],[44,206,207],[44],[44,209]],"referencedMap":[[214,1],[219,2],[45,3],[46,3],[81,4],[82,5],[83,6],[84,7],[85,8],[86,9],[87,10],[88,11],[89,12],[90,13],[91,13],[93,14],[92,15],[94,16],[95,17],[96,18],[80,19],[97,20],[98,21],[99,22],[131,23],[100,24],[101,25],[102,26],[103,27],[104,28],[105,29],[106,30],[107,31],[108,32],[109,33],[110,33],[111,34],[112,35],[114,36],[113,37],[115,38],[116,39],[117,40],[118,41],[119,42],[120,43],[121,44],[122,45],[123,46],[124,47],[125,48],[126,49],[127,50],[128,51],[129,52],[218,53],[216,54],[217,55],[147,56],[165,57],[174,58],[175,59],[134,60],[152,61],[178,62],[177,63],[179,64],[185,65],[191,66],[188,67],[186,68],[187,69],[189,70],[182,71],[190,72],[192,73],[170,74],[136,75],[146,76],[137,77],[138,77],[139,77],[140,77],[135,78],[145,79],[141,77],[142,77],[143,77],[144,77],[149,80],[164,81],[154,82],[155,83],[156,84],[157,85],[153,86],[148,75],[163,87],[159,88],[160,89],[158,90],[161,91],[162,92],[183,93],[184,94],[166,95],[167,96],[180,97],[181,98],[168,95],[169,99],[171,100],[173,101],[198,102],[196,103],[197,104],[215,105],[201,106],[199,107],[203,108],[200,107],[63,109],[70,110],[62,109],[77,111],[54,112],[53,113],[76,107],[71,114],[74,115],[56,116],[55,117],[51,118],[50,119],[73,120],[52,121],[57,122],[61,122],[79,123],[78,122],[65,124],[66,125],[68,126],[64,127],[67,128],[72,107],[59,129],[60,130],[69,131],[49,132],[75,133],[205,134],[193,135],[204,136],[209,137],[208,138],[206,139],[207,139],[210,140]],"exportedModulesMap":[[214,1],[219,2],[45,3],[46,3],[81,4],[82,5],[83,6],[84,7],[85,8],[86,9],[87,10],[88,11],[89,12],[90,13],[91,13],[93,14],[92,15],[94,16],[95,17],[96,18],[80,19],[97,20],[98,21],[99,22],[131,23],[100,24],[101,25],[102,26],[103,27],[104,28],[105,29],[106,30],[107,31],[108,32],[109,33],[110,33],[111,34],[112,35],[114,36],[113,37],[115,38],[116,39],[117,40],[118,41],[119,42],[120,43],[121,44],[122,45],[123,46],[124,47],[125,48],[126,49],[127,50],[128,51],[129,52],[218,53],[216,54],[217,55],[147,56],[165,57],[174,58],[175,59],[134,60],[152,61],[178,62],[177,63],[179,64],[185,65],[191,66],[188,67],[186,68],[187,69],[189,70],[182,71],[190,72],[192,73],[170,74],[136,75],[146,76],[137,77],[138,77],[139,77],[140,77],[135,78],[145,79],[141,77],[142,77],[143,77],[144,77],[149,80],[164,81],[154,82],[155,83],[156,84],[157,85],[153,86],[148,75],[163,87],[159,88],[160,89],[158,90],[161,91],[162,92],[183,93],[184,94],[166,95],[167,96],[180,97],[181,98],[168,95],[169,99],[171,100],[173,101],[198,102],[196,103],[197,104],[215,105],[201,106],[199,107],[203,108],[200,107],[63,109],[70,110],[62,109],[77,111],[54,112],[53,113],[76,107],[71,114],[74,115],[56,116],[55,117],[51,118],[50,119],[73,120],[52,121],[57,122],[61,122],[79,123],[78,122],[65,124],[66,125],[68,126],[64,127],[67,128],[72,107],[59,129],[60,130],[69,131],[49,132],[75,133],[205,134],[193,135],[204,136],[209,137],[208,138],[206,139],[207,139],[210,140]],"semanticDiagnosticsPerFile":[211,214,213,219,45,46,81,82,83,84,85,86,87,88,89,90,91,93,92,94,95,96,80,130,97,98,99,131,100,101,102,103,104,105,106,107,108,109,110,111,112,114,113,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,47,212,194,218,216,217,147,165,174,175,132,133,134,152,150,151,178,176,177,179,185,191,188,186,187,189,182,190,192,170,136,146,137,138,139,140,135,145,141,142,143,144,149,164,154,155,156,157,153,148,163,159,160,158,161,162,183,184,166,167,180,181,168,169,171,172,173,8,9,11,10,2,12,13,14,15,16,17,18,19,3,4,23,20,21,22,24,25,26,5,27,28,29,30,6,34,31,32,33,35,7,36,41,42,37,38,39,40,1,43,198,196,197,195,215,201,199,203,202,200,44,63,70,62,77,54,53,76,71,74,56,55,51,50,73,52,57,58,61,48,79,78,65,66,68,64,67,72,59,60,69,49,75,205,193,204,209,208,206,207,210]},"version":"4.9.5"}
1
+ {"program":{"fileNames":["../../../node_modules/lerna/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/lerna/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/tslib/tslib.d.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/assert/strict.d.ts","../../../node_modules/buffer/index.d.ts","../../../node_modules/undici-types/header.d.ts","../../../node_modules/undici-types/readable.d.ts","../../../node_modules/undici-types/file.d.ts","../../../node_modules/undici-types/fetch.d.ts","../../../node_modules/undici-types/formdata.d.ts","../../../node_modules/undici-types/connector.d.ts","../../../node_modules/undici-types/client.d.ts","../../../node_modules/undici-types/errors.d.ts","../../../node_modules/undici-types/dispatcher.d.ts","../../../node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/undici-types/global-origin.d.ts","../../../node_modules/undici-types/pool-stats.d.ts","../../../node_modules/undici-types/pool.d.ts","../../../node_modules/undici-types/handlers.d.ts","../../../node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/undici-types/agent.d.ts","../../../node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/undici-types/mock-agent.d.ts","../../../node_modules/undici-types/mock-client.d.ts","../../../node_modules/undici-types/mock-pool.d.ts","../../../node_modules/undici-types/mock-errors.d.ts","../../../node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/undici-types/api.d.ts","../../../node_modules/undici-types/cookies.d.ts","../../../node_modules/undici-types/patch.d.ts","../../../node_modules/undici-types/filereader.d.ts","../../../node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/undici-types/websocket.d.ts","../../../node_modules/undici-types/content-type.d.ts","../../../node_modules/undici-types/cache.d.ts","../../../node_modules/undici-types/interceptors.d.ts","../../../node_modules/undici-types/index.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/dns/promises.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/dom-events.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/readline/promises.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/stream/promises.d.ts","../../../node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/@types/node/stream/web.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/test.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/timers/promises.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/globals.global.d.ts","../../../node_modules/@types/node/index.d.ts","../../../node_modules/jsmodbus/dist/codes/errors.d.ts","../../../node_modules/jsmodbus/dist/codes/function-codes.d.ts","../../../node_modules/jsmodbus/dist/codes/index.d.ts","../../../node_modules/jsmodbus/dist/request/request-body.d.ts","../../../node_modules/jsmodbus/dist/request/exception.d.ts","../../../node_modules/jsmodbus/dist/request/read-coils.d.ts","../../../node_modules/jsmodbus/dist/request/read-discrete-inputs.d.ts","../../../node_modules/jsmodbus/dist/request/read-holding-registers.d.ts","../../../node_modules/jsmodbus/dist/request/read-input-registers.d.ts","../../../node_modules/jsmodbus/dist/request/write-multiple-coils.d.ts","../../../node_modules/jsmodbus/dist/request/write-multiple-registers.d.ts","../../../node_modules/jsmodbus/dist/request/write-single-coil.d.ts","../../../node_modules/jsmodbus/dist/request/write-single-register.d.ts","../../../node_modules/jsmodbus/dist/request/request-factory.d.ts","../../../node_modules/jsmodbus/dist/request/index.d.ts","../../../node_modules/jsmodbus/dist/abstract-request.d.ts","../../../node_modules/jsmodbus/dist/response/response-body.d.ts","../../../node_modules/jsmodbus/dist/response/exception.d.ts","../../../node_modules/jsmodbus/dist/constants/limits.d.ts","../../../node_modules/jsmodbus/dist/constants/primatives.d.ts","../../../node_modules/jsmodbus/dist/constants/index.d.ts","../../../node_modules/jsmodbus/dist/response/read-response-body.d.ts","../../../node_modules/jsmodbus/dist/response/read-coils.d.ts","../../../node_modules/jsmodbus/dist/response/read-discrete-inputs.d.ts","../../../node_modules/jsmodbus/dist/response/read-holding-registers.d.ts","../../../node_modules/jsmodbus/dist/response/read-input-registers.d.ts","../../../node_modules/jsmodbus/dist/response/write-response.body.d.ts","../../../node_modules/jsmodbus/dist/response/write-multiple-coils.d.ts","../../../node_modules/jsmodbus/dist/response/write-multiple-registers.d.ts","../../../node_modules/jsmodbus/dist/response/write-single-coil.d.ts","../../../node_modules/jsmodbus/dist/response/write-single-register.d.ts","../../../node_modules/jsmodbus/dist/response/response-factory.d.ts","../../../node_modules/jsmodbus/dist/response/index.d.ts","../../../node_modules/jsmodbus/dist/abstract-response.d.ts","../../../node_modules/jsmodbus/dist/rtu-request.d.ts","../../../node_modules/jsmodbus/dist/rtu-response.d.ts","../../../node_modules/jsmodbus/dist/tcp-request.d.ts","../../../node_modules/jsmodbus/dist/tcp-response.d.ts","../../../node_modules/jsmodbus/dist/request-response-map.d.ts","../../../node_modules/jsmodbus/dist/user-request-error.d.ts","../../../node_modules/jsmodbus/dist/user-request-metrics.d.ts","../../../node_modules/jsmodbus/dist/user-request.d.ts","../../../node_modules/jsmodbus/dist/client-request-handler.d.ts","../../../node_modules/jsmodbus/dist/client-response-handler.d.ts","../../../node_modules/jsmodbus/dist/errors/isinternalexception.d.ts","../../../node_modules/jsmodbus/dist/errors/isuserrequesterror.d.ts","../../../node_modules/jsmodbus/dist/errors/index.d.ts","../../../node_modules/jsmodbus/dist/modbus-client.d.ts","../../../node_modules/jsmodbus/dist/tcp-client-request-handler.d.ts","../../../node_modules/jsmodbus/dist/tcp-client-response-handler.d.ts","../../../node_modules/jsmodbus/dist/modbus-tcp-client.d.ts","../../../node_modules/jsmodbus/dist/rtu-client-request-handler.d.ts","../../../node_modules/jsmodbus/dist/rtu-client-response-handler.d.ts","../../../node_modules/jsmodbus/dist/modbus-rtu-client.d.ts","../../../node_modules/jsmodbus/dist/modbus-server-request-handler.d.ts","../../../node_modules/jsmodbus/dist/modbus-server-response-handler.d.ts","../../../node_modules/jsmodbus/dist/modbus-server-client.d.ts","../../../node_modules/jsmodbus/dist/modbus-server.d.ts","../../../node_modules/jsmodbus/dist/modbus-tcp-server.d.ts","../../../node_modules/jsmodbus/dist/modbus-rtu-server.d.ts","../../../node_modules/jsmodbus/dist/modbus.d.ts","../server/engine/connector/modbus-tcp-server.ts","../../../node_modules/eventemitter3/index.d.ts","../../../node_modules/p-queue/dist/queue.d.ts","../../../node_modules/p-queue/dist/options.d.ts","../../../node_modules/p-queue/dist/priority-queue.d.ts","../../../node_modules/p-queue/dist/index.d.ts","../../../node_modules/promise-readable/lib/promise-readable.d.ts","../../../node_modules/promise-writable/lib/promise-writable.d.ts","../../../node_modules/promise-duplex/lib/promise-duplex.d.ts","../../../node_modules/promise-socket/lib/timeout-error.d.ts","../../../node_modules/promise-socket/lib/promise-socket.d.ts","../server/engine/connector/modbus-tcp.ts","../server/engine/connector/index.ts","../server/engine/task/modbus-read.ts","../server/engine/task/modbus-write-single.ts","../server/engine/task/index.ts","../server/engine/index.ts","../server/index.ts","../../../node_modules/@jest/expect-utils/build/index.d.ts","../../../node_modules/chalk/index.d.ts","../../../node_modules/@sinclair/typebox/typebox.d.ts","../../../node_modules/@jest/schemas/build/index.d.ts","../../../node_modules/pretty-format/build/index.d.ts","../../../node_modules/jest-diff/build/index.d.ts","../../../node_modules/jest-matcher-utils/build/index.d.ts","../../../node_modules/expect/build/index.d.ts","../../../node_modules/@types/jest/index.d.ts"],"fileInfos":[{"version":"8730f4bf322026ff5229336391a18bcaa1f94d4f82416c8b2f3954e2ccaae2ba","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","4b421cbfb3a38a27c279dec1e9112c3d1da296f77a1a85ddadf7e7a425d45d18","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9",{"version":"3aafcb693fe5b5c3bd277bd4c3a617b53db474fe498fc5df067c5603b1eebde7","affectsGlobalScope":true},{"version":"f3d4da15233e593eacb3965cde7960f3fddf5878528d882bcedd5cbaba0193c7","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"5f406584aef28a331c36523df688ca3650288d14f39c5d2e555c95f0d2ff8f6f","affectsGlobalScope":true},{"version":"22f230e544b35349cfb3bd9110b6ef37b41c6d6c43c3314a31bd0d9652fcec72","affectsGlobalScope":true},{"version":"7ea0b55f6b315cf9ac2ad622b0a7813315bb6e97bf4bb3fbf8f8affbca7dc695","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"eb26de841c52236d8222f87e9e6a235332e0788af8c87a71e9e210314300410a","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"5e5e095c4470c8bab227dbbc61374878ecead104c74ab9960d3adcccfee23205","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"2768ef564cfc0689a1b76106c421a2909bdff0acbe87da010785adab80efdd5c","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true},"7a1971efcba559ea9002ada4c4e3c925004fb67a755300d53b5edf9399354900","efc7d584a33fe3422847783d228f315c4cd1afe74bd7cf8e3f0e4c1125129fef","7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","4967529644e391115ca5592184d4b63980569adf60ee685f968fd59ab1557188","5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","7180c03fd3cb6e22f911ce9ba0f8a7008b1a6ddbe88ccf16a9c8140ef9ac1686","25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","54cb85a47d760da1c13c00add10d26b5118280d44d58e6908d8e89abbd9d7725","3e4825171442666d31c845aeb47fcd34b62e14041bb353ae2b874285d78482aa","c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","a967bfe3ad4e62243eb604bf956101e4c740f5921277c60debaf325c1320bf88","e9775e97ac4877aebf963a0289c81abe76d1ec9a2a7778dbe637e5151f25c5f3","471e1da5a78350bc55ef8cef24eb3aca6174143c281b8b214ca2beda51f5e04a","cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","db3435f3525cd785bf21ec6769bf8da7e8a776be1a99e2e7efb5f244a2ef5fee","c3b170c45fc031db31f782e612adf7314b167e60439d304b49e704010e7bafe5","40383ebef22b943d503c6ce2cb2e060282936b952a01bea5f9f493d5fb487cc7","4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","3a84b7cb891141824bd00ef8a50b6a44596aded4075da937f180c90e362fe5f6","13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","33203609eba548914dc83ddf6cadbc0bcb6e8ef89f6d648ca0908ae887f9fcc5","0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","9f0a92164925aa37d4a5d9dd3e0134cff8177208dba55fd2310cd74beea40ee2","8bfdb79bf1a9d435ec48d9372dc93291161f152c0865b81fc0b2694aedb4578d","2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","d32275be3546f252e3ad33976caf8c5e842c09cb87d468cb40d5f4cf092d1acc","4a0c3504813a3289f7fb1115db13967c8e004aa8e4f8a9021b95285502221bd1",{"version":"cc5e65fb1729463665074b9d7163e78a4225b7af7f3a6b3c74492f415166612f","affectsGlobalScope":true},"cce1f5f86974c1e916ec4a8cab6eec9aa8e31e8148845bf07fbaa8e1d97b1a2c",{"version":"185282b122cbca820c297a02a57b89cf5967ab43e220e3e174d872d3f9a94d2c","affectsGlobalScope":true},"16d74fe4d8e183344d3beb15d48b123c5980ff32ff0cc8c3b96614ddcdf9b239","7b43160a49cf2c6082da0465876c4a0b164e160b81187caeb0a6ca7a281e85ba",{"version":"41fb2a1c108fbf46609ce5a451b7ec78eb9b5ada95fd5b94643e4b26397de0b3","affectsGlobalScope":true},"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb","e8968b394e4365588f8f89cfff86435258cf10062585c1d2224627ab92acda22","285e512c7a0db217a0599e18c462d565fa35be4a5153dd7b80bee88c83e83ddf","b5b719a47968cd61a6f83f437236bb6fe22a39223b6620da81ef89f5d7a78fb7","8806ae97308ef26363bd7ec8071bca4d07fb575f905ee3d8a91aff226df6d618","af5bf1db6f1804fb0069039ae77a05d60133c77a2158d9635ea27b6bb2828a8f","b7fe70be794e13d1b7940e318b8770cd1fb3eced7707805318a2e3aaac2c3e9e",{"version":"2c71199d1fc83bf17636ad5bf63a945633406b7b94887612bba4ef027c662b3e","affectsGlobalScope":true},{"version":"7ae9dc7dbb58cd843065639707815df85c044babaa0947116f97bdb824d07204","affectsGlobalScope":true},"7aae1df2053572c2cfc2089a77847aadbb38eedbaa837a846c6a49fb37c6e5bd","313a0b063f5188037db113509de1b934a0e286f14e9479af24fada241435e707","1f758340b027b18ae8773ac3d33a60648a2af49eaae9e4fde18d0a0dd608642c","87ef1a23caa071b07157c72077fa42b86d30568f9dc9e31eed24d5d14fc30ba8","396a8939b5e177542bdf9b5262b4eee85d29851b2d57681fa9d7eae30e225830","21773f5ac69ddf5a05636ba1f50b5239f4f2d27e4420db147fc2f76a5ae598ac",{"version":"dea4c00820d4fac5e530d4842aed2fb20d6744d75a674b95502cbd433f88bcb0","affectsGlobalScope":true},"a5fe4cc622c3bf8e09ababde5f4096ceac53163eefcd95e9cd53f062ff9bb67a","45b1053e691c5af9bfe85060a3e1542835f8d84a7e6e2e77ca305251eda0cb3c","0f05c06ff6196958d76b865ae17245b52d8fe01773626ac3c43214a2458ea7b7",{"version":"0d832a0650a74aafc276cb3f7bb26bde2e2270a6f87e6c871a64122e9203079b","affectsGlobalScope":true},{"version":"c6f3869f12bb5c3bb8ecd0b050ea20342b89b944eae18d313cde6b0ccc0925d7","affectsGlobalScope":true},"8abd0566d2854c4bd1c5e48e05df5c74927187f1541e6770001d9637ac41542e","d742ed2db6d5425b3b6ac5fb1f2e4b1ed2ae74fbeee8d0030d852121a4b05d2f","d8dba11dc34d50cb4202de5effa9a1b296d7a2f4a029eec871f894bddfb6430d","8b71dd18e7e63b6f991b511a201fad7c3bf8d1e0dd98acb5e3d844f335a73634","01d8e1419c84affad359cc240b2b551fb9812b450b4d3d456b64cda8102d4f60","8221b00f271cf7f535a8eeec03b0f80f0929c7a16116e2d2df089b41066de69b","269929a24b2816343a178008ac9ae9248304d92a8ba8e233055e0ed6dbe6ef71","93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","f8c87b19eae111f8720b0345ab301af8d81add39621b63614dfc2d15fd6f140a","831c22d257717bf2cbb03afe9c4bcffc5ccb8a2074344d4238bf16d3a857bb12",{"version":"2225100373ca3d63bcc7f206e1177152d2e2161285a0bd83c8374db1503a0d1f","affectsGlobalScope":true},{"version":"7052b7b0c3829df3b4985bab2fd74531074b4835d5a7b263b75c82f0916ad62f","affectsGlobalScope":true},"aa34c3aa493d1c699601027c441b9664547c3024f9dbab1639df7701d63d18fa","eefcdf86cefff36e5d87de36a3638ab5f7d16c2b68932be4a72c14bb924e43c1","7c651f8dce91a927ab62925e73f190763574c46098f2b11fb8ddc1b147a6709a","7440ab60f4cb031812940cc38166b8bb6fbf2540cfe599f87c41c08011f0c1df",{"version":"4d0405568cf6e0ff36a4861c4a77e641366feaefa751600b0a4d12a5e8f730a8","affectsGlobalScope":true},{"version":"f5b5dc128973498b75f52b1b8c2d5f8629869104899733ae485100c2309b4c12","affectsGlobalScope":true},"e393915d3dc385e69c0e2390739c87b2d296a610662eb0b1cb85224e55992250","79bad8541d5779c85e82a9fb119c1fe06af77a71cc40f869d62ad379473d4b75","4a34b074b11c3597fb2ff890bc8f1484375b3b80793ab01f974534808d5777c7",{"version":"629d20681ca284d9e38c0a019f647108f5fe02f9c59ac164d56f5694fc3faf4d","affectsGlobalScope":true},"e7dbf5716d76846c7522e910896c5747b6df1abd538fee8f5291bdc843461795",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"b510d0a18e3db42ac9765d26711083ec1e8b4e21caaca6dc4d25ae6e8623f447","d341cf78be6ddf3702405df97b1ada55718825221443eca107c8c5262a410744","55507316c7f090b48815e5975c1742b90935256d00a3573bd01e61642b566e46","6d9f2fd149fd07a4fff8d96976b545272173e993e8c034d838f9f298a43dfa23","ec4adb61037d4e7af78a8191aea712b82a0da52e6e8c98a938026943a3405000","3be27b6ca8e0c417f9194a0a08becbfa850ab7407aaf1ae453a17caf9e753e93","315bd7394eba279a3c42ab2a6c91ce6dea192fb0f9c01d876f4aa472ba8c3dd0","b0c84b3be3d1121685150c8311fbef852ca328cdd8c137aa2e04280fa38700af","d32254175184593ec6a3a6a3af277006d8cab37a63c0f2a6e0b985623d696c47","07d55442d36e1e2682c2aea486c24ef672882a803ff16570bfa76e2d782e7f1b","0248ee8a20faa3049386f7037ce1b369489646a86082af005c3608fec723cbcd","3b4c89dbe40653b29312d6508f3fc339f4ba07d396a07f6b0213af089a3a1fef","3343502059a603461171d480b5fdcd00d0bd79c100a7dba6ed64607ae2e0541f","d20d31b2177c3e18b4f13008b6464db57ac01da4635d354a4f343ec479e83cec","dd08ef4d2f2b21c353a4b119162363075bdf525a8c42031dc5a12b8f8982f334","8d122f18a4fe983ce731dc2de0c1badf5cef24d2464a9c83728804cfc2cf2bfa","68c2bf94e774be4d78e8f88bd337483af426b94379ee814b3c9d3ff9db76c662","425a50b3aad9fb608045554a9790d433c82c5762d5d3107f90297479f4cae4b0","9765a728b1aedb5c055bc04018ba4e8ec3ba237e38c4cdae1a43eb8e00b60150","8c4f222c4e8532b187756a8a3e4c6768a85cc7747ead7c0bcba9d835e0db27e2","661d285cffbd287601ec74d3123280c7ab4cff5b64b291a829602c7a74238f46","7b4ef81f018ff73404f7957a09292e46625676b7f90a24779140d995f0fc1996","ee2597631ece383cb2137d7db852b61ddc519cf4d62195f8b05ea328eb5de291","ad1cffefd62ad90ecc6fdca4c45c3e1b651c3d3f2af0cc8cd0d0705807876db1","54c9d33db8f452d31cbd268a00599705d40d8bbfa930eb1e3a734bbbaf6f9289","061f78cfad4951a6b00e51d9552e6a8248e5efded6db690c16abeb5a7840476f","b3604d94f7c819f0cdbc7964c2aaf1ff1dcbe58bc4099f56e5d95b4c9bc0a2ad","9ab64fa98e2ce5804713f478253c2e05da7cc61ca3636f453d1916c5a9a006af","b595135e2833fe1fa18c85fd5bf15938d114b540e15e609ac82daf010acbb77e","eb0f7c7c13509a4cd339483a13814fa6d3f27190ed8bc12eda68c82b17291232","a6295abc2db5e548c49bf8b3519fa5d0516b4e9c001c343891afc4447224bc16","880b7399179a3f2a755c853ccc18a8088a377609fb07b9de0194dcc204b95397","d567ce37963a59afe6217d1f4d69f03b23e76382706503daa2e81bf3aad34ada","86d09191e3d4c1946ed1289044a1aa67d8ccc623dd50b2593372bfb06f439c06","7f429a77b327587b2679f1d5ab47ad0d2a56472c209c840cc910d9997c9e6468","b01ccfb857e5f9b294a525a5c577581f9b5d1719ba3d0b41957fdef38df09e06","780ff541f5b032f99f439a6bd5a647f30a485d8d8f84c91a71a5f0728cf35883","63d784d76184a2f0fcd10aac46b8ecda19360711e07c4115a5eef9c938bf5e47","8c238329820cd24ca6ebe000f325a4db4e441b71ab1a56cbe8c7ef4ac56c868a","14a9a761300da79b6272afe526798f5816720c1c23b7ae02cf0564fbb08f5935","724ebcde24be6588f93057cf9f2c1a69f7ecc32d34d95a29ab442459ea2597ba","94c95a55dae3403cfdcf2cae4fa737f9bcc3faa42624208c3b6e4397bf273af6","5d65049c55bbcb5c9bf938a5a2b5461ad247659a36ba14584a07c69ecd655ddc","a4a806bbc0a706fb420de3da9c57073d96cd4744d0c2ac61989e2b438bed687e","09ef511b8c654a5d8cb4bc37d2d014a5ea52a1a813878dd9f813062f07050c8e","81b237718c602ef449151290a52140bf51536c09671dd9850a6d0433fa997d11","7f58bd3a0e390c92841e1bfcfb20da8ca7ca6e00c4042ce93665d682cee8eae6","91df55b139dab5b4ac8d602ff5264fd2bac42404bbfc727c8e70ed8baacf871a","6c9f57d6fdf407da27dd9e66e00b49ac0524d50730a147818f3c875e855437f0","73068c893ad2f4a4d12785bee0f887633339415948afc311ce80de3f043c2289","bbc0e15f6d673c1411e348059728bc61f079bc05557008d9dbdb1f83d8416b69","e7c2d8afe351059eb987a9ca22c5791aca23b1ccbb6b26eb00a1f5b2087bfe4d","e8db959db880e69654640f10480ff64be82577bb43e5a87c5db26fd8e2870a62","15b252763a1a9be7ca89f0e64dc1e20ea38250fd3abf6d2a6cf630ab958515df","93cddd037f298f3dded3fc131e2365b36d0968901a0e89482b8f88767a0f439b","df75b0df95576e85da2f262cc62f36b48918976b78ac070eb92326dac0a02d7f","1945680a65134c526609f114a893a13e8a315d7cd7d2535cdc4aed941834dced","033fd6c57b7a1dd510b91adead859149e45a6933b90712df2befbc1b6933b005","c9e8e79f6e8a6f94cca6b22c56cbaf395189b0047c716a1776f2aec58dacdebd","128447b768da362b98723ba741ada2f43c3b6568f82d02b0b9ec5e40134ece97","a4f9142af4bf7fcc2ccfc99542d65446f24c7732753223f707b83504b6b0aeca","b118145683a2238729c3eefcb3de7daf8f4c868e3da480ba28afded67d5c3fe2","a4ab3fee7b65f5cd1460b1027313c0aa6a3b194d4e36c79ab0f44ad8fdf96fbd","b80c780c52524beb13488942543972c8b0e54400e8b59cee0169f38d0fabb968","a0a118c9a66853bb5ec086c878963b5d178ecb3eec72d75dc553d86adef67801","4bbf82fc081be97a72c494d1055e4f62ad743957cdc52b5a597b49d262ae5fd4","4583bf6ebd196f0c7e9aa26bfe5dfee09ea69eee63c2e97448518ea5ee17bc64","2b16288372f6367cdb13e77cbd0e667d5af3034a5b733a0daa98a111cfee227f","23d8cc7a06506dac48b821ebff451b061367e9f1b79b1b296d4b53ace65f202e","bf438026a849e316dd2d4e197bc0fc10798e0cd21fe5a1912287660143f9e708","32903e7a7491fea192f1568fb2f9bbbf3281044e716e11a718b2f5dab1bbf126","b5802b9e18c5b496489713b651c9f7da089ffc751403a82481978ef4ff1d8c2d","97bbf1e8aa018c332f3a1e742625b9c4aebded25a93ae914f8e3a4b009e2fb2a","c23a3c81550a2254dfc187a276dcd3f26a195013340c054b59e1c097a5cedfe3","346871eebbc08b8ebf3472f66dbf39af1eb81f49d5eb21b4b7a72eb850abbccc","0076c12f995da0d10e145a65c7e01e811ec7e18ef20c53f0b059e4392897859f","7064eec55b340aa14653f5f359ff7dac35ca19c7662e1593d73cf47b4ce0ef4e","8b2b2c2b072f5b0bd065f1eb58ff7ce10da79e44a27bfa4fd85a82019f8145ff","8547694bbf35e324d5bb64215ae218ab372807c759be08f9ce27a8adfc9af9fb","336b6d64b4cff6c2e09100b496e9870743d9c8005e718c18e6200bce7ec2975c","cdcc132f207d097d7d3aa75615ab9a2e71d6a478162dde8b67f88ea19f3e54de","0d14fa22c41fdc7277e6f71473b20ebc07f40f00e38875142335d5b63cdfc9d2","c085e9aa62d1ae1375794c1fb927a445fa105fed891a7e24edbb1c3300f7384a","f315e1e65a1f80992f0509e84e4ae2df15ecd9ef73df975f7c98813b71e4c8da","5b9586e9b0b6322e5bfbd2c29bd3b8e21ab9d871f82346cb71020e3d84bae73e","3e70a7e67c2cb16f8cd49097360c0309fe9d1e3210ff9222e9dac1f8df9d4fb6","ab68d2a3e3e8767c3fba8f80de099a1cfc18c0de79e42cb02ae66e22dfe14a66","d96cc6598148bf1a98fb2e8dcf01c63a4b3558bdaec6ef35e087fd0562eb40ec",{"version":"46894b2a21a60f8449ca6b2b7223b7179bba846a61b1434bed77b34b2902c306","affectsGlobalScope":true}],"options":{"allowSyntheticDefaultImports":true,"declaration":false,"emitDecoratorMetadata":true,"esModuleInterop":true,"experimentalDecorators":true,"importHelpers":true,"inlineSources":true,"module":1,"noEmitOnError":true,"noImplicitAny":false,"outDir":"./","skipLibCheck":true,"sourceMap":true,"strict":false,"target":4,"useDefineForClassFields":false},"fileIdsList":[[213],[215,218],[45],[81],[82,87,115],[83,94,95,102,112,123],[83,84,94,102],[85,124],[86,87,95,103],[87,112,120],[88,90,94,102],[89],[90,91],[94],[92,94],[81,94],[94,95,96,112,123],[94,95,96,109,112,115],[79,82,128],[90,94,97,102,112,123],[94,95,97,98,102,112,120,123],[97,99,112,120,123],[45,46,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130],[94,100],[101,123,128],[90,94,102,112],[103],[104],[81,105],[106,122,128],[107],[108],[94,109,110],[109,111,124,126],[82,94,112,113,114,115],[82,112,114],[112,113],[115],[116],[81,112],[94,118,119],[118,119],[87,102,112,120],[121],[102,122],[82,97,108,123],[87,124],[112,125],[101,126],[127],[82,87,94,96,105,112,123,126,128],[112,129],[211,217],[215],[212,216],[131,146],[131,146,147,164],[112,131,146,147,165,170,171,173],[131,165],[132,133],[150,151],[136,149,176,177],[171],[112,131,146,147,170,173,174,175,178],[166,179,183,184],[189],[112,131,147,165,186,187,189],[131,146,147],[131,147,164,165,189],[94,102,131,147,152,188],[102,131,168,179,180,181],[102,131,189],[134,146,147,164,165,168,169,170,171,172,173,174,175,178,179,182,185,190,191],[146,147,164,165,166,167,168,169],[131,134,135],[135,136,137,138,139,140,141,142,143,144,145],[131,135],[131,134],[131,136,137,138,139,140,141,142,143,144],[131,134,136,148],[148,149,154,155,156,157,159,160,161,162,163],[131,137,152,153],[131,138,152,153],[131,139,153],[131,140,153],[131,134,148,152],[131,149,154,155,156,157,159,160,161,162],[131,141,158],[131,142,158],[148],[131,143,158],[131,144,158],[135,166,167,173,174],[131,148,167,175],[131,135,136,137,138,139,140,141,142,143,144,147],[131,146,148,149,154,155,156,157,159,160,161,162,165,166],[102,131,135,168,169,173,174],[131,169,175],[131,146,148,149,154,155,156,157,159,160,161,162,165,168],[165],[131,147,166,168,170,171,172],[194,195,196,197],[195],[195,196],[214],[112,131,199,200],[131],[102,131,201,202],[56,60,123],[56,112,123],[51],[53,56,120,123],[102,120],[51,131],[53,56,102,123],[48,49,52,55,82,94,112,123],[48,54],[52,56,82,115,123,131],[82,131],[72,82,131],[50,51,131],[56],[50,51,52,53,54,55,56,57,58,60,61,62,63,64,65,66,67,68,69,70,71,73,74,75,76,77,78],[56,63,64],[54,56,64,65],[55],[48,51,56],[56,60,64,65],[60],[54,56,59,123],[48,53,54,56,60,63],[82,112],[51,56,72,82,128,131],[44,193,204],[44,102,192],[44,102,192,198,203],[44,205,208],[44,206,207],[44],[44,209]],"referencedMap":[[214,1],[219,2],[45,3],[46,3],[81,4],[82,5],[83,6],[84,7],[85,8],[86,9],[87,10],[88,11],[89,12],[90,13],[91,13],[93,14],[92,15],[94,16],[95,17],[96,18],[80,19],[97,20],[98,21],[99,22],[131,23],[100,24],[101,25],[102,26],[103,27],[104,28],[105,29],[106,30],[107,31],[108,32],[109,33],[110,33],[111,34],[112,35],[114,36],[113,37],[115,38],[116,39],[117,40],[118,41],[119,42],[120,43],[121,44],[122,45],[123,46],[124,47],[125,48],[126,49],[127,50],[128,51],[129,52],[218,53],[216,54],[217,55],[147,56],[165,57],[174,58],[175,59],[134,60],[152,61],[178,62],[177,63],[179,64],[185,65],[191,66],[188,67],[186,68],[187,69],[189,70],[182,71],[190,72],[192,73],[170,74],[136,75],[146,76],[137,77],[138,77],[139,77],[140,77],[135,78],[145,79],[141,77],[142,77],[143,77],[144,77],[149,80],[164,81],[154,82],[155,83],[156,84],[157,85],[153,86],[148,75],[163,87],[159,88],[160,89],[158,90],[161,91],[162,92],[183,93],[184,94],[166,95],[167,96],[180,97],[181,98],[168,95],[169,99],[171,100],[173,101],[198,102],[196,103],[197,104],[215,105],[201,106],[199,107],[203,108],[200,107],[63,109],[70,110],[62,109],[77,111],[54,112],[53,113],[76,107],[71,114],[74,115],[56,116],[55,117],[51,118],[50,119],[73,120],[52,121],[57,122],[61,122],[79,123],[78,122],[65,124],[66,125],[68,126],[64,127],[67,128],[72,107],[59,129],[60,130],[69,131],[49,132],[75,133],[205,134],[193,135],[204,136],[209,137],[208,138],[206,139],[207,139],[210,140]],"exportedModulesMap":[[214,1],[219,2],[45,3],[46,3],[81,4],[82,5],[83,6],[84,7],[85,8],[86,9],[87,10],[88,11],[89,12],[90,13],[91,13],[93,14],[92,15],[94,16],[95,17],[96,18],[80,19],[97,20],[98,21],[99,22],[131,23],[100,24],[101,25],[102,26],[103,27],[104,28],[105,29],[106,30],[107,31],[108,32],[109,33],[110,33],[111,34],[112,35],[114,36],[113,37],[115,38],[116,39],[117,40],[118,41],[119,42],[120,43],[121,44],[122,45],[123,46],[124,47],[125,48],[126,49],[127,50],[128,51],[129,52],[218,53],[216,54],[217,55],[147,56],[165,57],[174,58],[175,59],[134,60],[152,61],[178,62],[177,63],[179,64],[185,65],[191,66],[188,67],[186,68],[187,69],[189,70],[182,71],[190,72],[192,73],[170,74],[136,75],[146,76],[137,77],[138,77],[139,77],[140,77],[135,78],[145,79],[141,77],[142,77],[143,77],[144,77],[149,80],[164,81],[154,82],[155,83],[156,84],[157,85],[153,86],[148,75],[163,87],[159,88],[160,89],[158,90],[161,91],[162,92],[183,93],[184,94],[166,95],[167,96],[180,97],[181,98],[168,95],[169,99],[171,100],[173,101],[198,102],[196,103],[197,104],[215,105],[201,106],[199,107],[203,108],[200,107],[63,109],[70,110],[62,109],[77,111],[54,112],[53,113],[76,107],[71,114],[74,115],[56,116],[55,117],[51,118],[50,119],[73,120],[52,121],[57,122],[61,122],[79,123],[78,122],[65,124],[66,125],[68,126],[64,127],[67,128],[72,107],[59,129],[60,130],[69,131],[49,132],[75,133],[205,134],[193,135],[204,136],[209,137],[208,138],[206,139],[207,139],[210,140]],"semanticDiagnosticsPerFile":[211,214,213,219,45,46,81,82,83,84,85,86,87,88,89,90,91,93,92,94,95,96,80,130,97,98,99,131,100,101,102,103,104,105,106,107,108,109,110,111,112,114,113,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,47,212,194,218,216,217,147,165,174,175,132,133,134,152,150,151,178,176,177,179,185,191,188,186,187,189,182,190,192,170,136,146,137,138,139,140,135,145,141,142,143,144,149,164,154,155,156,157,153,148,163,159,160,158,161,162,183,184,166,167,180,181,168,169,171,172,173,8,9,11,10,2,12,13,14,15,16,17,18,19,3,4,23,20,21,22,24,25,26,5,27,28,29,30,6,34,31,32,33,35,7,36,41,42,37,38,39,40,1,43,198,196,197,195,215,201,199,203,202,200,44,63,70,62,77,54,53,76,71,74,56,55,51,50,73,52,57,58,61,48,79,78,65,66,68,64,67,72,59,60,69,49,75,205,193,204,209,208,206,207,210]},"version":"4.9.5"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/integration-modbus",
3
- "version": "6.2.65",
3
+ "version": "6.2.70",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -23,11 +23,11 @@
23
23
  "clean": "npm run clean:server"
24
24
  },
25
25
  "dependencies": {
26
- "@things-factory/integration-base": "^6.2.65",
26
+ "@things-factory/integration-base": "^6.2.70",
27
27
  "jsmodbus": "^4.0.2",
28
28
  "p-queue": "^6.4.0",
29
29
  "promise-socket": "^7.0.0",
30
30
  "serialport": "^9.0.2"
31
31
  },
32
- "gitHead": "320f62ab586b0c7058e7879f3e6592c960ae97bc"
32
+ "gitHead": "99c274f281e62be08a952c10cb3b8fdecba24a65"
33
33
  }
@@ -37,24 +37,32 @@ export class ModbusTCPConnector implements Connector {
37
37
  /*
38
38
  try to keep connecting if keepalive is true
39
39
  */
40
+ var clientIdx = 1
40
41
  var connected: boolean = false
42
+ var looped: boolean = true
41
43
  while (true) {
42
44
  var clientSocket = new Socket()
43
45
  clientSocket = new Socket()
44
46
  var promiseSocket = new PromiseSocket(clientSocket)
45
47
 
46
- var client = new modbus.client.TCP(clientSocket, 5, 10000)
48
+ var client = new modbus.client.TCP(clientSocket, clientIdx++, 10000)
47
49
 
48
50
  clientSocket.on('error', async ex => {
49
51
  debug(ex)
50
52
  ConnectionManager.logger.error(`modbus tcp connection error: ${ex}`)
51
53
  })
52
54
 
55
+ clientSocket.on('close', async () => {
56
+ debug(`modbus tcp connection closed`)
57
+ if (keepalive && !looped) {
58
+ await this.disconnect(connection)
59
+ await this.connect(connection)
60
+ }
61
+ })
62
+
53
63
  debug(`connecting to ${connection.endpoint}...`)
54
- let isConnectionInstance: boolean = ConnectionManager.getConnectionInstances(connection.domain).hasOwnProperty(
55
- connection.name
56
- )
57
64
 
65
+ looped = true
58
66
  await promiseSocket
59
67
  .connect(port, host)
60
68
  .then(() => {
@@ -65,7 +73,8 @@ export class ModbusTCPConnector implements Connector {
65
73
  })
66
74
 
67
75
  // if the current connections have the connection with the same name, the current try should be stopped.
68
- if (!keepalive || connected || isConnectionInstance) {
76
+ if (!keepalive || connected) {
77
+ looped = false
69
78
  break
70
79
  }
71
80
 
@@ -73,106 +82,50 @@ export class ModbusTCPConnector implements Connector {
73
82
  }
74
83
 
75
84
  var queue = new PQueue({ concurrency: 1 })
76
-
77
- if (!this.checkConnectionInstance(connection.domain, connection.name)) {
78
- throw new Error(`remove a previously invalid connection(${connection.name})`)
79
- }
80
-
81
85
  ConnectionManager.addConnectionInstance(connection, {
82
- client,
83
- readModBus: async function (client, objectType, address, quantity, { logger }) {
86
+ readModBus: async function (objectType, address, quantity, { logger }) {
84
87
  return await queue.add(async () => {
85
- while (true) {
86
- try {
87
- var response
88
-
89
- switch (objectType) {
90
- case 'descrete input':
91
- response = await client.readDiscreteInputs(address, quantity)
92
- break
93
- case 'input register':
94
- response = await client.readInputRegisters(address, quantity)
95
- break
96
- case 'holding register':
97
- response = await client.readHoldingRegisters(address, quantity)
98
- break
99
- default:
100
- response = await client.readCoils(address, quantity)
101
- }
102
-
103
- var data = response && response.response._body.valuesAsArray.slice(0, quantity)
104
- logger.info(`${JSON.stringify(data)}`)
105
- return {
106
- data
107
- }
108
- } catch (e) {
109
- debug('readModBus command failed - ', e)
110
-
111
- debug(`connections: ${JSON.stringify(ConnectionManager.getConnectionInstances(connection.domain))}`)
112
- if (keepalive) {
113
- debug('[readModBus] reconnecting...')
114
- promiseSocket && promiseSocket.destroy()
115
- clientSocket = new Socket()
116
- promiseSocket = new PromiseSocket(clientSocket)
117
- client = new modbus.client.TCP(clientSocket)
118
- clientSocket.on('error', async ex => {
119
- debug(`modbus tcp connection error: ${ex}`)
120
- ConnectionManager.logger.error(`modbus tcp connection error: ${ex}`)
121
- })
122
- await promiseSocket.connect(port, host).catch(ex => {
123
- debug(`${connection.name} can't connect to ${connection.endpoint}`)
124
- })
125
- await sleep(1000)
126
- } else {
127
- debug(`[readModBus] ${e}`)
128
- throw e
129
- }
130
- }
88
+ var response
89
+
90
+ switch (objectType) {
91
+ case 'descrete input':
92
+ response = await client.readDiscreteInputs(address, quantity)
93
+ break
94
+ case 'input register':
95
+ response = await client.readInputRegisters(address, quantity)
96
+ break
97
+ case 'holding register':
98
+ response = await client.readHoldingRegisters(address, quantity)
99
+ break
100
+ default:
101
+ response = await client.readCoils(address, quantity)
102
+ }
103
+
104
+ var data = response && response.response._body.valuesAsArray.slice(0, quantity)
105
+ logger.info(`${JSON.stringify(data)}`)
106
+ return {
107
+ data
131
108
  }
132
109
  })
133
110
  },
134
- writeSingleModBus: async function (client, objectType, address, value, { logger }) {
111
+ writeSingleModBus: async function (objectType, address, value, { logger }) {
135
112
  return await queue.add(async () => {
136
- while (true) {
137
- try {
138
- var response
139
-
140
- switch (objectType) {
141
- case 'holding register':
142
- await client.writeSingleRegister(address, parseInt(value))
143
- response = await client.readHoldingRegisters(address, 1)
144
- break
145
- default:
146
- await client.writeSingleCoil(address, !!Number(value))
147
- response = await client.readCoils(address, 1)
148
- }
149
-
150
- var data = response && response.response._body.valuesAsArray[0]
151
- logger.info(data)
152
- return {
153
- data
154
- }
155
- } catch (e) {
156
- debug('writeSingleModBus command failed - ', e)
157
- if (keepalive) {
158
- debug('[writeSingleModBus] reconnecting...')
159
- promiseSocket && promiseSocket.destroy()
160
- clientSocket = new Socket()
161
- promiseSocket = new PromiseSocket(clientSocket)
162
- client = new modbus.client.TCP(clientSocket)
163
- clientSocket.on('error', async ex => {
164
- debug(`modbus tcp connection error: ${ex}`)
165
- ConnectionManager.logger.error(`modbus tcp connection error: ${ex}`)
166
- })
167
- await promiseSocket.connect(port, host).catch(ex => {
168
- debug(`${connection.name} can't connect to ${connection.endpoint}`)
169
- })
170
- await sleep(1000)
171
- } else {
172
- debug(`[writeSingleModBus] ${e}`)
173
- throw e
174
- }
175
- }
113
+ var response
114
+
115
+ switch (objectType) {
116
+ case 'holding register':
117
+ await client.writeSingleRegister(address, parseInt(value))
118
+ response = await client.readHoldingRegisters(address, 1)
119
+ break
120
+ default:
121
+ await client.writeSingleCoil(address, !!Number(value))
122
+ response = await client.readCoils(address, 1)
123
+ }
124
+
125
+ var data = response && response.response._body.valuesAsArray[0]
126
+ logger.info(data)
127
+ return {
128
+ data
176
129
  }
177
130
  })
178
131
  },
@@ -21,8 +21,8 @@ async function modbusRead(step, { logger, domain, data }) {
21
21
  throw new Error(`invalid number address : ${address}`)
22
22
  }
23
23
 
24
- var { client, readModBus } = connectionInstance
25
- var content = await readModBus(client, objectType, address, quantity, { logger })
24
+ var { readModBus } = connectionInstance
25
+ var content = await readModBus(objectType, address, quantity, { logger })
26
26
  debug(`result : ${JSON.stringify(content)}`)
27
27
  return content
28
28
  }
@@ -27,8 +27,8 @@ async function modbusWriteSingle(step, { logger, domain, data }) {
27
27
  throw new Error(`invalid number value : ${value}`)
28
28
  }
29
29
 
30
- var { client, writeSingleModBus } = connectionInstance
31
- var content = await writeSingleModBus(client, objectType, address, value, { logger })
30
+ var { writeSingleModBus } = connectionInstance
31
+ var content = await writeSingleModBus(objectType, address, value, { logger })
32
32
  return content
33
33
  }
34
34