@blackmagic-controller/node
Version:
An npm module for interfacing with the Blackmagic usb/bluetooth controllers in node
28 lines • 1.15 kB
TypeScript
import type { DeviceModelId, HIDDevice, HIDDeviceEvents, HIDDeviceInfo } from '@blackmagic-controller/core';
import { EventEmitter } from 'eventemitter3';
import type { HIDAsync } from 'node-hid';
/**
* Information about a found controller
*/
export interface BlackmagicControllerDeviceInfo {
/** The model of the device */
model: DeviceModelId;
/** The connected path of the device in the usb tree */
path: string;
/** The serialNumber of the device. If set it can be used as a unique hardware identifier */
serialNumber?: string;
}
/**
* The wrapped node-hid HIDDevice.
* This translates it into the common format expected by @blackmagic-controller/core
*/
export declare class NodeHIDDevice extends EventEmitter<HIDDeviceEvents> implements HIDDevice {
private device;
constructor(device: HIDAsync);
close(): Promise<void>;
sendFeatureReport(data: Uint8Array): Promise<void>;
getFeatureReport(reportId: number, reportLength: number): Promise<Uint8Array>;
sendReports(buffers: Uint8Array[]): Promise<void>;
getDeviceInfo(): Promise<HIDDeviceInfo>;
}
//# sourceMappingURL=hid-device.d.ts.map