import { Observable } from 'rxjs/Observable'; import { DevicesService } from '../resources/devices.service'; import { DatabaseService } from '../storage/database.service'; import { WebSocketsService } from '../websockets/websockets.service'; import { IWebSocketDeviceMessage } from '../websockets/websocket-device-message.interface'; import { PluginFactoryService } from '../plugins/plugin-factory.service'; import { SmartenitPlugin } from '../plugins/smartenit-plugin'; import { Model } from '../common/model'; import { DeviceReferenceService } from '../common/device-reference.service'; export declare class DeviceModel extends Model { protected devicesService: DevicesService; protected dbService: DatabaseService; webSocketsService: WebSocketsService; protected pluginFactory: PluginFactoryService; private deviceReferenceService; private _plugins; private _type; private _model; private _processors; private _loading; private _online; private _cachedData; private _onlineTimeout; private _ownerId; private _parents; private _state; private _image; private static _requests; private static _totalRequestCount; private _deviceRequests; private firstRequest; private queueInterval; private deviceSocketSubscription; private DOORLOCK_DELAY; private SECOND; image: any; readonly processors: any; readonly model: string; meta: any; settings: any; readonly type: string; readonly plugins: any; readonly account: any; readonly domain: any; readonly interfaces: any; readonly hwId: boolean; loading: boolean; readonly online: boolean; cached: boolean; readonly ownerId: string; readonly parents: any; private _onDeviceData; readonly onDeviceData: Observable; private _onDeviceOnlineState; readonly onDeviceOnlineState: Observable; private _onDeviceResponse; readonly onDeviceResponse: Observable; private _onDeviceStateChanged; readonly onDeviceStateChanged: Observable; readonly supportsDRLC: boolean; protected static getPluginKey(componentId: string, processorName: string): string; rediscover(): Observable; constructor(data: any, devicesService: DevicesService, dbService: DatabaseService, webSocketsService: WebSocketsService, pluginFactory: PluginFactoryService, deviceReferenceService: DeviceReferenceService); loadBasicInfo(deviceInstance: DeviceModel, data: any): void; loadPluginsAndProcessors(deviceInstance: DeviceModel, data: any): void; getPlugin(componentId: string, processorName: string): SmartenitPlugin | null; getStatus(componentId: string, processorName: string, payload?: any, query?: string, sendDirect?: boolean): void; private innerExecuteMethod(componentId, processorName, method, payload?, requestStatus?, statusPayload?, query?, getStatusDelay?); private drainQueue(); private drainRequest(request, key); private addToQueue(componentId, processorName, method, payload?, requestStatus?, payloadStatus?, query?, sendDirect?, getStatusDelay?); executeMethod(componentId: string, processorName: string, method: string, payload?: any, requestStatus?: boolean, payloadStatus?: any, query?: string, sendDirect?: boolean, getStatusDelay?: number): void; getAttribute(componentId: string, processorName: string, attribute: string, payload?: any, query?: string): Observable; setAttribute(componentId: string, processorName: string, attribute: string, value: any, readAttribute?: boolean, readAttributeDelay?: number): Observable; getProcessor(name: string): any; getProcessors(name: string): any[]; getComponent(id: string): any; isChildrenOf(id: string, hwId: string): any; isReady(): boolean; private startOfflineTimeout(); private clearOfflineTimeout(); clearResources(): void; getAttributeReport(componentId: string, processorName: string, attribute: string, payload?: any, query?: string): Observable; setAttributeReport(componentId: string, processorName: string, attribute: string, value: any, readAttributeReport?: boolean, readAttributeDelay?: number): Observable; }