You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -299,6 +298,7 @@ Enjoy and do cool things with this code.
299
298
| Name | Type | Description |
300
299
| --- | --- | --- |
301
300
| path | <code>string</code> | The system path or name of the serial port. Read Only. |
301
+
| isOpen | <code>boolean</code> | true if the port is open, false otherwise. Read Only. |
302
302
303
303
304
304
-
@@ -351,15 +351,6 @@ Changes the baud rate for an open port. Throws if you provide a bad argument. Em
351
351
|[callback]| <code>[errorCallback](#module_serialport--SerialPort..errorCallback)</code> | Called once the port's baud rate has been changed. If `.update` is called without an callback and there is an error, an error event will be emitted. |
Copy file name to clipboardExpand all lines: lib/serialport.js
+17-18Lines changed: 17 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -90,6 +90,7 @@ var defaultSetFlags = {
90
90
* @param {module:serialport~errorCallback=} openCallback - Called when a connection has been opened. If this is not provided and an error occurs, it will be emitted on the ports `error` event. The callback will NOT be called if autoOpen is set to false in the openOptions as the open will not be performed.
91
91
* @throws {TypeError} When given invalid arguments a TypeError will be thrown.
92
92
* @property {string} path The system path or name of the serial port. Read Only.
93
+
* @property {boolean} isOpen true if the port is open, false otherwise. Read Only.
93
94
* @emits module:serialport#open
94
95
* @emits module:serialport#data
95
96
* @emits module:serialport#close
@@ -121,6 +122,12 @@ function SerialPort(path, options, callback) {
* @param {module:serialport~errorCallback=} [callback] Called once the port's baud rate has been changed. If `.update` is called without an callback and there is an error, an error event will be emitted.
* @param {(string|array|buffer)} data Accepts a [`Buffer` ](http://nodejs.org/api/buffer.html) object, or a type that is accepted by the `Buffer` constructor (ex. an array of bytes or a string).
* @description Some devices like the Arduino reset when you open a connection to them. In these cases if you immediately write to the device they wont be ready to receive the data. This is often worked around by having the Arduino send a "ready" byte that your node program waits for before writing. You can also often get away with waiting around 400ms.
"docs-diff": "jsdoc2md -t .docs/README.hbs --partial .docs/sig-name.hbs --partial .docs/sig-link.hbs -r table --separators --name-format lib/* | diff README.md - || (echo 'Docs out of date, run `npm run docs` and commit the new README.md' && false)",
91
+
"docs:diff": "jsdoc2md -t .docs/README.hbs --partial .docs/sig-name.hbs --partial .docs/sig-link.hbs -r table --separators --name-format lib/* | diff README.md - || (echo 'Docs out of date, run `npm run docs` and commit the new README.md' && false)",
0 commit comments