【文件属性】:
文件名称:远程设备维护模块的示例代码-catia v5 零件库
文件大小:1.85MB
文件格式:PDF
更新时间:2024-07-12 01:24:26
海康
4.5 远程设备维护模块的示例代码
相关模块流程图
日志查询
#include
#include
#include "Windows.h"
#include "HCNetSDK.h"
using namespace std;
void main() {
//---------------------------------------
// 初始化
NET_DVR_Init();
//设置连接时间与重连时间
NET_DVR_SetConnectTime(2000, 1);
NET_DVR_SetReconnect(10000, true);
//---------------------------------------
// 注册设备
LONG lUserID;
NET_DVR_DEVICEINFO_V30 struDeviceInfo;
lUserID = NET_DVR_Login_V30("192.0.0.64", 8000, "admin", "12345", &struDeviceInfo);
if (lUserID < 0)
{
printf("Login error, %d\n", NET_DVR_GetLastError());
NET_DVR_Cleanup();
return;
}
NET_DVR_TIME struStartTime, struStopTime;
struStartTime.dwYear = 2011;
struStartTime.dwMonth = 3;
struStartTime.dwDay = 2;
struStartTime.dwHour = 9;
struStartTime.dwMinute = 0;
struStartTime.dwSecond =0;
struStopTime.dwYear = 2011;
struStopTime.dwMonth = 3;
struStopTime.dwDay = 2;