ISAPI遠端裝置維護模組流程

2021-10-10 02:48:59 字數 3928 閱讀 1300

#include #include #include "windows.h"

#include "hcnetsdk.h"

using namespace std;

void main() ;

strulogininfo.buseasynlogin = 0; //同步登入方式

strcpy(strulogininfo.sdeviceaddress, "192.0.0.64"); //裝置ip位址

strulogininfo.wport = 80; //裝置http埠

strcpy(strulogininfo.susername, "admin"); //裝置登入使用者名稱

strcpy(strulogininfo.spassword, "abcd1234"); //裝置登入密碼

//裝置資訊, 輸出引數

net_dvr_deviceinfo_v40 strudeviceinfov40 = ;

luserid = net_dvr_login_v40(&strulogininfo, &strudeviceinfov40);

if (luserid < 0)

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;

strustoptime.dwhour = 9;

strustoptime.dwminute = 10;

strustoptime.dwsecond = 0;

//---------------------------------------

//查詢日誌

int lfindhandle = net_dvr_finddvrlog_v30(luserid, 0, 0, 0, &strustarttime, &strustoptime, false);

if(lfindhandle < 0)

net_dvr_log_v30 strulog;

while(true)

else if(result == net_dvr_file_success)

;printf("log:%04d-%02d-%02d %02d:%02d:%02d\n", strulog.strlogtime.dwyear, strulog.strlogtime.dwmonth, strulog.strlogtime.dwday, \

strulog.strlogtime.dwhour,strulog.strlogtime.dwminute, strulog.strlogtime.dwsecond);

}else if(result == net_dvr_file_nofind || result == net_dvr_nomorefile)

else

}//停止日誌查詢

if(lfindhandle > 0)

//登出使用者

net_dvr_logout(luserid);

//釋放sdk資源

net_dvr_cleanup();

return;

}

isapi回放模組流程

#include #include #include "windows.h"

#include "hcnetsdk.h"

using namespace std;

typedef hwnd (winapi *procgetconsolewindow)();

procgetconsolewindow getconsolewindow;

void main() ;

strulogininfo.buseasynlogin = 0; //同步登入方式

strcpy(strulogininfo.sdeviceaddress, "192.0.0.64"); //裝置ip位址

strulogininfo.wport = 80; //裝置http埠

strcpy(strulogininfo.susername, "admin"); //裝置登入使用者名稱

strcpy(strulogininfo.spassword, "abcd1234"); //裝置登入密碼

//裝置資訊, 輸出引數

net_dvr_deviceinfo_v40 strudeviceinfov40 = ;

luserid = net_dvr_login_v40(&strulogininfo, &strudeviceinfov40);

if (luserid < 0)

hwnd hwnd = getconsolewindow(); //獲取視窗控制代碼

net_dvr_vod_para struvodpara=;

struvodpara.dwsize=sizeof(struvodpara);

struvodpara.struidinfo.dwsize=sizeof(net_dvr_stream_info);

struvodpara.struidinfo.dwchannel=1;

struvodpara.hwnd=hwnd;

struvodpara.strubegintime.dwyear = 2013;

struvodpara.strubegintime.dwmonth = 6;

struvodpara.strubegintime.dwday = 14;

struvodpara.strubegintime.dwhour = 9;

struvodpara.strubegintime.dwminute = 0;

struvodpara.strubegintime.dwsecond =0;

struvodpara.struendtime.dwyear = 2013;

struvodpara.struendtime.dwmonth = 6;

struvodpara.struendtime.dwday = 14;

struvodpara.struendtime.dwhour = 10;

struvodpara.struendtime.dwminute = 7;

struvodpara.struendtime.dwsecond = 0;

//---------------------------------------

//按時間回放

int hplayback;

hplayback = net_dvr_playbackbytime_v40(luserid, &struvodpara);

if(hplayback < 0)

//---------------------------------------

//開始

if(!net_dvr_playbackcontrol_v40(hplayback, net_dvr_playstart,null, 0, null,null))

sleep(15000); //millisecond

if(!net_dvr_stopplayback(hplayback))

//登出使用者

net_dvr_logout(luserid);

//釋放sdk資源

net_dvr_cleanup();

return;

}

裝置的管理與維護

2006 04 17 20 09 02 裝置的管理與維護 一 裝置的管理和維護的目的和意義 注塑機是工廠起 當家 作用的裝置,管理和維護質量的好壞,直接關係到裝置能否長期保持良好的工作精度和效能,關係到液壓裝置的故障率和作業率,關係到加工產品的質量,關係到工廠的生產效率和經濟效益的提高 應本著抓好 ...

裝置的管理與維護

2006 04 17 20 09 02 裝置的管理與維護 一 裝置的管理和維護的目的和意義 注塑機是工廠起 當家 作用的裝置,管理和維護質量的好壞,直接關係到裝置能否長期保持良好的工作精度和效能,關係到液壓裝置的故障率和作業率,關係到加工產品的質量,關係到工廠的生產效率和經濟效益的提高 應本著抓好 ...

pos裝置維護的收穫

整個開發流程 首先根據需求寫service和serviceimpl,以及controller,接著做出前端的頁面以及寫出js。在開發過程中找bug的幾種方法 如果程式出了問題,首先進頁面f12,看js是否報錯,以及檢視js裡面的變數,是否是想要的。在排除了js的問題之後,如果還是得不到我們想要的結果...