|
void | setCacheHandlerQueue: (dispatch_queue_t queue) |
|
void | reset () |
|
ThingSmartDeviceModel * | getDeviceInfoWithDevId: (NSString *devId) |
|
void | addDeviceModel: (ThingSmartDeviceModel *deviceModel) |
|
void | addDeviceModel:completion: (ThingSmartDeviceModel *deviceModel,[completion] nullable void(^ completion)(ThingSmartDeviceModel *device)) |
|
void | addDeviceModelList: (NSArray< ThingSmartDeviceModel * > *deviceModelList) |
|
void | addDeviceModelList:completion: (NSArray< ThingSmartDeviceModel * > *deviceModelList,[completion] nullable void(^ completion)(NSArray< ThingSmartDeviceModel * > *deviceList)) |
|
void | removeDeviceWithDevId: (NSString *devId) |
|
void | removeDeviceWithDevId:completion: (NSString *devId,[completion] nullable void(^ completion)(NSString *devId)) |
|
NSArray< ThingSmartDeviceModel * > * | getAllDeviceList () |
|
void | updateDeviceOtaInfoWithList: (NSArray< ThingSmartDeviceOTAModel * > *otaList) |
|
void | updateDeviceOtaInfoWithList:completion: (NSArray< ThingSmartDeviceOTAModel * > *otaList,[completion] nullable void(^ completion)(NSArray< ThingSmartDeviceOTAModel * > *)) |
|
ThingSmartDeviceOTAModel * | getDeviceOtaInfoWithDevId: (NSString *devId) |
|
void | updateDeviceOtaMode: (ThingSmartDeviceOTAModel *otaModel) |
|
void | updateDeviceOtaModel:completion: (ThingSmartDeviceOTAModel *otaModel,[completion] nullable void(^ completion)(ThingSmartDeviceOTAModel *)) |
|
BOOL | validateCachRoamDeviceSN: (NSDictionary *message) |
|
ThingSmartGroupModel * | getGroupInfoWithGroupId: (long long groupId) |
|
void | addGroupModel: (ThingSmartGroupModel *groupModel) |
|
void | addGroupModel:completion: (ThingSmartGroupModel *groupModel,[completion] nullable void(^ completion)(ThingSmartGroupModel *group)) |
|
void | removeGroupWithGroupId: (long long groupId) |
|
NSArray< ThingSmartGroupModel * > * | getAllGroupList () |
|
NSDictionary * | getGroupProductWithProductId: (NSString *productId) |
|
NSDictionary * | getGroupProductWithProductId:productVer: (NSString *productId,[productVer] NSString *productVer) |
|
NSArray< ThingSmartDeviceModel * > * | getDeviceListWithGroupId: (long long groupId) |
|
void | updateGroupProductList: (NSArray< NSDictionary * > *groupProductList) |
|
void | updateDeviceGroupRelationWithDeviceList:groupId: (NSArray *deviceList,[groupId] long long groupId) |
|
void | updateDeviceGroupRelationWithDeviceList:groupId:shouldNotify: (NSArray *deviceList,[groupId] long long groupId,[shouldNotify] BOOL shouldNotify) |
|
NSArray< ThingSmartDeviceModel * > * | getDeviceListWithHomeId: (long long homeId) |
|
ThingSmartBleMeshModel * | getMeshModelWithMeshId: (NSString *meshId) |
|
void | updateMeshModel: (ThingSmartBleMeshModel *meshModel) |
|
NSArray< ThingSmartBleMeshModel * > * | getAllMeshList () |
|
NSInteger | getMeshGroupAddressFromLocalWithMeshId: (NSString *meshId) |
|
NSInteger | getMeshGroupCountFromLocalWithMeshId: (NSString *meshId) |
|
void | removeMeshGroupWithAddress:meshId: (NSInteger address,[meshId] NSString *meshId) |
|
void | addThingModel:completion: (ThingSmartThingModel *model,[completion] nullable void(^ completion)(ThingSmartThingModel *thingModel)) |
|
nullable ThingSmartThingModel * | getThingModelWithProductId:productVersion: (NSString *productId,[productVersion] NSString *productVersion) |
|
void | addAdvancedAbilityModel:completion: (ThingSmartDeviceAdvancedAbility *model,[completion] nullable void(^ completion)(ThingSmartDeviceAdvancedAbility *thingModel)) |
|
BOOL | hasAdvancedAbilityWithDevId:code: (NSString *devId,[code] NSString *code) |
|
NSArray< ThingSmartDeviceAdvancedAbility * > * | getAbilityList () |
|
Adds a device to the cache.
After you add the device to the cache, subscribe to the topic of the device's MQTT messages. Make sure that the local key and protocol version are both configured. During the process, you can set the completion block or implement the deviceDidAdd:
of the proxy ThingCoreCacheServiceDelegate
to handle the result of the event. The completion block is called and followed by the delegate. The tasks to add devices, subscribe to messages, block, and execute callbacks are run in the asynchronous thread. The asynchronous queue.
- Parameters
-
deviceModel | The device model to be added. |
completion | The callback after the completion of the join block. |
void removeDeviceWithDevId: |
( |
NSString * |
devId | ) |
|
|
virtual |
Deletes the cached data of the device by device ID.
If the data is already deleted, the deletion task is not run to avoid duplicate operations. After the deletion, the subscription to the MQTT topic of the device is canceled. During the deletion process, you can handle the result of the event by implementing deviceDidRemove:
of ThingCoreCacheServiceDelegate
. The tasks to delete devices, unsubscribe from messages, and execute callbacks are run in the asynchronous thread. The asynchronous queue.
- Parameters
-
devId | The ID of the device to be removed. |
void removeDeviceWithDevId:completion: |
( |
NSString * |
devId, |
|
|
[completion] nullable void(^)(NSString *devId) |
completion |
|
) |
| |
|
virtual |
Delete the cached data of the device by device ID.
If the data is already deleted, the deletion task is not run to avoid duplicate operations. After deletion, the subscription to the MQTT topic of the device is canceled. During the deletion process, you can set the completion block or implement deviceDidRemove:
as a proxy for ThingCoreCacheServiceDelegate
to handle the result of the event. The completion block is called and followed by the delegate. The tasks to add devices, subscribe to messages, block, and execute callbacks are run in the asynchronous thread. The asynchronous queue.
- Parameters
-
devId | The device ID to be deleted. |
completion | The callback block after the completion of the deletion. |
void removeGroupWithGroupId: |
( |
long long |
groupId | ) |
|
|
virtual |
Deletes the cached data of a group by group ID.
If the group is already deleted, the deletion task is not run to avoid duplicate operations. After deletion, the subscription to the MQTT topic of the device is canceled. During the deletion process, you can handle the result of the event by implementing groupDidRemove:
of ThingCoreCacheServiceDelegate
. The tasks to delete groups, unsubscribe from messages, and execute callbacks are run in the asynchronous thread. The asynchronous queue.
- Parameters
-
groupId | The device ID to be removed. |