feat(devicemanager): add selector-based device APIs, selectFeature helper, convenience discovery methods, and ESCL scan completion fallback

This commit is contained in:
2026-01-09 17:18:48 +00:00
parent d72ea96ec5
commit 82a99cdfb8
6 changed files with 224 additions and 6 deletions

View File

@@ -371,6 +371,37 @@ export type TNetworkScannerEvents = {
'cancelled': () => void;
};
// ============================================================================
// Device Selector Interface
// ============================================================================
import type { TFeatureType } from './feature.interfaces.js';
/**
* Criteria for selecting devices from the manager.
* Identity selectors (id, address) match exactly.
* Attribute selectors (name, model, manufacturer) match partially (case-insensitive).
* Capability selectors filter by feature availability.
*/
export interface IDeviceSelector {
/** Exact match on device ID */
id?: string;
/** Exact match on IP address */
address?: string;
/** Partial match on device name (case-insensitive) */
name?: string;
/** Partial match on device model (case-insensitive) */
model?: string;
/** Partial match on manufacturer name (case-insensitive) */
manufacturer?: string;
/** Device must have this feature */
hasFeature?: TFeatureType;
/** Device must have ALL of these features */
hasFeatures?: TFeatureType[];
/** Device must have ANY of these features */
hasAnyFeature?: TFeatureType[];
}
// ============================================================================
// Feature Types (Universal Device Architecture)
// ============================================================================