mirror of
https://github.com/siemens-mobile-hacks/node-serialport-bindings-cpp.git
synced 2026-11-26 02:47:17 +00:00
docs: fix doc links
This commit is contained in:
parent
4318c25383
commit
1b3c76768c
9 changed files with 27 additions and 19 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
This is a node SerialPort project! This package does some neat stuff.
|
||||
|
||||
- [Guides and API Docs](https://node-serialport.github.io/node-serialport)
|
||||
- [Guides and API Docs](https://serialport.io/)
|
||||
|
||||
This is why you'd use it.
|
||||
|
||||
|
|
|
|||
13
README.md
13
README.md
|
|
@ -5,9 +5,13 @@
|
|||
[](https://ci.appveyor.com/project/serialport/node-serialport/branch/master)
|
||||
[](https://greenkeeper.io/)
|
||||
|
||||
Working with serialports can be hard, this is a collection of projects that make it easier. We currently have the following packages.
|
||||
Working with serialports can be hard, this is a collection of projects that make it easier.
|
||||
|
||||
- [`serialport`](/packages/serialport) [](http://npmjs.com/package/serialport) the only package you need to get started.
|
||||
Goto https://serialport.io/ to learn more.
|
||||
|
||||
We currently have the following packages.
|
||||
|
||||
- `serialport` [](http://npmjs.com/package/serialport) the only package you need to get started.
|
||||
- `@serialport/stream` our traditional stream interface with nothing else
|
||||
- `@serialport/binding-abstract` as an abstract class for all bindings
|
||||
- `@serialport/binding-mock` for a mock binding package
|
||||
|
|
@ -20,7 +24,7 @@ Working with serialports can be hard, this is a collection of projects that make
|
|||
- Parser slip-encoder
|
||||
|
||||
## Quick Answers to Important Questions
|
||||
- [**API Docs**](https://node-serialport.github.io/node-serialport/)
|
||||
- [**API Docs**](https://serialport.io/docs/api-overview)
|
||||
|
||||
## Intro to Node-Serialport
|
||||
|
||||
|
|
@ -32,7 +36,8 @@ For a full breakdown of why we made Node-Serialport, please read [NodeBots - The
|
|||
|
||||
## API Documentation
|
||||
|
||||
- [**API Docs**](https://node-serialport.github.io/node-serialport/)
|
||||
- [**API Docs**](https://serialport.io/docs/api-overview)
|
||||
|
||||
|
||||
You can generate the docs by running
|
||||
|
||||
|
|
|
|||
|
|
@ -2,23 +2,26 @@
|
|||
id: api-parser-slip-encoder
|
||||
title: Slip Encoder Parser
|
||||
---
|
||||
```typescript
|
||||
new SlipEncoder(options)
|
||||
```
|
||||
|
||||
A transform stream that emits SLIP-encoded data for each incoming packet. Unlike most parsers this one is useful for processing input to the serialport instead of output.
|
||||
|
||||
Runs in O(n) time, adding a 0xC0 character at the end of each received packet and escaping characters, according to RFC 1055. Adds another
|
||||
0xC0 character at the beginning if the `bluetoothQuirk` option is truthy (as
|
||||
per the Bluetooth Core Specification 4.0, Volume 4, Part D, Chapter 3 "SLIP Layer").
|
||||
Runs in O(n) time.
|
||||
Runs in O(n) time, adding a 0xC0 character at the end of each received packet and escaping characters, according to RFC 1055. Runs in O(n) time.
|
||||
|
||||
Arguments:
|
||||
- `options.bluetoothQuirk: boolean` Adds another 0xC0 character at the beginning if the `bluetoothQuirk` option is truthy (as per the Bluetooth Core Specification 4.0, Volume 4, Part D, Chapter 3 "SLIP Layer")
|
||||
|
||||
```js
|
||||
// Read lines from a text file, then SLIP-encode each and send them to a serial port
|
||||
const SerialPort = require('serialport')
|
||||
const SlipEncoder = require('@serialport/parser-slip-encoder')
|
||||
const Readline = require('parser-readline')
|
||||
const fileReader = require('fs').createReadStream('/tmp/some-file.txt');
|
||||
const fileReader = require('fs').createReadStream('/tmp/some-file.txt')
|
||||
|
||||
const port = new SerialPort('/dev/tty-usbserial1')
|
||||
const lineParser = fileReader.pipe(new Readline({ delimiter: '\r\n' }));
|
||||
const encoder = fileReader.pipe(new SlipEncoder({ bluetoothQuirk: false }));
|
||||
encoder.pipe(port);
|
||||
const lineParser = fileReader.pipe(new Readline({ delimiter: '\r\n' }))
|
||||
const encoder = fileReader.pipe(new SlipEncoder({ bluetoothQuirk: false }))
|
||||
encoder.pipe(port)
|
||||
```
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
See our api docs https://node-serialport.github.io/node-serialport/ByteLengthParser.html
|
||||
See our api docs https://serialport.io/docs/api-parser-byte-length
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
See our api docs https://node-serialport.github.io/node-serialport/DelimiterParser.html
|
||||
See our api docs https://serialport.io/docs/api-parser-delimiter
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
See our api docs https://node-serialport.github.io/node-serialport/ReadLineParser.html
|
||||
See our api docs See our api docs https://serialport.io/docs/api-parser-readline
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
See our api docs https://node-serialport.github.io/node-serialport/ReadyParser.html
|
||||
See our api docs https://serialport.io/docs/api-parser-ready
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
See our api docs https://node-serialport.github.io/node-serialport/RegexParser.html
|
||||
See our api docs https://serialport.io/docs/api-parser-regex
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
See our api docs https://node-serialport.github.io/node-serialport/SlipEncoderParser.html
|
||||
See our api docs https://serialport.io/docs/api-parser-slip-encoder
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue