Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

modbus-serial

Package Overview
Dependencies
Maintainers
1
Versions
123
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

modbus-serial - npm Package Compare versions

Comparing version 3.2.4 to 3.2.5

2

package.json
{
"name": "modbus-serial",
"version": "3.2.4",
"version": "3.2.5",
"description": "A pure JavaScript implemetation of MODBUS-RTU (and TCP) for NodeJS.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -202,5 +202,5 @@ # modbus-serial

##### .setID(id)
Sets the unit id
Sets the unit id
###### id
*id {number}:*
The new client id

@@ -210,8 +210,8 @@

##### .readCoils (address, length)
Writes "Read Coils" (FC=1) request to serial port.
Writes "Read Coils" (FC=1) request to serial port.
###### address
*address {number}:*
The Data Address of the first register.
###### length
*length {number}:*
The total number of registers requested.

@@ -221,8 +221,8 @@

##### .readDiscreteInputs (address, length)
Writes "Read Discrete Inputs" (FC=2) request to serial port.
Writes "Read Discrete Inputs" (FC=2) request to serial port.
###### address
*address {number}:*
The Data Address of the first register.
###### length
*length {number}:*
The total number of registers requested.

@@ -232,8 +232,8 @@

##### .readHoldingRegisters (address, length)
Writes "Read Holding Registers" (FC=3) request to serial port.
Writes "Read Holding Registers" (FC=3) request to serial port.
###### address
*address {number}:*
The Data Address of the first register.
###### length
*length {number}:*
The total number of registers requested.

@@ -243,8 +243,8 @@

##### .readInputRegisters (address, length)
Writes "Read Input Registers" (FC=4) request to serial port.
Writes "Read Input Registers" (FC=4) request to serial port.
###### address
*address {number}:*
The Data Address of the first register.
###### length
*length {number}:*
The total number of registers requested.

@@ -254,8 +254,8 @@

##### .writeCoil(address, state)
Writes "Force Coil Status" (FC=5) request to serial port.
Writes "Force Coil Status" (FC=5) request to serial port.
###### address
The Data Address of the coil.
*address {number}:*
The Data Address of the first register.
###### state
*state {boolean}:*
The state to force into coil.

@@ -265,8 +265,8 @@

##### .writeRegisters (address, array)
Writes "Preset Multiple Registers" (FC=16) request to serial port.
Writes "Preset Multiple Registers" (FC=16) request to serial port.
###### address
*address {number}:*
The Data Address of the first register.
###### array
*array {array}:*
The array of values to set into the registers.

@@ -294,5 +294,5 @@

##### .open(callback)
Opens a modbus connection using the given serial port.
Opens a modbus connection using the given serial port.
###### callback (optional)
*callback {function}:* (optional)
Called when a connection has been opened.

@@ -302,14 +302,14 @@

##### .writeFC1 (unit, address, length, callback)
Writes "Read coil status" (FC=01) request to serial port.
Writes "Read coil status" (FC=01) request to serial port.
###### unit
*unit {number}:*
The slave unit address.
###### address
The Data Address of the first coil.
*address {number}:*
The Data Address of the first register.
###### length
The total number of coils requested.
*length {number}:*
The total number of registers requested.
###### callback (optional)
*callback {function}:* (optional)
Called once the unit returns an answer. The callback should be a function

@@ -326,14 +326,14 @@ that looks like: function (error, data) { ... }

##### .writeFC2 (unit, address, length, callback)
Writes "Read input status" (FC=02) request to serial port.
Writes "Read input status" (FC=02) request to serial port.
###### unit
*unit {number}:*
The slave unit address.
###### address
The Data Address of the first digital input.
*address {number}:*
The Data Address of the first register.
###### length
The total number of digital inputs requested.
*length {number}:*
The total number of registers requested.
###### callback (optional)
*callback {function}:* (optional)
Called once the unit returns an answer. The callback should be a function

@@ -350,14 +350,14 @@ that looks like: function (error, data) { ... }

##### .writeFC3 (unit, address, length, callback)
Writes "Read Holding Registers" (FC=03) request to serial port.
Writes "Read Holding Registers" (FC=03) request to serial port.
###### unit
*unit {number}:*
The slave unit address.
###### address
*address {number}:*
The Data Address of the first register.
###### length
*length {number}:*
The total number of registers requested.
###### callback (optional)
*callback {function}:* (optional)
Called once the unit returns an answer. The callback should be a function

@@ -374,14 +374,14 @@ that looks like: function (error, data) { ... }

##### .writeFC4 (unit, address, length, callback)
Writes "Read Input Registers" (FC=04) request to serial port.
Writes "Read Input Registers" (FC=04) request to serial port.
###### unit
*unit {number}:*
The slave unit address.
###### address
*address {number}:*
The Data Address of the first register.
###### length
*length {number}:*
The total number of registers requested.
###### callback (optional)
*callback {function}:* (optional)
Called once the unit returns an answer. The callback should be a function

@@ -398,14 +398,14 @@ that looks like: function (error, data) { ... }

##### .writeFC5 (unit, address, state, callback)
Writes "Force Single Coil" (FC=05) request to serial port.
Writes "Force Single Coil" (FC=05) request to serial port.
###### unit
*unit {number}:*
The slave unit address.
###### address
The Data Address of the coil.
*address {number}:*
The Data Address of the first register.
###### state
The state to set into the coil (true / false).
*state {boolean}:*
The coil state.
###### callback (optional)
*callback {function}:* (optional)
Called once the unit returns an answer. The callback should be a function

@@ -416,14 +416,14 @@ that looks like: function (error, data) { ... }

##### .writeFC16 (unit, address, array, callback)
Writes "Preset Multiple Registers" (FC=16) request to serial port.
Writes "Preset Multiple Registers" (FC=16) request to serial port.
###### unit
*unit {number}:*
The slave unit address.
###### address
*address {number}:*
The Data Address of the first register.
###### array
The array of values to set into the registers.
*array {array}:*
The array of values to sent to unit.
###### callback (optional)
*callback {function}:* (optional)
Called once the unit returns an answer. The callback should be a function

@@ -479,11 +479,11 @@ that looks like: function (error, data) { ... }

##### .connectRTU (path, options, callback)
Connect using serial port.
Connect using serial port.
###### path
*path {string}:*
The port path (e.g. "/dev/ttyS0")
###### options (optional)
*options {object}:* (optional)
The options for this connection.
###### callback (optional)
*callback {function}:* (optional)
Called once the client is connected.

@@ -493,11 +493,11 @@

##### .connectTCP (ip, options, callback)
Connect using tcp/ip.
Connect using tcp/ip.
###### ip
*ip {string}:*
The port ip (e.g. "24.230.1.42")
###### options (optional)
*options {object}:* (optional)
The options for this connection.
###### callback (optional)
*callback {function}:* (optional)
Called once the client is connected.

@@ -507,11 +507,11 @@

##### .connectTelnet (ip, options, callback)
Connect using a telnet server
Connect using a telnet server
###### ip
*ip {string}:*
The port ip (e.g. "24.230.1.42")
###### options (optional)
*options {object}:* (optional)
The options for this connection.
###### callback (optional)
*callback {function}:* (optional)
Called once the client is connected.
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc