dualsense-ts
Version:
The natural interface for your DualSense and DualSense Access controllers, with Typescript
38 lines • 1.55 kB
TypeScript
import type { HID } from "node-hid";
import { AccessHIDProvider, AccessHIDState } from "./access_hid_provider";
export interface AccessNodeHIDProviderOptions {
/** Connect only to the device at this specific path */
devicePath?: string;
/** Prefer the device with this serial number */
serialNumber?: string;
}
/** Information about an available DualSense Access device */
export interface AccessDeviceInfo {
/** Unique device path (platform-specific) */
path: string;
/** Hardware serial number, if available */
serialNumber?: string;
/** Whether the device is connected wirelessly */
wireless: boolean;
}
export declare class AccessNodeHIDProvider extends AccessHIDProvider {
device?: HID;
wireless?: boolean;
buffer?: Buffer;
private connecting;
/** Target device path — mutable so the manager can update it */
targetPath?: string;
/** Target serial number — stable identifier for reconnection */
targetSerial?: string;
constructor(options?: AccessNodeHIDProviderOptions);
/** List all available DualSense Access controllers */
static enumerate(): Promise<AccessDeviceInfo[]>;
connect(): Promise<void>;
write(data: Uint8Array): Promise<void>;
readFeatureReport(reportId: number, length: number): Promise<Uint8Array>;
sendFeatureReport(_reportId: number, data: Uint8Array): Promise<void>;
get connected(): boolean;
disconnect(): void;
process(buffer: Buffer): AccessHIDState;
}
//# sourceMappingURL=access_node_hid_provider.d.ts.map