modbus-webserial 0.10.0 → 0.10.1

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.
package/dist/index.d.ts CHANGED
@@ -61,6 +61,7 @@ declare class ModbusRTU {
61
61
  getID(): number;
62
62
  setTimeout(ms: number): void;
63
63
  getTimeout(): number;
64
+ getPort(): SerialPort;
64
65
  /** FC 01 – coils */
65
66
  readCoils(addr: number, qty: number): Promise<ReadCoilResult>;
66
67
  /** FC 02 – discrete inputs */
package/dist/index.js CHANGED
@@ -54,6 +54,9 @@ var WebSerialTransport = class _WebSerialTransport {
54
54
  getTimeout() {
55
55
  return this.timeout;
56
56
  }
57
+ getPort() {
58
+ return this.port;
59
+ }
57
60
  // ----------------------------------------------------------------
58
61
  // Factory
59
62
  // ----------------------------------------------------------------
@@ -504,6 +507,9 @@ var ModbusRTU = class _ModbusRTU {
504
507
  getTimeout() {
505
508
  return this.transport.getTimeout();
506
509
  }
510
+ getPort() {
511
+ return this.transport.getPort();
512
+ }
507
513
  /* ========================= READ =============================== */
508
514
  /** FC 01 – coils */
509
515
  async readCoils(addr, qty) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "modbus-webserial",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
4
4
  "description": "Tiny TypeScript library for speaking Modbus-RTU from the browser via Web Serial",
5
5
  "type": "module",
6
6
  "author": "Antti Kotajärvi <antti.kotajarvi@hotmail.com>",