IMLLocalDeviceMgr Class Reference
| Inherits from | NSObject | 
|---|---|
| Declared in | IMLLocalDeviceMgr.h | 
– startDiscovery:
	启动发现设备流程,包括本地发现的设备以及云端待配网设备
- (void)startDiscovery:(void ( ^ ) ( NSArray *devices , NSError *err ))didFoundBlockParameters
didFoundBlock | 
						发现设备时的回调,会调用多次  | 
					
|---|
Discussion
启动发现设备流程,包括本地发现的设备以及云端待配网设备
Declared In
IMLLocalDeviceMgr.h
– startDiscoveryWithFilter:discoverBlcok:
	启动发现设备流程,包括本地发现的设备以及根据过滤条件获取到的云端待配网设备
- (void)startDiscoveryWithFilter:(NSDictionary *)filterParams discoverBlcok:(void ( ^ ) ( NSArray *devices , NSError *err ))didFoundBlockParameters
filterParams | 
						请求云端待配网设备的过滤条件  | 
					
|---|---|
didFoundBlock | 
						发现设备时的回调,会调用多次  | 
					
Discussion
启动发现设备流程,包括本地发现的设备以及根据过滤条件获取到的云端待配网设备
Declared In
IMLLocalDeviceMgr.h
– getLanDevices
	获取所有发现的设备:包括待配网、已配网待绑定、已绑定
- (NSArray<IMLCandDeviceModel*> *)getLanDevicesReturn Value
设备列表,参见 ‘LKLANDeviceModel’
Discussion
获取所有发现的设备:包括待配网、已配网待绑定、已绑定
Declared In
IMLLocalDeviceMgr.h
– getDeviceToken:deviceName:timeout:resultBlock:
	获取已配网设备的token,用于设备绑定
- (void)getDeviceToken:(NSString *)productKey deviceName:(NSString *)deviceName timeout:(NSUInteger)timeout resultBlock:(void ( ^ ) ( NSString *token , BOOL boolSuccess ))resultBlockParameters
productKey | 
						产品类型  | 
					
|---|---|
deviceName | 
						设备名称  | 
					
timeout | 
						请求token超时时间  | 
					
resultBlock | 
						请求结果回调block  | 
					
Discussion
获取已配网设备的token,用于设备绑定
Declared In
IMLLocalDeviceMgr.h
– getDeviceToken:deviceName:timeout:interval:resultBlock:
	轮询获取已配网设备的token,用于设备绑定
- (void)getDeviceToken:(NSString *)productKey deviceName:(NSString *)deviceName timeout:(NSUInteger)timeout interval:(NSUInteger)interval resultBlock:(void ( ^ ) ( NSString *token , BOOL boolSuccess ))resultBlockParameters
productKey | 
						产品类型  | 
					
|---|---|
deviceName | 
						设备名称  | 
					
timeout | 
						获取 token 的超时时间,单位秒。  | 
					
interval | 
						interval字段,每多少秒执行一次查询请求。 interval 为0 即不轮询  | 
					
resultBlock | 
						请求结果回调block  | 
					
Discussion
轮询获取已配网设备的token,用于设备绑定
Declared In
IMLLocalDeviceMgr.h
– stopGetDeviceToken
	停止获取Token
- (void)stopGetDeviceTokenDiscussion
停止获取Token
Declared In
IMLLocalDeviceMgr.h