matterbridge-roborock-vacuum-plugin
Version:
Matterbridge Roborock Vacuum Plugin
63 lines • 1.91 kB
TypeScript
import { Device } from '../roborockCommunication/models/index.js';
import { RoborockVacuumCleaner } from '../types/roborockVacuumCleaner.js';
/**
* Registry for managing robot vacuum devices.
* Provides centralized storage and lookup for Device and RoborockVacuumCleaner instances.
*/
export declare class DeviceRegistry {
private readonly robots;
private readonly devices;
/**
* Register a device and its associated robot vacuum cleaner.
*/
register(device: Device, robot: RoborockVacuumCleaner): void;
registerRobot(robot: RoborockVacuumCleaner): void;
/**
* Register a device only (without robot).
* Used during device discovery before robot is created.
*/
registerDevice(device: Device): void;
/**
* Unregister a device and its robot by serial number.
*/
unregister(duid: string): void;
/**
* Get a robot by serial number.
*/
getRobot(duid: string): RoborockVacuumCleaner | undefined;
/**
* Get a device by serial number.
*/
getDevice(duid: string): Device | undefined;
/**
* Get all registered robots.
*/
getAllRobots(): RoborockVacuumCleaner[];
/**
* Get all registered devices.
*/
getAllDevices(): Device[];
/**
* Get the number of registered devices.
*/
get size(): number;
/**
* Check if there are any registered devices.
*/
hasDevices(): boolean;
/**
* Clear all registered devices and robots.
*/
clear(): void;
/**
* Iterate over all robot entries.
*/
robotEntries(): IterableIterator<[string, RoborockVacuumCleaner]>;
/**
* Iterate over all device entries.
*/
deviceEntries(): IterableIterator<[string, Device]>;
get robotsMap(): Map<string, RoborockVacuumCleaner>;
get devicesMap(): Map<string, Device>;
}
//# sourceMappingURL=deviceRegistry.d.ts.map