import { Service } from "../device-wrapper.js"; import { PinValue, TypedServiceEvent, TypedServiceEventDispatcher } from "../../service-events.js"; export declare class IoPinService implements Service { private deviceId; private dispatchTypedEvent; uuid: string; constructor(deviceId: string, dispatchTypedEvent: TypedServiceEventDispatcher); getRelevantEvents(): TypedServiceEvent[]; /** * Gets which pins are configured as analog. * All other pins are digital (the default). * * @returns array of pin numbers (0-18) configured as analog. */ getAnalogPins(): Promise; /** * Sets which pins are configured as analog. * All other pins become digital (the default). * * @param pins array of pin numbers (0-18) to configure as analog. */ setAnalogPins(pins: number[]): Promise; /** * Gets which pins are configured as inputs. * Input pins are monitored by the service and their values reported * via notifications and reads of the pin data characteristic. * All other pins are outputs (the default). * * @returns array of pin numbers (0-18) configured as inputs. */ getInputPins(): Promise; /** * Sets which pins are configured as inputs. * Input pins are monitored by the service and their values reported * via notifications and reads of the pin data characteristic. * All other pins become outputs (the default). * * @param pins array of pin numbers (0-18) to configure as inputs. */ setInputPins(pins: number[]): Promise; /** * Reads pin data for all active input pins. * For digital pins, value is 0 or 1. * For analog pins, value is 0-255 (10-bit analog value >> 2). */ readPins(): Promise; /** * Writes pin data for output pins. * Only pins configured as outputs (not active inputs) will be affected. * For digital pins, value is 0 or 1. * For analog pins, value 0-255 is scaled to 0-1023 on the device. */ writePins(data: PinValue[]): Promise; /** * Sets PWM output on a pin. * * @param pin Pin number (0-18). * @param value Analog value (0-1024). * @param period Period in microseconds. */ setPwm(pin: number, value: number, period: number): Promise; startNotifications(type: TypedServiceEvent): Promise; stopNotifications(type: TypedServiceEvent): Promise; private dataViewToPinData; }