云台垂直业务

更新时间:2024-03-04 08:33:05

云台作为网络摄像机(IPC)一个重要的功能点,一直被广泛使用在各类 IPC 设备上。而对于云台业务的接入,一直缺少一个垂直化封装,给开发者对接带来了困难。为了解决这个问题,让开发者更快更方便的接入云台功能,涂鸦对云台相关功能进行了封装。接口功能包括:

  • 云台控制
  • 焦距调整
  • 收藏点
  • 巡航
  • 移动追踪
  • 预设点

功能介绍

云台的相关功能全部通过管理类来实现。

云台管理类获取

示例代码

Objective C:

ThingSmartPTZManager *ptzManager = [[ThingSmartPTZManager alloc] initWithDeviceId:devId];

Swift:

let ptzManager = ThingSmartPTZManager.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是字符串类型,和 ThingSmartPTZControlDirection 一一对应。示例格式:["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:(ThingSmartPTZControlDirection)direction
         success:(ThingSuccessID)success
         failure:(ThingFailureError)failure;

参数说明

参数 说明
direction 方向的枚举值,参考 ThingSmartPTZControlDirection 定义
success 成功的回调
failure 失败的回调

ThingSmartPTZControlDirection 枚举

描述
ThingSmartPTZControlDirectionUp
ThingSmartPTZControlDirectionRightUp 右上
ThingSmartPTZControlDirectionRight
ThingSmartPTZControlDirectionRightDown 右下
ThingSmartPTZControlDirectionDown
ThingSmartPTZControlDirectionLeftDown 左下
ThingSmartPTZControlDirectionLeft
ThingSmartPTZControlDirectionLeftUp 左上

示例代码

Objective C:

[self.ptzManager startPTZWithDirection:ThingSmartPTZControlDirectionRight 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:(ThingSuccessID)success
                   failure:(ThingFailureError)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:(ThingSuccessID)success
         failure:(ThingFailureError)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:(ThingSuccessID)success
                          failure:(ThingFailureError)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")
})

收藏点

收藏点模型

为了方便收藏点的操作,将其信息封装成了 ThingCameraCollectionPointModel

属性说明

属性 说明
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:(ThingSuccessList)success failure:(ThingFailureError)failure;

参数说明

参数 说明
success 成功的回调,返回收藏点模型 ThingCameraCollectionPointModel 列表
failure 失败的回调

示例代码

Objective C:

[self.ptzManager requestCollectionPointListWithSuccess:^(NSArray *list) {
    for (ThingCameraCollectionPointModel *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? ThingCameraCollectionPointModel
            let pointName = pointModel?.name ?? ""
            print(pointName)
        }
    }
}, failure: { (error) in

})

接口说明

添加收藏点。

- (void)addCollectionPointWithName:(NSString *)name success:(ThingSuccessHandler)success failure:(ThingFailureError)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<ThingCameraCollectionPointModel *> *)models success:(ThingSuccessHandler)success failure:(ThingFailureError)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:(ThingCameraCollectionPointModel *)model name:(NSString *)name success:(ThingSuccessHandler)success failure:(ThingFailureError)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:(ThingCameraCollectionPointModel *)model success:(ThingSuccessHandler)success failure:(ThingFailureError)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.")
}

接口说明

查询当前的巡航模式。

- (ThingSmartPTZControlCruiseMode)getCurrentCruiseMode;

返回值说明

返回值类型 说明
ThingSmartPTZControlCruiseMode 巡航模式枚举

巡航模式枚举 ThingSmartPTZControlCruiseMode

描述
ThingSmartPTZControlCruiseModePanoramic 全景巡航
ThingSmartPTZControlCruiseModeCollectionPoint 收藏点巡航

示例代码

Objective C:

ThingSmartPTZControlCruiseMode cruiseModel = self.ptzManager.getCurrentCruiseMode;
if (cruiseModel == ThingSmartPTZControlCruiseModePanoramic) {
    NSLog(@"Panoramic mode");
} else {
    NSLog(@"Collection point mode");
}

Swift:

let cruiseModel = ptzManager!.getCurrentCruiseMode()
if cruiseModel == .panoramic {
    print("Panoramic mode.")
} else {
    print("Collection point mode.")
}

接口说明

查询当前的巡航时间模式。

- (ThingSmartPTZControlCruiseTimeMode)getCurrentCruiseTimeMode;

返回值说明

返回值类型 说明
ThingSmartPTZControlCruiseTimeMode 巡航时间模式枚举

巡航时间模式枚举 ThingSmartPTZControlCruiseTimeMode

描述
ThingSmartPTZControlCruiseTimeModeAllDay 全天巡航
ThingSmartPTZControlCruiseTimeModeCustom 自定义时间巡航

示例代码

Objective C:

ThingSmartPTZControlCruiseTimeMode timeModel = self.ptzManager.getCurrentCruiseTimeMode;
if (timeModel == ThingSmartPTZControlCruiseTimeModeAllDay) {
    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.")
}

接口说明

查询当前的巡航状态。

- (ThingSmartPTZControlCruiseState)getCurrentCruiseState;

返回值说明

返回值类型 说明
ThingSmartPTZControlCruiseState 巡航状态枚举

巡航状态枚举 ThingSmartPTZControlCruiseState

描述
ThingSmartPTZControlCruiseStatePanoramic 全景巡航
ThingSmartPTZControlCruiseStateCollectionPoint 收藏点巡航
ThingSmartPTZControlCruiseStateNone 非巡航状态

示例代码

Objective C:

