xcPtzControl method
云台控制
deviceId设备序列号 or ip+port
channelIndex 通道号
command云台控制命令
stop0:开始运动 1:停止运动
speed 移动速度
seq 自定义值
return code:0 (无需等待回调,直接返回接口调用结果即可)
Implementation
Future<int> xcPtzControl(
{required String deviceId,
required int channelIndex,
required String szPTZCommand,
required int bStop,
required int nSpeed}) async {
final result = await _api.ptzControl(deviceId, channelIndex, szPTZCommand,
bStop, nSpeed, ApiSeq.instance.getSeq());
if (kDebugMode) {
XCloudResponse.fromOriginResponse(result);
}
return result.param1;
}