@elgato-stream-deck/tcp
Version:
An npm module for interfacing with select Elgato Stream Deck devices in node over tcp
22 lines • 1.19 kB
TypeScript
import * as EventEmitter from 'events';
import { type HIDDeviceInfo, type HIDDeviceEvents, type ChildHIDDeviceInfo, type StreamDeckTcpChildDeviceInfo } from '@elgato-stream-deck/core';
import { type SocketWrapper } from '../socketWrapper.js';
import type { TcpHidDevice } from './api.js';
/**
* A HIDDevice implementation for cora based TCP connections
* This isn't really HID, but it fits the existing structure well enough
* Note: this gets destroyed when the socket is closed, so we can rely on this for resetting the state
*/
export declare class TcpCoraHidDevice extends EventEmitter<HIDDeviceEvents> implements TcpHidDevice {
#private;
get isPrimary(): boolean;
set onChildInfoChange(cb: ((info: Omit<StreamDeckTcpChildDeviceInfo, 'model'> | null) => void) | null);
constructor(socket: SocketWrapper);
close(): Promise<void>;
sendFeatureReport(data: Uint8Array): Promise<void>;
getFeatureReport(reportId: number, _reportLength: number): Promise<Uint8Array>;
sendReports(buffers: Buffer[]): Promise<void>;
getDeviceInfo(): Promise<HIDDeviceInfo>;
getChildDeviceInfo(): Promise<ChildHIDDeviceInfo | null>;
}
//# sourceMappingURL=cora.d.ts.map