feat(devicemanager): add selector-based device APIs, selectFeature helper, convenience discovery methods, and ESCL scan completion fallback
This commit is contained in:
@@ -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)
|
||||
// ============================================================================
|
||||
|
||||
Reference in New Issue
Block a user