![]() |
Tuya iOS Smart Life App SDK 5.15.0
|
#import <ThingSmartSweeperDevice.h>
Properties | |
id< ThingSmartSweeperDeviceDelegate > | delegate |
BOOL | shouldAutoDownloadData |
![]() | |
NSString * | devId |
Returns the device id. More... | |
ThingSmartDeviceModel * | deviceModel |
Returns the model of basic device information. More... | |
id< ThingSmartDeviceDelegate > | delegate |
Definition at line 87 of file ThingSmartSweeperDevice.h.
- (void) connectDeviceByP2P: | (void(^)(void)) | success | |
failure: | (void(^)(NSError *_Nullable error)) | failure | |
Connect to device by P2P
success | callback when connect success |
failure | callback when connect fail |
- (void) connectDeviceByP2P: | (void(^)(void)) | success | |
failure: | (void(^)(NSError *_Nullable error)) | failure | |
Connect to device by P2P
success | callback when connect success |
failure | callback when connect fail |
- (void) connectDeviceByP2P: | (BOOL) | isStopReconnect | |
success: | (void(^)(void)) | success | |
failure: | (void(^)(NSError *_Nullable error)) | failure | |
Connect to device by P2P
isStopReconnect | is Stop the internal reconnection |
success | callback when connect success |
failure | callback when connect fail |
- (void) connectDeviceByP2P: | (BOOL) | isStopReconnect | |
success: | (void(^)(void)) | success | |
failure: | (void(^)(NSError *_Nullable error)) | failure | |
Connect to device by P2P
isStopReconnect | is Stop the internal reconnection |
success | callback when connect success |
failure | callback when connect fail |
- (void) deleteHistoryCleanRecord: | (NSString *) | devId | |
recordId: | (NSString *) | recordId | |
complete: | (void(^)(BOOL success, NSError *error)) | complete | |
删除历史清扫记录
devId | 设备 ID |
recordId | 清扫记录 ID |
- (void) deleteHistoryCleanRecord: | (NSString *) | devId | |
recordId: | (NSString *) | recordId | |
complete: | (void(^)(BOOL success, NSError *error)) | complete | |
删除历史清扫记录
devId | 设备 ID |
recordId | 清扫记录 ID |
- (void) downloadFileWithFileId: | (NSString *) | fileId | |
success: | (void(^)(id result)) | success | |
failure: | (void(^)(NSError *_Nullable error)) | failure | |
下发下载文件指令,设备开始下载文件, 升级成功或失败会通过 ThingSmartFileDownloadDelegate 返回
fileId | fileId of ThingSmartFileDownloadModel |
success | 成功回调 (status 0:未下载 1:下载中) |
failure | 失败回调 |
- (void) downloadFileWithFileId: | (NSString *) | fileId | |
success: | (void(^)(id result)) | success | |
failure: | (void(^)(NSError *_Nullable error)) | failure | |
下发下载文件指令,设备开始下载文件, 升级成功或失败会通过 ThingSmartFileDownloadDelegate 返回
fileId | fileId of ThingSmartFileDownloadModel |
success | 成功回调 (status 0:未下载 1:下载中) |
failure | 失败回调 |
- (void) getCleanRecordDetail: | (NSString *) | devId | |
subRecordId: | (NSInteger) | subRecordId | |
start: | (NSString *) | start | |
size: | (NSInteger) | size | |
complete: | (void(^)(ThingSmartSweeperRecordDetail *model, NSError *error)) | complete | |
流服务V1.0 清扫记录详情
devId | 设备 ID |
subRecordId | 清扫记录 ID,通过解析历史记录列表的value数据,根据数据长度使用不同的解析规则,规则见下表 |
start | 开始位置。第一次传空,之后取下一页时填上一页返回值里的 startRow 值 |
size | 查询数据的大小,固定参数为 500 |
- (void) getCleanRecordDetail: | (NSString *) | devId | |
subRecordId: | (NSInteger) | subRecordId | |
start: | (NSString *) | start | |
size: | (NSInteger) | size | |
complete: | (void(^)(ThingSmartSweeperRecordDetail *model, NSError *error)) | complete | |
流服务V1.0 清扫记录详情
devId | 设备 ID |
subRecordId | 清扫记录 ID,通过解析历史记录列表的value数据,根据数据长度使用不同的解析规则,规则见下表 |
start | 开始位置。第一次传空,之后取下一页时填上一页返回值里的 startRow 值 |
size | 查询数据的大小,固定参数为 500 |
- (void) getCleanRecordDetailV2: | (NSString *) | devId | |
subRecordId: | (NSInteger) | subRecordId | |
mapId: | (NSInteger) | mapId | |
datatype: | (NSInteger) | datatype | |
start: | (NSString *) | start | |
size: | (NSInteger) | size | |
complete: | (void(^)(ThingSmartSweeperRecordDetail *model, NSError *error)) | complete | |
流服务V2.0 清扫记录详情
devId | 设备 ID |
subRecordId | 清扫记录 ID,通过解析历史记录列表的value数据,根据数据长度使用不同的解析规则,规则见下表 |
mapId | 子地图 ID |
datatype | 地图类型 |
start | 开始位置。第一次传空,之后取下一页时填上一页返回值里的 startRow 值 |
size | 查询数据的大小,固定参数为 500 |
- (void) getCleanRecordDetailV2: | (NSString *) | devId | |
subRecordId: | (NSInteger) | subRecordId | |
mapId: | (NSInteger) | mapId | |
datatype: | (NSInteger) | datatype | |
start: | (NSString *) | start | |
size: | (NSInteger) | size | |
complete: | (void(^)(ThingSmartSweeperRecordDetail *model, NSError *error)) | complete | |
流服务V2.0 清扫记录详情
devId | 设备 ID |
subRecordId | 清扫记录 ID,通过解析历史记录列表的value数据,根据数据长度使用不同的解析规则,规则见下表 |
mapId | 子地图 ID |
datatype | 地图类型 |
start | 开始位置。第一次传空,之后取下一页时填上一页返回值里的 startRow 值 |
size | 查询数据的大小,固定参数为 500 |
- (nullable NSString *) getCloudFileDownloadURLWithBucket: | (NSString *) | bucket | |
path: | (NSString *) | path | |
获取数据文件地址
bucket | 文件存储的bucket |
path | 文件路径 |
- (nullable NSString *) getCloudFileDownloadURLWithBucket: | (NSString *) | bucket | |
path: | (NSString *) | path | |
获取数据文件地址
bucket | 文件存储的bucket |
path | 文件路径 |
- (void) getFileDownloadInfoWithLimit: | (NSUInteger) | limit | |
offset: | (NSUInteger) | offset | |
success: | (void(^)(NSArray< ThingSmartFileDownloadModel * > *upgradeFileList, NSUInteger totalCount)) | success | |
failure: | (void(^)(NSError *_Nullable error)) | failure | |
获取文件信息(分页查询)
limit | 一次获取数据的数量(建议最大不要超过100) |
offset | 获取数据的偏移量(用于分页) |
success | 成功回调 |
failure | 失败回调 |
- (void) getFileDownloadInfoWithLimit: | (NSUInteger) | limit | |
offset: | (NSUInteger) | offset | |
success: | (void(^)(NSArray< ThingSmartFileDownloadModel * > *upgradeFileList, NSUInteger totalCount)) | success | |
failure: | (void(^)(NSError *_Nullable error)) | failure | |
获取文件信息(分页查询)
limit | 一次获取数据的数量(建议最大不要超过100) |
offset | 获取数据的偏移量(用于分页) |
success | 成功回调 |
failure | 失败回调 |
- (void) getFileDownloadInfoWithSuccess: | (void(^)(NSArray< ThingSmartFileDownloadModel * > *upgradeFileList)) | success | |
failure: | (void(^)(NSError *_Nullable error)) | failure | |
获取文件信息
success | 成功回调 |
failure | 失败回调 |
- (void) getFileDownloadInfoWithSuccess: | (void(^)(NSArray< ThingSmartFileDownloadModel * > *upgradeFileList)) | success | |
failure: | (void(^)(NSError *_Nullable error)) | failure | |
获取文件信息
success | 成功回调 |
failure | 失败回调 |
- (void) getFileDownloadRateWithSuccess: | (void(^)(ThingSmartFileDownloadRateModel *rateModel)) | success | |
failure: | (void(^)(NSError *_Nullable error)) | failure | |
获取文件下载进度
success | 成功回调 |
failure | 失败回调 |
- (void) getFileDownloadRateWithSuccess: | (void(^)(ThingSmartFileDownloadRateModel *rateModel)) | success | |
failure: | (void(^)(NSError *_Nullable error)) | failure | |
获取文件下载进度
success | 成功回调 |
failure | 失败回调 |
- (void) getHistoryCleanRecordList: | (NSString *) | devId | |
offset: | (NSInteger) | offset | |
limit: | (NSInteger) | limit | |
startTime: | (long long) | startTime | |
endTime: | (long long) | endTime | |
complete: | (void(^)(NSArray< ThingSmartSweeperRecordList * > *list, NSError *error)) | complete | |
历史清扫记录列表
devId | 设备 ID |
offset | 分页偏移量 |
limit | 分页大小 |
startTime | 开始时间 |
endTime | 结束时间 |
- (void) getHistoryCleanRecordList: | (NSString *) | devId | |
offset: | (NSInteger) | offset | |
limit: | (NSInteger) | limit | |
startTime: | (long long) | startTime | |
endTime: | (long long) | endTime | |
complete: | (void(^)(NSArray< ThingSmartSweeperRecordList * > *list, NSError *error)) | complete | |
历史清扫记录列表
devId | 设备 ID |
offset | 分页偏移量 |
limit | 分页大小 |
startTime | 开始时间 |
endTime | 结束时间 |
- (void) getSweeperCurrentPathWithSuccess: | (void(^)(NSString *bucket, NSDictionary< ThingSmartSweeperCurrentPathKey, NSString * > *paths)) | success | |
failure: | (void(^)(NSError *_Nullable error)) | failure | |
获取实时的地图文件信息
success | Success block |
failure | Failure block |
- (void) getSweeperCurrentPathWithSuccess: | (void(^)(NSString *bucket, NSDictionary< ThingSmartSweeperCurrentPathKey, NSString * > *paths)) | success | |
failure: | (void(^)(NSError *_Nullable error)) | failure | |
获取实时的地图文件信息
success | Success block |
failure | Failure block |
- (void) getSweeperDataWithBucket: | (NSString *) | bucket | |
path: | (NSString *) | path | |
success: | (void(^)(NSData *data)) | success | |
failure: | (void(^)(NSError *_Nullable error)) | failure | |
获取数据内容 OSS 错误码查询: https://help.aliyun.com/document_detail/32005.html?spm=a2c4g.11186623.6.1328.609b28126VcNPW
bucket | 文件存储的bucket |
path | 文件路径 |
success | 成功返回二进制地图数据 |
failure | Failure block |
- (void) getSweeperDataWithBucket: | (NSString *) | bucket | |
path: | (NSString *) | path | |
success: | (void(^)(NSData *data)) | success | |
failure: | (void(^)(NSError *_Nullable error)) | failure | |
获取数据内容 OSS 错误码查询: https://help.aliyun.com/document_detail/32005.html?spm=a2c4g.11186623.6.1328.609b28126VcNPW
bucket | 文件存储的bucket |
path | 文件路径 |
success | 成功返回二进制地图数据 |
failure | Failure block |
- (void) getSweeperHistoryDataWithLimit: | (NSUInteger) | limit | |
offset: | (NSUInteger) | offset | |
startTime: | (long) | startTime | |
endTime: | (long) | endTime | |
success: | (void(^)(NSArray< ThingSmartSweeperHistoryModel * > *datas, NSUInteger totalCount)) | success | |
failure: | (void(^)(NSError *_Nullable error)) | failure | |
获取扫地机历史记录
limit | 一次获取数据的数量(建议最大不要超过100) |
offset | 获取数据的偏移量(用于分页) |
startTime | 起始时间戳 |
endTime | 结束时间戳 |
success | Success block |
failure | Failure block |
- (void) getSweeperHistoryDataWithLimit: | (NSUInteger) | limit | |
offset: | (NSUInteger) | offset | |
startTime: | (long) | startTime | |
endTime: | (long) | endTime | |
success: | (void(^)(NSArray< ThingSmartSweeperHistoryModel * > *datas, NSUInteger totalCount)) | success | |
failure: | (void(^)(NSError *_Nullable error)) | failure | |
获取扫地机历史记录
limit | 一次获取数据的数量(建议最大不要超过100) |
offset | 获取数据的偏移量(用于分页) |
startTime | 起始时间戳 |
endTime | 结束时间戳 |
success | Success block |
failure | Failure block |
- (void) getSweeperHistoryDataWithLimit: | (NSUInteger) | limit | |
offset: | (NSUInteger) | offset | |
success: | (void(^)(NSArray< ThingSmartSweeperHistoryModel * > *datas, NSUInteger totalCount)) | success | |
failure: | (void(^)(NSError *_Nullable error)) | failure | |
获取扫地机历史记录
limit | 一次获取数据的数量(建议最大不要超过100) |
offset | 获取数据的偏移量(用于分页) |
success | Success block |
failure | Failure block |
- (void) getSweeperHistoryDataWithLimit: | (NSUInteger) | limit | |
offset: | (NSUInteger) | offset | |
success: | (void(^)(NSArray< ThingSmartSweeperHistoryModel * > *datas, NSUInteger totalCount)) | success | |
failure: | (void(^)(NSError *_Nullable error)) | failure | |
获取扫地机历史记录
limit | 一次获取数据的数量(建议最大不要超过100) |
offset | 获取数据的偏移量(用于分页) |
success | Success block |
failure | Failure block |
- (void) getSweeperMultiHistoryDataWithLimit: | (NSUInteger) | limit | |
offset: | (NSUInteger) | offset | |
startTime: | (long) | startTime | |
endTime: | (long) | endTime | |
success: | (void(^)(NSArray< ThingSmartSweeperHistoryModel * > *datas, NSUInteger totalCount)) | success | |
failure: | (void(^)(NSError *_Nullable error)) | failure | |
获取(多地图)扫地机历史记录
limit | 一次获取数据的数量(建议最大不要超过100) |
offset | 获取数据的偏移量(用于分页) |
startTime | 起始时间戳 |
endTime | 结束时间戳 |
success | 成功结果回调 |
failure | 失败结果回调 |
- (void) getSweeperMultiHistoryDataWithLimit: | (NSUInteger) | limit | |
offset: | (NSUInteger) | offset | |
startTime: | (long) | startTime | |
endTime: | (long) | endTime | |
success: | (void(^)(NSArray< ThingSmartSweeperHistoryModel * > *datas, NSUInteger totalCount)) | success | |
failure: | (void(^)(NSError *_Nullable error)) | failure | |
获取(多地图)扫地机历史记录
limit | 一次获取数据的数量(建议最大不要超过100) |
offset | 获取数据的偏移量(用于分页) |
startTime | 起始时间戳 |
endTime | 结束时间戳 |
success | 成功结果回调 |
failure | 失败结果回调 |
- (void) getSweeperMultiHistoryDataWithLimit: | (NSUInteger) | limit | |
offset: | (NSUInteger) | offset | |
success: | (void(^)(NSArray< ThingSmartSweeperHistoryModel * > *datas, NSUInteger totalCount)) | success | |
failure: | (void(^)(NSError *_Nullable error)) | failure | |
获取(多地图)扫地机历史记录
limit | 一次获取数据的数量(建议最大不要超过100) |
offset | 获取数据的偏移量(用于分页) |
success | 成功结果回调 |
failure | 失败结果回调 |
- (void) getSweeperMultiHistoryDataWithLimit: | (NSUInteger) | limit | |
offset: | (NSUInteger) | offset | |
success: | (void(^)(NSArray< ThingSmartSweeperHistoryModel * > *datas, NSUInteger totalCount)) | success | |
failure: | (void(^)(NSError *_Nullable error)) | failure | |
获取(多地图)扫地机历史记录
limit | 一次获取数据的数量(建议最大不要超过100) |
offset | 获取数据的偏移量(用于分页) |
success | 成功结果回调 |
failure | 失败结果回调 |
- (void) initCloudConfigWithSuccess: | (void(^)(NSString *bucket)) | success | |
failure: | (void(^)(NSError *_Nullable error)) | failure | |
初始化云配置
success | 成功返回文件存储的bucket信息(用来获取文件的存储url) |
failure | Failure block |
- (void) initCloudConfigWithSuccess: | (void(^)(NSString *bucket)) | success | |
failure: | (void(^)(NSError *_Nullable error)) | failure | |
初始化云配置
success | 成功返回文件存储的bucket信息(用来获取文件的存储url) |
failure | Failure block |
- (void) onDestroyP2P |
Destroy P2P SDK and cancel all task.
- (void) onDestroyP2P |
Destroy P2P SDK and cancel all task.
- (BOOL) P2PActiveCheck |
Check p2p session is active.
- (BOOL) P2PActiveCheck |
Check p2p session is active.
- (void) queryLatestCleanRecord: | (NSString *) | devId | |
start: | (NSString *) | start | |
size: | (NSInteger) | size | |
complete: | (void(^)(ThingSmartSweeperRecordDetail *model, NSError *error)) | complete | |
流服务V1.0 查询最新一次清扫记录
devId | 设备 ID |
start | 开始位置。第一次传空,之后取下一页时填上一页返回值里的 startRow 值 |
size | 查询数据的大小,固定参数为 500 |
- (void) queryLatestCleanRecord: | (NSString *) | devId | |
start: | (NSString *) | start | |
size: | (NSInteger) | size | |
complete: | (void(^)(ThingSmartSweeperRecordDetail *model, NSError *error)) | complete | |
流服务V1.0 查询最新一次清扫记录
devId | 设备 ID |
start | 开始位置。第一次传空,之后取下一页时填上一页返回值里的 startRow 值 |
size | 查询数据的大小,固定参数为 500 |
- (void) queryLatestCleanRecordV2: | (NSString *) | devId | |
start: | (NSString *) | start | |
size: | (NSInteger) | size | |
complete: | (void(^)(ThingSmartSweeperRecordDetail *model, NSError *error)) | complete | |
流服务V2.0 查询最新一次清扫记录
devId | 设备 ID |
start | 开始位置。第一次传空,之后取下一页时填上一页返回值里的 startRow 值 |
size | 查询数据的大小,固定参数为 500 |
- (void) queryLatestCleanRecordV2: | (NSString *) | devId | |
start: | (NSString *) | start | |
size: | (NSInteger) | size | |
complete: | (void(^)(ThingSmartSweeperRecordDetail *model, NSError *error)) | complete | |
流服务V2.0 查询最新一次清扫记录
devId | 设备 ID |
start | 开始位置。第一次传空,之后取下一页时填上一页返回值里的 startRow 值 |
size | 查询数据的大小,固定参数为 500 |
- (void) removeAllHistoryDataWithSuccess: | (void(^)(void)) | success | |
failure: | ("This method is deprecated on 3.0.0") | __deprecated_msg | |
删除当前扫地机所有历史记录
success | Success block |
failure | Failure block |
- (void) removeAllHistoryDataWithSuccess: | (void(^)(void)) | success | |
failure: | ("This method is deprecated on 3.0.0") | __deprecated_msg | |
删除当前扫地机所有历史记录
success | Success block |
failure | Failure block |
- (void) removeAllMultiHistoryDataWithSuccess: | (void(^)(void)) | success | |
failure: | ("This method is deprecated on 3.0.0") | __deprecated_msg | |
删除当前(多地图)扫地机所有历史记录
success | 成功结果回调 |
failure | 失败结果回调 |
- (void) removeAllMultiHistoryDataWithSuccess: | (void(^)(void)) | success | |
failure: | ("This method is deprecated on 3.0.0") | __deprecated_msg | |
删除当前(多地图)扫地机所有历史记录
success | 成功结果回调 |
failure | 失败结果回调 |
- (void) removeSweeperHistoryDataWithFileIds: | (NSArray< NSString * > *) | fileIds | |
success: | (void(^)(void)) | success | |
failure: | (void(^)(NSError *_Nullable error)) | failure | |
删除扫地机历史记录
fileIds | 文件 id 数组 |
success | Success block |
failure | Failure block |
- (void) removeSweeperHistoryDataWithFileIds: | (NSArray< NSString * > *) | fileIds | |
success: | (void(^)(void)) | success | |
failure: | (void(^)(NSError *_Nullable error)) | failure | |
删除扫地机历史记录
fileIds | 文件 id 数组 |
success | Success block |
failure | Failure block |
- (void) startObserverSweeperDataByP2P: | (ThingSmartSweeperP2PDownloadType) | downloadType | |
receiveP2PData: | (void(^)(NSDictionary *data)) | receiveP2PData | |
failure: | (void(^)(NSError *_Nullable error)) | failure | |
Start observer data from sweeper device.
downloadType | 0:download only once, 1: continuous download when device update. |
receiveP2PData | callback when observer success |
failure | callback when connect fail |
- (void) startObserverSweeperDataByP2P: | (ThingSmartSweeperP2PDownloadType) | downloadType | |
receiveP2PData: | (void(^)(NSDictionary *data)) | receiveP2PData | |
failure: | (void(^)(NSError *_Nullable error)) | failure | |
Start observer data from sweeper device.
downloadType | 0:download only once, 1: continuous download when device update. |
receiveP2PData | callback when observer success |
failure | callback when connect fail |
- (void) stopObserverSweeperDataByP2P: | (void(^)(void)) | success | |
failure: | (void(^)(NSError *_Nullable error)) | failure | |
Stop observer data from sweeper device.
success | callback when stop success |
failure | callback when stop fail |
- (void) stopObserverSweeperDataByP2P: | (void(^)(void)) | success | |
failure: | (void(^)(NSError *_Nullable error)) | failure | |
Stop observer data from sweeper device.
success | callback when stop success |
failure | callback when stop fail |
- (void) subscribeDeviceDataTransfer |
订阅设备的流数据
- (void) subscribeDeviceDataTransfer |
订阅设备的流数据
- (void) sweeperFileNameUpdateWithFileId: | (NSNumber *) | fileId | |
fileName: | (NSString *) | fileName | |
success: | (void(^)(id result)) | success | |
failure: | (void(^)(NSError *_Nullable error)) | failure | |
Update sweeper file name
fileId | map id |
fileName | file name |
success | success call back |
failure | failure call back |
- (void) sweeperFileNameUpdateWithFileId: | (NSNumber *) | fileId | |
fileName: | (NSString *) | fileName | |
success: | (void(^)(id result)) | success | |
failure: | (void(^)(NSError *_Nullable error)) | failure | |
Update sweeper file name
fileId | map id |
fileName | file name |
success | success call back |
failure | failure call back |
- (void) unsubscribeDeviceDataTransfer |
取消订阅设备的流数据
- (void) unsubscribeDeviceDataTransfer |
取消订阅设备的流数据
- (void) updateCloudConfigWithSuccess: | (void(^)(NSString *bucket)) | success | |
failure: | (void(^)(NSError *_Nullable error)) | failure | |
更新云配置
success | 成功返回文件存储的bucket信息 |
failure | Failure block |
- (void) updateCloudConfigWithSuccess: | (void(^)(NSString *bucket)) | success | |
failure: | (void(^)(NSError *_Nullable error)) | failure | |
更新云配置
success | 成功返回文件存储的bucket信息 |
failure | Failure block |
|
readwritenonatomicweak |
Definition at line 89 of file ThingSmartSweeperDevice.h.
|
readwritenonatomicassign |
Download laser sweeper binary data from mapPath URL. Default false. 是否自动下载地图文件数据
Definition at line 95 of file ThingSmartSweeperDevice.h.