mirror of
https://github.com/siemens-mobile-hacks/node-serialport-bindings-cpp.git
synced 2026-11-25 18:37:19 +00:00
18 lines
411 B
Markdown
18 lines
411 B
Markdown
---
|
|
id: api-parser-cctalk
|
|
title: ccTalk Parser
|
|
---
|
|
```js
|
|
new CCTalk()
|
|
```
|
|
A transform stream that emits [ccTalk](https://en.wikipedia.org/wiki/CcTalk) packets as they are received.
|
|
|
|
## Example
|
|
```js
|
|
const SerialPort = require('serialport')
|
|
const CCTalk = require('@serialport/parser-cctalk')
|
|
const port = new SerialPort('/dev/ttyUSB0')
|
|
|
|
const parser = port.pipe(new CCtalk())
|
|
parser.on('data', console.log)
|
|
```
|