Constructor
new ByteLengthParser(options)
- Source:
Example
To use the `ByteLength` parser:
```js
const SerialPort = require('serialport');
const ByteLength = SerialPort.parsers.ByteLength
const port = new SerialPort('/dev/tty-usbserial1');
const parser = port.pipe(new ByteLength({length: 8}));
parser.on('data', console.log); // will have 8 bytes per data event
```
Parameters:
| Name | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
options |
Object |
Properties
|
Extends
- Transform