当前位置:网站首页>Easycvr implementation of adding preset point position function of Dahua equipment
Easycvr implementation of adding preset point position function of Dahua equipment
2022-06-24 00:05:00 【Tsingsee green rhino video】
As we all know EasyCVR Support pan tilt control , The PTZ can be controlled remotely , Right now we're talking about EasyCVR Equipment docking for new development , If you use UOB equipment , We want to be able to pass Dahua's SDK Get all preset points .
In the development of this function , We use CLIENT_QueryRemotDevState The function is used to obtain the position of the preset point , call CLIENT_QueryRemotDevState Function time , The return value of this function is always FALSE( Acquisition failure ), The return value of the function is 7.
Find... In UOB documents 7 representative :“ Illegal user parameter ”( The figure below ).
Therefore, it has been stated in the Dahua document that the parameters are illegal ,CLIENT_QueryRemotDevState Function has 7 Parameters : Handle of the login device respectively 、 Query information type 、 Channel number 、 Output pBuf、 Cache length 、 Output parameters and waiting time ( The following figure shows the official document ).
Let's take a parameter analysis :
The first parameter is the login handle , This parameter must be correct , If there is an error, it will not return 7.
The second parameter is the type of information to query , We need to query the preset bit of the device , So I can only fill in :DH_DEVSTATE_PTZ_PRESET_LIST
The third parameter is the channel number , Because it's directly connected to the camera , So for 0;
The fourth parameter is the output parameter , And according to the second parameter , Corresponding NET_PTZ_PRESET_LIST Structure ;
The fifth parameter is the size of the fourth parameter :sizeof(NET_PTZ_PRESET_LIST) To calculate the size ;
The sixth parameter is the waiting time , The default is 3000ms;
So we know from the analysis parameters , If there is an error, it is most likely the problem of the fourth parameter ( The structure of the fourth parameter is as follows ):
Looking at this structure, we know that there are four values , Finally, the question becomes clear , Add these four values . Then the directly modified code :
Finally, one more thing to pay special attention to , Memory needs to be allocated to pstuPtzPorsetList.
边栏推荐
- Revit API: schedule viewschedule
- .NET 中的 Worker Service 介绍
- Generative countermeasure networks (Gans) and variants
- Complete open source project poetry bar app
- Goodbye, 2020, this bowl of poisonous chicken soup, I'll dry it first
- Complete collection of development environment configuration -- Visual Studio 2022 installation
- 重载(Overload)和重写(Override)的区别?
- How to take the PMP Exam agile on June 25? Share your troubles
- B2B transaction management system of electronic components industry: improve the data-based driving ability and promote the growth of enterprise sales performance
- Startup process analysis of APP performance optimization
猜你喜欢

I was cheated by my colleagues to work overtime on weekends. I haven't seen redis used like this...

Improvement of DC power distribution with open hall current sensor

NLP工程师是干什么的?工作内容是什么?

Dot and cross product

点乘和叉乘

2. camera calibration

测试 - 用例篇 - 细节狂魔

【红绿灯识别】基于matlab GUI红绿灯识别【含Matlab源码 1908期】

Andorid 开发艺术探索笔记(2),跨平台小程序开发框架

Complete open source project poetry bar app
随机推荐
docker redis集群配置
1. < tag dynamic programming and path combination problem > lt.62 Different paths + lt.63 Different paths II
Don't miss | Huawei's internal data - Successful Project Management PPT (page 123)
extern、struct等关键字
matlab实现对图像批量重命名
SQL Server 中 GO 的用法
NLP-D58-nlp比赛D27&刷题D14&读论文&mathtype
I was cheated by my colleagues to work overtime on weekends. I haven't seen redis used like this...
What is the difference between overload and override?
Leetcode - linked list written test questions
医疗是什么?AI医疗概念解析AI
String s = new String(“xyz“) 创建了几个字符串对象?
[proteus simulation] example of T6963C driving pg12864 (with Chinese and English display)
Revit API:明细表 ViewSchedule
Digital property management has become a trend. How can traditional property companies achieve digital butterfly change through transformation?
First week of summer vacation
CPU取指到发出控制、微程序控制原理详细过程
量化投资模型——高频交易做市模型相关(Avellaneda & Stoikov’s)研究解读&代码资源
生成所有可能的二叉搜索树
SAVE: 软件分析验证和测试平台