更新时间:2023-05-22 06:38:31
云台作为网络摄像机(IPC)一个重要的功能点,一直被广泛使用在各类 IPC 设备上。而对于云台业务的接入,一直缺少一个垂直化封装,给开发者对接带来了困难。为了解决这个问题,让开发者更快更方便的接入云台功能,涂鸦对云台相关功能进行了封装。接口功能包括:
云台的相关功能全部通过管理类来实现。
示例代码
Objective C:
TuyaSmartPTZManager *ptzManager = [[TuyaSmartPTZManager alloc] initWithDeviceId:devId];
Swift:
let ptzManager = TuyaSmartPTZManager.init(deviceId: devId)
接口说明
是否支持云台控制。
- (BOOL)isSupportPTZControl;
返回值说明
返回值类型 | 说明 |
---|---|
BOOL | YES:支持 NO:不支持 |
示例代码
Objective C:
if ([self.ptzManager isSupportPTZControl]) {
NSLog(@"Is support.");
} else {
NSLog(@"Not support.");
}
Swift:
if ptzManager!.isSupportPTZControl() {
print("Is support.")
} else {
print("Not support.")
}
接口说明
查询摄像机所有支持的方向。
- (NSArray *)requestSupportedPTZControlDirections;
返回值说明
返回值类型 | 说明 |
---|---|
NSArray | 返回支持的方向数组,内部item是字符串类型,和 TuyaSmartPTZControlDirection 一一对应。示例格式:["0","1","2","3","4","5","6","7"] |
示例代码
Objective C:
NSArray *directions = [self.ptzManager requestSupportedPTZControlDirections];
for (NSString *directionString in directions) {
NSLog(@"%@", directionString);
}
Swift:
let directions = ptzManager?.requestSupportedPTZControlDirections() ?? []
for directionString in directions {
print(directionString)
}
接口说明
开始云台控制。
- (void)startPTZWithDirection:(TuyaSmartPTZControlDirection)direction
success:(TYSuccessID)success
failure:(TYFailureError)failure;
参数说明
参数 | 说明 |
---|---|
direction | 方向的枚举值,参考 TuyaSmartPTZControlDirection 定义 |
success | 成功的回调 |
failure | 失败的回调 |
TuyaSmartPTZControlDirection
枚举
值 | 描述 |
---|---|
TuyaSmartPTZControlDirectionUp | 上 |
TuyaSmartPTZControlDirectionRightUp | 右上 |
TuyaSmartPTZControlDirectionRight | 右 |
TuyaSmartPTZControlDirectionRightDown | 右下 |
TuyaSmartPTZControlDirectionDown | 下 |
TuyaSmartPTZControlDirectionLeftDown | 左下 |
TuyaSmartPTZControlDirectionLeft | 左 |
TuyaSmartPTZControlDirectionLeftUp | 左上 |
示例代码
Objective C:
[self.ptzManager startPTZWithDirection:TuyaSmartPTZControlDirectionRight success:^(id result) {
NSLog(@"success");
} failure:^(NSError *error) {
NSLog(@"failure");
}];
Swift:
ptzManager?.startPTZ(with: .right, success: { (obj) in
print("success")
}, failure: { (error) in
print("failure")
})
接口说明
停止云台控制。
- (void)stopPTZWithSuccess:(TYSuccessID)success
failure:(TYFailureError)failure;
参数说明
参数 | 说明 |
---|---|
success | 成功的回调 |
failure | 失败的回调 |
示例代码
Objective C:
[self.ptzManager stopPTZWithSuccess:^(id result) {
NSLog(@"success");
} failure:^(NSError *error) {
NSLog(@"failure");
}];
Swift:
ptzManager?.stopPTZ(success: { (obj) in
print("success")
}, failure: { (error) in
print("failure")
})
接口说明
是否支持焦距缩放。
- (BOOL)isSupportZoomAction;
返回值说明
返回值类型 | 说明 |
---|---|
BOOL | YES:支持 NO:不支持 |
示例代码
Objective C:
if ([self.ptzManager isSupportZoomAction]) {
NSLog(@"Is support.");
} else {
NSLog(@"Not support.");
}
Swift:
if ptzManager!.isSupportZoomAction() {
print("Is support.")
} else {
print("Not support.")
}
接口说明
开始焦距缩放
- (void)startPTZZoomWithIsEnlarge:(BOOL)isEnlarge
success:(TYSuccessID)success
failure:(TYFailureError)failure;
参数说明
参数 | 说明 |
---|---|
isEnlarge | YES:倍数变大 NO:倍数缩小 |
success | 成功的回调 |
failure | 失败的回调 |
示例代码
Objective C:
[self.ptzManager startPTZZoomWithIsEnlarge:YES success:^(id result) {
NSLog(@"success");
} failure:^(NSError *error) {
NSLog(@"failure");
}];
Swift:
ptzManager?.startPTZZoom(withIsEnlarge: true, success: { (obj) in
print("success")
}, failure: { (error) in
print("failure")
})
接口说明
停止焦距缩放。
- (void)stopZoomActionWithSuccess:(TYSuccessID)success
failure:(TYFailureError)failure;
参数说明
参数 | 说明 |
---|---|
success | 成功的回调 |
failure | 失败的回调 |
示例代码
Objective C:
[self.ptzManager stopZoomActionWithSuccess:^(id result) {
NSLog(@"success");
} failure:^(NSError *error) {
NSLog(@"failure");
}];
Swift:
ptzManager?.stopZoomAction(success: { (obj) in
print("success")
}, failure: { (error) in
print("failure")
})
收藏点模型
为了方便收藏点的操作,将其信息封装成了 TYCameraCollectionPointModel
。
属性说明
属性 | 说明 |
---|---|
devId | 设备 ID |
pointId | 收藏点 ID |
mpId | 在设备中的一个ID,由设备生成 |
name | 收藏点名称 |
pic | 收藏点的图片地址 |
pos | 收藏点的位置 |
encryption | 收藏点图片的解密 key |
接口说明
是否支持收藏点。
- (BOOL)isSupportCollectionPoint;
返回值说明
返回值类型 | 说明 |
---|---|
BOOL | YES:支持收藏点 NO:不支持收藏点 |
示例代码
Objective C:
if ([self.ptzManager isSupportCollectionPoint]) {
NSLog(@"Is support.");
} else {
NSLog(@"Not support.");
}
Swift:
if ptzManager!.isSupportCollectionPoint() {
print("Is support.")
} else {
print("Not support.")
}
接口说明
是否能编辑收藏点,如添加、删除、重命名收藏点。
在巡航模式下,不支持编辑收藏点;在非巡航模式下,可以编辑收藏点。
- (BOOL)couldOperateCollectionPoint;
返回值说明
返回值类型 | 说明 |
---|---|
BOOL | YES:能编辑收藏点 NO:不能编辑收藏点 |
示例代码
Objective C:
if ([self.ptzManager couldOperateCollectionPoint]) {
NSLog(@"Could operate.");
} else {
NSLog(@"Couldn't operate.");
}
Swift:
if ptzManager!.couldOperateCollectionPoint() {
print("Could operate.")
} else {
print("Couldn't operate.")
}
接口说明
查询收藏点列表。
- (void)requestCollectionPointListWithSuccess:(TYSuccessList)success failure:(TYFailureError)failure;
参数说明
参数 | 说明 |
---|---|
success | 成功的回调,返回收藏点模型 TYCameraCollectionPointModel 列表 |
failure | 失败的回调 |
示例代码
Objective C:
[self.ptzManager requestCollectionPointListWithSuccess:^(NSArray *list) {
for (TYCameraCollectionPointModel *model in list) {
NSLog(@"%@", model.name);
}
} failure:^(NSError *error) {
}];
Swift:
ptzManager?.requestCollectionPointList(success: { (list) in
if let models = list {
for model in models {
let pointModel = model as? TYCameraCollectionPointModel
let pointName = pointModel?.name ?? ""
print(pointName)
}
}
}, failure: { (error) in
})
接口说明
添加收藏点。
- (void)addCollectionPointWithName:(NSString *)name success:(TYSuccessHandler)success failure:(TYFailureError)failure;
参数说明
参数 | 说明 |
---|---|
name | 收藏点的名称 |
success | 成功的回调 |
failure | 失败的回调 |
示例代码
Objective C:
[self.ptzManager addCollectionPointWithName:@"pointName" success:^{
NSLog(@"success");
} failure:^(NSError *error) {
NSLog(@"failure");
}];
Swift:
ptzManager?.addCollectionPoint(withName: "pointName", success: {
print("success")
}, failure: { (error) in
print("failure")
})
接口说明
删除收藏点。
- (void)deleteCollectionPoints:(NSArray<TYCameraCollectionPointModel *> *)models success:(TYSuccessHandler)success failure:(TYFailureError)failure;
参数说明
参数 | 说明 |
---|---|
models | 要删除的收藏点列表 |
success | 成功的回调 |
failure | 失败的回调 |
示例代码
Objective C:
[self.ptzManager deleteCollectionPoints:@[pointModel] success:^{
NSLog(@"success");
} failure:^(NSError *error) {
NSLog(@"failure");
}];
Swift:
ptzManager?.deleteCollectionPoints([pointModel], success: {
print("success")
}, failure: { (error) in
print("failure")
})
接口说明
重命名收藏点。
- (void)renameCollectionPoint:(TYCameraCollectionPointModel *)model name:(NSString *)name success:(TYSuccessHandler)success failure:(TYFailureError)failure;
参数说明
参数 | 说明 |
---|---|
model | 要修改的收藏点模型 |
name | 收藏点的最新名称 |
success | 成功的回调 |
failure | 失败的回调 |
示例代码
Objective C:
[self.ptzManager renameCollectionPoint:pointModel name:@"newName" success:^{
NSLog(@"success");
} failure:^(NSError *error) {
NSLog(@"failure");
}];
Swift:
ptzManager?.renameCollectionPoint(pointModel, name: "newName", success: {
print("success")
}, failure: { (error) in
print("failure")
})
接口说明
跳转到指定的收藏点。
- (void)viewCollectionPoint:(TYCameraCollectionPointModel *)model success:(TYSuccessHandler)success failure:(TYFailureError)failure;
参数说明
参数 | 说明 |
---|---|
model | 将要跳到的收藏点 |
success | 成功的回调 |
failure | 失败的回调 |
示例代码
Objective C:
[self.ptzManager viewCollectionPoint:pointModel success:^{
NSLog(@"success");
} failure:^(NSError *error) {
NSLog(@"failure");
}];
Swift:
ptzManager?.viewCollectionPoint(pointModel, success: {
print("success")
}, failure: { (error) in
print("failure")
})
接口说明
是否支持巡航。
- (BOOL)isSupportCruise;
返回值说明
返回值类型 | 说明 |
---|---|
BOOL | YES:支持 NO:不支持 |
示例代码
Objective C:
if ([self.ptzManager isSupportCruise]) {
NSLog(@"Is support.");
} else {
NSLog(@"Not support.");
}
Swift:
if ptzManager!.isSupportCruise() {
print("Is support.")
} else {
print("Not support.")
}
接口说明
巡航开关是否已打开。
- (BOOL)isOpenCruise;
返回值说明
返回值类型 | 说明 |
---|---|
BOOL | YES:打开状态 NO:关闭状态 |
示例代码
Objective C:
if ([self.ptzManager isOpenCruise]) {
NSLog(@"Is opened.");
} else {
NSLog(@"Is closed.");
}
Swift:
if ptzManager!.isOpenCruise() {
print("Is opened.")
} else {
print("Is closed.")
}
接口说明
查询当前的巡航模式。
- (TuyaSmartPTZControlCruiseMode)getCurrentCruiseMode;
返回值说明
返回值类型 | 说明 |
---|---|
TuyaSmartPTZControlCruiseMode | 巡航模式枚举 |
巡航模式枚举 TuyaSmartPTZControlCruiseMode
值 | 描述 |
---|---|
TuyaSmartPTZControlCruiseModePanoramic | 全景巡航 |
TuyaSmartPTZControlCruiseModeCollectionPoint | 收藏点巡航 |
示例代码
Objective C:
TuyaSmartPTZControlCruiseMode cruiseModel = self.ptzManager.getCurrentCruiseMode;
if (cruiseModel == TuyaSmartPTZControlCruiseModePanoramic) {
NSLog(@"Panoramic mode");
} else {
NSLog(@"Collection point mode");
}
Swift:
let cruiseModel = ptzManager!.getCurrentCruiseMode()
if cruiseModel == .panoramic {
print("Panoramic mode.")
} else {
print("Collection point mode.")
}
接口说明
查询当前的巡航时间模式。
- (TuyaSmartPTZControlCruiseTimeMode)getCurrentCruiseTimeMode;
返回值说明
返回值类型 | 说明 |
---|---|
TuyaSmartPTZControlCruiseTimeMode | 巡航时间模式枚举 |
巡航时间模式枚举 TuyaSmartPTZControlCruiseTimeMode
值 | 描述 |
---|---|
TuyaSmartPTZControlCruiseTimeModeAllDay | 全天巡航 |
TuyaSmartPTZControlCruiseTimeModeCustom | 自定义时间巡航 |
示例代码
Objective C:
TuyaSmartPTZControlCruiseTimeMode timeModel = self.ptzManager.getCurrentCruiseTimeMode;
if (timeModel == TuyaSmartPTZControlCruiseTimeModeAllDay) {
NSLog(@"All day mode");
} else {
NSLog(@"Custom Time mode");
}
Swift:
let timeModel = ptzManager!.getCurrentCruiseTimeMode()
if timeModel == .allDay {
print("All day mode.")
} else {
print("Custom Time mode.")
}
接口说明
查询当前的巡航状态。
- (TuyaSmartPTZControlCruiseState)getCurrentCruiseState;
返回值说明
返回值类型 | 说明 |
---|---|
TuyaSmartPTZControlCruiseState | 巡航状态枚举 |
巡航状态枚举 TuyaSmartPTZControlCruiseState
值 | 描述 |
---|---|
TuyaSmartPTZControlCruiseStatePanoramic | 全景巡航 |
TuyaSmartPTZControlCruiseStateCollectionPoint | 收藏点巡航 |
TuyaSmartPTZControlCruiseStateNone | 非巡航状态 |
示例代码
Objective C:
TuyaSmartPTZControlCruiseState cruiseState = self.ptzManager.getCurrentCruiseState;
if (cruiseState == TuyaSmartPTZControlCruiseStatePanoramic) {
NSLog(@"Panoramic mode state.");
} else if (cruiseState == TuyaSmartPTZControlCruiseStateCollectionPoint) {
NSLog(@"Collection point mode state.");
} else if (cruiseState == TuyaSmartPTZControlCruiseStateNone) {
NSLog(@"Not in cruise mode.");
}
Swift:
let cruiseState = ptzManager!.getCurrentCruiseState()
if cruiseState == .panoramic {
print("Panoramic mode state.")
} else if cruiseState == .collectionPoint {
print("Collection point mode state.")
} else if cruiseState == .none {
print("Not in cruise mode.")
}
接口说明
查询当前的巡航时间。
- (NSString *)getCurrentCruiseTime;
返回值说明
返回值类型 | 说明 |
---|---|
NSString | startTime-endTime,例如 “09:00-18:00” |
示例代码
Objective C:
TuyaSmartPTZControlCruiseTimeMode timeModel = self.ptzManager.getCurrentCruiseTimeMode;
if (timeModel == TuyaSmartPTZControlCruiseTimeModeCustom) {
NSLog(@"Custom Time mode");
NSString *timeRangeStr = [self.ptzManager getCurrentCruiseTime];
NSLog(@"startTime-endTime:%@", timeRangeStr);
} else {
NSLog(@"All day mode");
}
Swift:
let timeModel = ptzManager!.getCurrentCruiseTimeMode()
if timeModel == .custom {
print("Custom Time mode.")
let timeRangeStr = ptzManager?.getCurrentCruiseTime() ?? ""
print("startTime-endTime:\(timeRangeStr)")
} else {
print("All day mode.")
}
接口说明
打开或关闭巡航。
- (void)setCruiseOpen:(BOOL)isOpen success:(TYSuccessID)success failure:(TYFailureError)failure;
参数说明
参数 | 说明 |
---|---|
isOpen | YES:打开巡航 NO:关闭巡航 |
success | 成功的回调 |
failure | 失败的回调 |
示例代码
Objective C:
[self.ptzManager setCruiseOpen:YES success:^(id result) {
NSLog(@"success");
} failure:^(NSError *error) {
NSLog(@"failure");
}];
Swift:
ptzManager?.setCruiseOpen(true, success: { (obj) in
print("success")
}, failure: { (error) in
print("failure")
})
接口说明
设置巡航模式。
- (void)setCruiseMode:(TuyaSmartPTZControlCruiseMode)mode success:(TYSuccessID)success failure:(TYFailureError)failure;
参数说明
参数 | 说明 |
---|---|
mode | TuyaSmartPTZControlCruiseModePanoramic:全景巡航 TuyaSmartPTZControlCruiseModeCollectionPoint:收藏点巡航 |
success | 成功的回调 |
failure | 失败的回调 |
示例代码
Objective C:
[self.ptzManager setCruiseMode:TuyaSmartPTZControlCruiseModePanoramic success:^(id result) {
NSLog(@"success");
} failure:^(NSError *error) {
NSLog(@"failure");
}];
Swift:
ptzManager?.setCruiseMode(.panoramic, success: { (obj) in
print("success")
}, failure: { (error) in
print("failure")
});
接口说明
设置巡航的时间模式。
- (void)setCruiseTimeMode:(TuyaSmartPTZControlCruiseTimeMode)timeMode success:(TYSuccessHandler)success failure:(TYFailureError)failure;
参数说明
参数 | 说明 |
---|---|
timeMode | TuyaSmartPTZControlCruiseTimeModeAllDay:全天巡航 TuyaSmartPTZControlCruiseTimeModeCustom:自定义时间巡航 |
success | 成功的回调 |
failure | 失败的回调 |
示例代码
Objective C:
[self.ptzManager setCruiseTimeMode:TuyaSmartPTZControlCruiseTimeModeCustom success:^{
NSLog(@"success");
} failure:^(NSError *error) {
NSLog(@"failure");
}];
Swift:
ptzManager?.setCruiseTimeMode(.custom, success: {
print("success")
}, failure: { (error) in
print("failure")
})
接口说明
设置巡航的状态
- (void)setCruiseState:(TuyaSmartPTZControlCruiseState)state success:(TYSuccessHandler)success failure:(TYFailureError)failure;
参数说明
参数 | 说明 |
---|---|
state | TuyaSmartPTZControlCruiseStatePanoramic:全景巡航 TuyaSmartPTZControlCruiseStateCollectionPoint:收藏点巡航 TuyaSmartPTZControlCruiseStateNone:非巡航状态 |
success | 成功的回调 |
failure | 失败的回调 |
示例代码
Objective C:
[self.ptzManager setCruiseState:TuyaSmartPTZControlCruiseStateCollectionPoint success:^{
NSLog(@"success");
} failure:^(NSError *error) {
NSLog(@"failure");
}];
Swift:
ptzManager?.setCruiseState(.collectionPoint, success: {
print("success")
}, failure: { (error) in
print("failure")
})
接口说明
自定义巡航的时间。
- (void)setCruiseCustomWithStartTime:(NSString *)startTime endTime:(NSString *)endTime success:(TYSuccessHandler)success failure:(TYFailureError)failure;
参数说明
参数 | 说明 |
---|---|
startTime | 开始时间,格式:“00:00” |
endTime | 结束时间,格式:“00:00” |
success | 成功的回调 |
failure | 失败的回调 |
示例代码
Objective C:
TuyaSmartPTZControlCruiseTimeMode currentTimeModel = self.ptzManager.getCurrentCruiseTimeMode;
if (currentTimeModel == TuyaSmartPTZControlCruiseTimeModeCustom) {
NSLog(@"Custom Time mode");
[self.ptzManager setCruiseCustomWithStartTime:@"09:00" endTime:@"15:00" success:^{
NSLog(@"success");
} failure:^(NSError *error) {
NSLog(@"failure");
}];
} else {
NSLog(@"All day mode");
}
Swift:
let currentTimeModel = ptzManager!.getCurrentCruiseTimeMode()
if currentTimeModel == .custom {
print("Custom Time mode.")
ptzManager?.setCruiseCustomWithStartTime("09:00", endTime: "15:00", success: {
print("success")
}, failure: { (error) in
print("failure")
})
} else {
print("All day mode.")
}
接口说明
是否支持移动追踪。
- (BOOL)isSupportMotionTracking;
返回值说明
返回值类型 | 说明 |
---|---|
BOOL | YES:支持 NO:不支持 |
示例代码
Objective C:
if ([self.ptzManager isSupportMotionTracking]) {
NSLog(@"Is support.");
} else {
NSLog(@"Not support.");
}
Swift:
if ptzManager!.isSupportMotionTracking() {
print("Is support.")
} else {
print("Not support.")
}
接口说明
是否打开了移动追踪。
- (BOOL)isOpenMotionTracking;
返回值说明
返回值类型 | 说明 |
---|---|
BOOL | YES:已开启 NO:未开启 |
示例代码
Objective C:
if ([self.ptzManager isOpenMotionTracking]) {
NSLog(@"Is opened.");
} else {
NSLog(@"Is closed.");
}
Swift:
if ptzManager!.isOpenMotionTracking() {
print("Is opened.")
} else {
print("Is closed.")
}
接口说明
打开或关闭移动追踪。
- (void)setMotionTrackingState:(BOOL)isOpen success:(TYSuccessHandler)success failure:(TYFailureError)failure;
参数说明
参数 | 说明 |
---|---|
isOpen | YES:打开移动追踪 NO:关闭移动追踪 |
success | 成功的回调 |
failure | 失败的回调 |
示例代码
Objective C:
[self.ptzManager setMotionTrackingState:YES success:^{
NSLog(@"success");
} failure:^(NSError *error) {
NSLog(@"failure");
}];
Swift:
ptzManager?.setMotionTrackingState(true, success: {
print("success")
}, failure: { (error) in
print("failure")
})
接口说明
是否支持预设点。
- (BOOL)isSupportPresetPoint;
返回值说明
返回值类型 | 说明 |
---|---|
BOOL | YES:支持 NO:不支持 |
示例代码
Objective C:
if ([self.ptzManager isSupportPresetPoint]) {
NSLog(@"Is support.");
} else {
NSLog(@"Not support.");
}
Swift:
if ptzManager!.isSupportPresetPoint() {
print("Is support.")
} else {
print("Not support.")
}
接口说明
查询预设点列表。
- (NSArray *)requestSupportedPresetPoints;
返回值说明
返回值类型 | 说明 |
---|---|
NSArray | 预设点索引列表,如有索引为1、2、3、4的预设点,则返回 ["1","2","3","4"] |
示例代码
Objective C:
NSArray *points = [self.ptzManager requestSupportedPresetPoints];
for (NSString *indexStr in points) {
NSLog(@"index:%@", indexStr);
}
Swift:
let points = ptzManager?.requestSupportedPresetPoints() ?? []
for indexStr in points {
print("index:\(indexStr)")
}
接口说明
跳转到指定的预设点。
- (void)viewPresetPointWithIndex:(NSInteger)index success:(TYSuccessID)success failure:(TYFailureError)failure;
参数说明
参数 | 说明 |
---|---|
index | 预设点索引 |
success | 成功的回调 |
failure | 失败的回调 |
示例代码
Objective C:
int index = 1;
[self.ptzManager viewPresetPointWithIndex:index success:^(id result) {
NSLog(@"success");
} failure:^(NSError *error) {
NSLog(@"failure");
}];
Swift:
let index = 1
ptzManager?.viewPresetPoint(with: index, success: { (obj) in
print("success")
}, failure: { (error) in
print("failure")
})
接口说明
设置指定索引的预设点。
- (void)setPresetPointWithIndex:(NSInteger)index success:(TYSuccessID)success failure:(TYFailureError)failure;
参数说明
参数 | 说明 |
---|---|
index | 要设置的预设点索引 |
success | 成功的回调 |
failure | 失败的回调 |
示例代码
Objective C:
[self.ptzManager setPresetPointWithIndex:index success:^(id result) {
NSLog(@"success");
} failure:^(NSError *error) {
NSLog(@"failure");
}];
Swift:
ptzManager?.setPresetPointWith(index, success: { (obj) in
print("success")
}, failure: { (error) in
print("failure")
})
云台机管理类 TuyaSmartPTZManager
支持代理设置。
属性说明
@property (nonatomic, weak) id<TuyaSmartPTZManagerDeletate> delegate;
接口说明
操作了收藏点
- (void)collectionPointAction:(TuyaSmartPTZManager *)manager actionType:(NSInteger)type;
参数说明
参数 | 说明 |
---|---|
manager | 云台机管理类 |
type | value: 1:新增了收藏点 2:删除了收藏点 3:跳到指定的收藏点 |
接口说明
巡航的开关状态发生了变化。
- (void)didUpdateCruiseSwitchState:(TuyaSmartPTZManager *)manager isOpen:(BOOL)isOpen;
参数说明
参数 | 说明 |
---|---|
manager | 云台机管理类 |
isOpen | YES:打开了巡航开关 NO:关闭了巡航开关 |
接口说明
巡航模式发生了变化。
- (void)didUpdateCruiseMode:(TuyaSmartPTZManager *)manager currentCruiseMode:(TuyaSmartPTZControlCruiseMode)currentCruiseMode;
参数说明
参数 | 说明 |
---|---|
manager | 云台机管理类 |
currentCruiseMode | TuyaSmartPTZControlCruiseModePanoramic,当前为全景巡航模式;TuyaSmartPTZControlCruiseModeCollectionPoint,当前为收藏点巡航模式 |
接口说明
巡航的时间模式发生了变化。
- (void)didUpdateCruiseTimeMode:(TuyaSmartPTZManager *)manager currentTimeMode:(TuyaSmartPTZControlCruiseTimeMode)currentTimeMode;
参数说明
参数 | 说明 |
---|---|
manager | 云台机管理类 |
currentTimeMode | TuyaSmartPTZControlCruiseTimeModeAllDay,当前为全天巡航;TuyaSmartPTZControlCruiseTimeModeCustom,当前为自定义时间巡航 |
接口说明
巡航时间发生了变化。
- (void)didUpdateCruiseTimeModeTime:(TuyaSmartPTZManager *)manager startTime:(NSString *)startTime endTime:(NSString *)endTime;
参数说明
参数 | 说明 |
---|---|
manager | 云台机管理类 |
startTime | 最新的开始时间 |
endTime | 最新的结束时间 |
接口说明
移动追踪的开关状态发生了变化。
- (void)didUpdateMotionTrackingState:(TuyaSmartPTZManager *)manager isOpen:(BOOL)isOpen;
参数说明
参数 | 说明 |
---|---|
manager | 云台机管理类 |
isOpen | YES:打开了移动追踪 NO:关闭了移动追踪 |
云台相关错误码
错误码 | 说明 |
---|---|
-2001 | 全景巡航、收藏点巡航中不能添加收藏点 |
-2002 | 收藏点小于2个,无法开启收藏点巡航 |
该内容对您有帮助吗?
是意见反馈该内容对您有帮助吗?
是意见反馈