docs: fix doc links

This commit is contained in:
Francis Gulotta 2018-09-09 05:20:47 -04:00
parent 4318c25383
commit 1b3c76768c
9 changed files with 27 additions and 19 deletions

View file

@ -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.

View file

@ -5,9 +5,13 @@
[![Build status](https://ci.appveyor.com/api/projects/status/u6xe3iao2crd7akn/branch/master?svg=true)](https://ci.appveyor.com/project/serialport/node-serialport/branch/master)
[![Greenkeeper badge](https://badges.greenkeeper.io/node-serialport/node-serialport.svg)](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) [![npm](https://img.shields.io/npm/dm/serialport.svg?maxAge=2592000)](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` [![npm](https://img.shields.io/npm/dm/serialport.svg?maxAge=2592000)](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

View file

@ -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)
```

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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