hdlc

1.0.5 • Public • Published

HDLC

Simple HDLC library using NodeJS.

Installation

$ npm install HDLC

Usage

import HDLC

import { HDLC } from "hdlc";
const hdlc = new HDLC();

Initialize

hdlc.init(sendbyte);
hdlc.eventEmitter.on('newFrame', router);

function sendbyte(data) {
  console.log(data);
}

function router(frame) {
  console.log(frame);
}

To send

hdlc.sendFrame(messageBytes);

To receive

hdlc.byteReceiver(messageFrame);

/hdlc/

    Package Sidebar

    Install

    npm i hdlc

    Weekly Downloads

    15

    Version

    1.0.5

    License

    ISC

    Unpacked Size

    11 kB

    Total Files

    5

    Last publish

    Collaborators

    • saw-