import * as Messages from "../core/Messages"; import { DeviceOutputCommand } from "./ButtplugClientDeviceCommand"; import { EventEmitter } from 'eventemitter3'; import type { ButtplugClientDevice } from './ButtplugClientDevice'; import { ButtplugClientInputReading } from './ButtplugClientInputReading'; export type ButtplugClientDeviceFeatureValueRange = readonly [ min: number, max: number ]; export interface ButtplugClientDeviceFeatureOutput { readonly type: Messages.OutputType; readonly valueRange: ButtplugClientDeviceFeatureValueRange; readonly durationRange?: ButtplugClientDeviceFeatureValueRange; } export interface ButtplugClientDeviceFeatureInput { readonly type: Messages.InputType; readonly valueRange: ButtplugClientDeviceFeatureValueRange; readonly commands: readonly Messages.InputCommandType[]; } export interface IButtplugClientDeviceFeature extends EventEmitter { readonly index: number; readonly descriptor: string; readonly featureDescriptor: string; readonly outputs: ReadonlyMap; readonly inputs: ReadonlyMap; output(type: Messages.OutputType): ButtplugClientDeviceFeatureOutput | undefined; input(type: Messages.InputType): ButtplugClientDeviceFeatureInput | undefined; hasOutput(type: Messages.OutputType): boolean; hasInput(type: Messages.InputType): boolean; runOutput(cmd: DeviceOutputCommand): Promise; runInput(inputType: Messages.InputType, inputCommand: Messages.InputCommandType): Promise; } export declare class ButtplugClientDeviceFeature extends EventEmitter implements IButtplugClientDeviceFeature { private _device; private _feature; private _sendClosure; constructor(_device: ButtplugClientDevice, _feature: Messages.DeviceFeature, _sendClosure: (msg: Messages.ButtplugMessage) => Promise); protected send: (msg: Messages.ButtplugMessage) => Promise; protected sendMsgExpectOk: (msg: Messages.ButtplugMessage) => Promise; protected isOutputValid(type: Messages.OutputType): void; protected isInputValid(type: Messages.InputType): void; private valueRange; private createOutputInfo; private createInputInfo; protected sendOutputCmd(command: DeviceOutputCommand): Promise; get index(): number; get descriptor(): string; get featureDescriptor(): string; get outputs(): ReadonlyMap; get inputs(): ReadonlyMap; output(type: Messages.OutputType): ButtplugClientDeviceFeatureOutput | undefined; input(type: Messages.InputType): ButtplugClientDeviceFeatureInput | undefined; inputReadingsFromMessage(inputReading: Messages.InputReading): ButtplugClientInputReading[]; emitInputReading(inputReading: Messages.InputReading): ButtplugClientInputReading[]; hasOutput(type: Messages.OutputType): boolean; hasInput(type: Messages.InputType): boolean; runOutput(cmd: DeviceOutputCommand): Promise; runInput(inputType: Messages.InputType, inputCommand: Messages.InputCommandType): Promise; }