swarms
Version:
The ultimate node.js library for controlling Bitcraze Crazyflie 2.0 drones
28 lines (27 loc) • 748 B
TypeScript
/// <reference types="node" />
/**
* @file Wrappers around the node-usb stuff to be a node.js stream
*/
import { Readable, Writable } from 'stream';
import * as usb from 'usb';
export declare class InStream extends Readable {
private endpoint;
polling: boolean;
/**
* Stream from dongle --> PC
*/
constructor(endpoint: usb.InEndpoint);
_read(size: number): void;
private onData(chunk);
private onError(err);
private onEnd();
}
export declare class OutStream extends Writable {
private endpoint;
/**
* Stream from PC --> dongle
*/
constructor(endpoint: usb.OutEndpoint);
_write(chunk: Buffer, encoding: string, callback: (err?: Error) => void): void;
private onError(err);
}