ThingSmartPTZControlCruiseState cruiseState = self.ptzManager.getCurrentCruiseState;
if (cruiseState == ThingSmartPTZControlCruiseStatePanoramic) {
    NSLog(@"Panoramic mode state.");
} else if (cruiseState == ThingSmartPTZControlCruiseStateCollectionPoint) {
    NSLog(@"Collection point mode state.");
} else if (cruiseState == ThingSmartPTZControlCruiseStateNone) {
    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:

ThingSmartPTZControlCruiseTimeMode timeModel = self.ptzManager.getCurrentCruiseTimeMode;
if (timeModel == ThingSmartPTZControlCruiseTimeModeCustom) {
    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:(ThingSuccessID)success failure:(ThingFailureError)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:(ThingSmartPTZControlCruiseMode)mode success:(ThingSuccessID)success failure:(ThingFailureError)failure;

参数说明

参数 说明
mode ThingSmartPTZControlCruiseModePanoramic:全景巡航
ThingSmartPTZControlCruiseModeCollectionPoint:收藏点巡航
success 成功的回调
failure 失败的回调

示例代码

Objective C:

[self.ptzManager setCruiseMode:ThingSmartPTZControlCruiseModePanoramic 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:(ThingSmartPTZControlCruiseTimeMode)timeMode success:(ThingSuccessHandler)success failure:(ThingFailureError)failure;

参数说明

参数 说明
timeMode ThingSmartPTZControlCruiseTimeModeAllDay:全天巡航
ThingSmartPTZControlCruiseTimeModeCustom:自定义时间巡航
success 成功的回调
failure 失败的回调

示例代码

Objective C:

[self.ptzManager setCruiseTimeMode:ThingSmartPTZControlCruiseTimeModeCustom success:^{
    NSLog(@"success");
} failure:^(NSError *error) {
    NSLog(@"failure");
}];

Swift:

ptzManager?.setCruiseTimeMode(.custom, success: {
    print("success")
}, failure: { (error) in
    print("failure")
})

接口说明

设置巡航的状态

- (void)setCruiseState:(ThingSmartPTZControlCruiseState)state success:(ThingSuccessHandler)success failure:(ThingFailureError)failure;

参数说明

参数 说明
state ThingSmartPTZControlCruiseStatePanoramic:全景巡航
ThingSmartPTZControlCruiseStateCollectionPoint:收藏点巡航
ThingSmartPTZControlCruiseStateNone:非巡航状态
success 成功的回调
failure 失败的回调

示例代码

Objective C:

[self.ptzManager setCruiseState:ThingSmartPTZControlCruiseStateCollectionPoint 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:(ThingSuccessHandler)success failure:(ThingFailureError)failure;

参数说明

参数 说明
startTime 开始时间,格式:“00:00”
endTime 结束时间,格式:“00:00”
success 成功的回调
failure 失败的回调

示例代码

Objective C:

ThingSmartPTZControlCruiseTimeMode currentTimeModel = self.ptzManager.getCurrentCruiseTimeMode;
if (currentTimeModel == ThingSmartPTZControlCruiseTimeModeCustom) {
    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:(ThingSuccessHandler)success failure:(ThingFailureError)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:(ThingSuccessID)success failure:(ThingFailureError)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:(ThingSuccessID)success failure:(ThingFailureError)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")
})

代理回调

云台机管理类 ThingSmartPTZManager 支持代理设置。

属性说明

@property (nonatomic, weak) id<ThingSmartPTZManagerDeletate> delegate;

接口说明

操作了收藏点

- (void)collectionPointAction:(ThingSmartPTZManager *)manager actionType:(NSInteger)type;

参数说明

参数 说明
manager 云台机管理类
type value:
1:新增了收藏点
2:删除了收藏点
3:跳到指定的收藏点

接口说明

巡航的开关状态发生了变化。

- (void)didUpdateCruiseSwitchState:(ThingSmartPTZManager *)manager isOpen:(BOOL)isOpen;

参数说明

参数 说明
manager 云台机管理类
isOpen YES:打开了巡航开关
NO:关闭了巡航开关

接口说明

巡航模式发生了变化。

- (void)didUpdateCruiseMode:(ThingSmartPTZManager *)manager currentCruiseMode:(ThingSmartPTZControlCruiseMode)currentCruiseMode;

参数说明

参数 说明
manager 云台机管理类
currentCruiseMode ThingSmartPTZControlCruiseModePanoramic,当前为全景巡航模式;ThingSmartPTZControlCruiseModeCollectionPoint,当前为收藏点巡航模式

接口说明

巡航的时间模式发生了变化。

- (void)didUpdateCruiseTimeMode:(ThingSmartPTZManager *)manager currentTimeMode:(ThingSmartPTZControlCruiseTimeMode)currentTimeMode;

参数说明

参数 说明
manager 云台机管理类
currentTimeMode ThingSmartPTZControlCruiseTimeModeAllDay,当前为全天巡航;ThingSmartPTZControlCruiseTimeModeCustom,当前为自定义时间巡航

接口说明

巡航时间发生了变化。

- (void)didUpdateCruiseTimeModeTime:(ThingSmartPTZManager *)manager startTime:(NSString *)startTime endTime:(NSString *)endTime;

参数说明

参数 说明
manager 云台机管理类
startTime 最新的开始时间
endTime 最新的结束时间

接口说明

移动追踪的开关状态发生了变化。

- (void)didUpdateMotionTrackingState:(ThingSmartPTZManager *)manager isOpen:(BOOL)isOpen;

参数说明

参数 说明
manager 云台机管理类
isOpen YES:打开了移动追踪
NO:关闭了移动追踪

错误码

云台相关错误码

错误码 说明
-2001 全景巡航、收藏点巡航中不能添加收藏点
-2002 收藏点小于2个,无法开启收藏点巡航