common-port-helper

1.1.5 • Public • Published

Unified serial port processing function

安装

npm i common-port-helper

使用方法

import bindPortListen from "common-port-helper";
// 串口数据监听
// this.bindMainBoardPortListen() 注释掉老的
bindPortListen({
    listener: this.$mainRenderer, // 监听者
    listenPort: 'port1-data', // 监听的端口
    handlePortData: this.handleMainPortData, // 处理回调
    errorCallback: this.$log.save // 保存错误日志
})

Readme

Keywords

Package Sidebar

Install

npm i common-port-helper

Weekly Downloads

1

Version

1.1.5

License

ISC

Unpacked Size

10.9 kB

Total Files

4

Last publish

Collaborators

  • sxcai