PARK-SDK(Linux版本)主要功能開發(fā)指導(dǎo)說明(宇視科技)_第1頁
PARK-SDK(Linux版本)主要功能開發(fā)指導(dǎo)說明(宇視科技)_第2頁
PARK-SDK(Linux版本)主要功能開發(fā)指導(dǎo)說明(宇視科技)_第3頁
PARK-SDK(Linux版本)主要功能開發(fā)指導(dǎo)說明(宇視科技)_第4頁
PARK-SDK(Linux版本)主要功能開發(fā)指導(dǎo)說明(宇視科技)_第5頁
已閱讀5頁,還剩9頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

PARK_SDK(Linux版本)主要功能開發(fā)指導(dǎo)說明目錄一、文檔相關(guān)模塊介紹 21.1.過車數(shù)據(jù)獲取流程 21.2 .主要接口說明 21.3.過車數(shù)據(jù)結(jié)構(gòu)體說明 31.4.結(jié)構(gòu)體主要成員說明 31.4.1.號牌號碼 31.4.2.號牌類型 31.4.3.車身顏色 41.4.4.車輛類型 41.4.5.車身顏色 41.4.6.車輛廠牌 4二、Demo模塊介紹 72.1初始化、日志設(shè)置、登錄(Linux_main.c) 72.1.1.初始化(IMOS_MW_Initiate()函數(shù)) 72.1.2.日志設(shè)置(IMOS_MW_SetLog()函數(shù)) 82.1.3.設(shè)備登錄(IMOS_MW_Login()函數(shù)) 8調(diào)用登錄接口,出參返回 82.2.照片流啟流(Linux_main.c) 82.2.1.啟流(IMOS_MW_SetPicStreamDataCallback()函數(shù)) 8設(shè)備登錄成功后,使用設(shè)備標(biāo)識 82.2.2.回調(diào)實(shí)現(xiàn)(此接口由SDK定義,調(diào)用方實(shí)現(xiàn)) 92.3.設(shè)備控制(Linux_main.c) 102.3.3.輸出開關(guān)量-控制開閘(IMOS_MW_SetOutputSwitchStatusCfg()函數(shù)) 10三、Demo操作說明 103.1編譯運(yùn)行 113.2登陸設(shè)備 113.3選則操作 113.3.1.啟流 113.3.2.手動抓拍 12一、文檔相關(guān)模塊介紹1.1.過車數(shù)據(jù)獲取流程.主要接口說明1.3.過車數(shù)據(jù)結(jié)構(gòu)體說明1.4.結(jié)構(gòu)體主要成員說明1.4.1.號牌號碼CHARtagMwUniviewMultiProtocolHeader::szCarPlate[IMOS_MW_CAR_PLATE_MAX_LEN]號牌號碼:不能自動識別的用"-"表示1.4.2.號牌類型LONGtagMwUniviewMultiProtocolHeader::lPlateType號牌種類(按GA24.7編碼):1-大型汽車2-小型汽車3-使館汽車4-領(lǐng)館汽車5-境外汽車6-外籍汽車7-兩、三輪摩托車號牌8-輕便摩托車9-使館摩托車10-領(lǐng)館摩托車11-境外摩托車12-外籍摩托車13-農(nóng)用運(yùn)輸車14-拖拉機(jī)15-掛車16-教練汽車17-教練摩托車18-試驗(yàn)汽車19-試驗(yàn)?zāi)ν熊?0-臨時(shí)入境汽車21-臨時(shí)入境摩托車22-臨時(shí)行駛車23-警用汽車24-警用摩托25-原農(nóng)機(jī)號牌26-香港入出境車27-澳門入出境車28-中型車31-武警號牌32-軍隊(duì)號牌33-行人34-非機(jī)動車51-大型新能源車牌52-小型新能源車牌99-其它1.4.3.車身顏色LONGtagMwUniviewMultiProtocolHeader::lPlateColor號牌顏色:0-白色1-黃色2-藍(lán)色3-黑色4-其它顏色5-綠色6-紅色7-黃綠雙色8-漸變綠色1.4.4.車輛類型LONGtagMwUniviewMultiProtocolHeader::lVehicleType車輛類型0-未知,1-小型車2-中型車3-大型車4-其它5-行人6-二輪車7-三輪車8-摩托車9-拖拉機(jī)10-農(nóng)用貨車11-轎車12-SUV13-面包車14-小貨車15-中巴車16-大客車17-大貨車18-皮卡車19-MPV商務(wù)車20-非機(jī)動車1.4.5.車身顏色CHARtagMwUniviewMultiProtocolHeader::cVehicleColor車身顏色:A:白,B:灰,C:黃,D:粉,E:紅,F(xiàn):紫,G:綠,H:藍(lán),I:棕,J:黑,K:橙,L:青,M:銀,N:銀白,Z:其他1.4.6.車輛廠牌CHARtagMwUniviewMultiProtocolHeader::szVehicleBrand[IMOS_MW_CAR_VEHICLE_BRAND_LEN]車輛廠牌編碼(自行編碼)考慮到字節(jié)對齊定義長度為4,實(shí)際使用長度為2備注:攝像機(jī)抓拍圖片上字符疊加有汽車的品牌和具體型號,比如“大眾”,“奧迪”,IMOS_MW_MULTI_UNIVIEW_PROTOCOL_HEADER_S內(nèi)szVehicleBrand字段用“A0”、“D6”等字符串表示的車輛品牌例如:A0(奧迪),D6(大眾){"奧迪","阿爾法羅米歐","安凱客車","安源客車","阿斯頓馬丁"},{"奔馳","北京汽車","布嘉迪","別克","賓利","寶馬","保時(shí)捷","本田","奔騰","比亞迪",0,0,0,0,0,0,0,"標(biāo)致","北汽威旺","寶駿","北汽幻速","寶石","北京","北奔重卡","北方客車","奔馬","北京制造"},{"長安","長城","長豐","川汽野馬","昌河","長安跨越","長安客車","春蘭"},{"東風(fēng)","大發(fā)","東風(fēng)風(fēng)神","帝豪","東南","道奇","大眾","大宇","東風(fēng)柳汽","大運(yùn)",0,0,0,0,0,0,0,"東風(fēng)客車","東風(fēng)日產(chǎn)柴","東方紅","東風(fēng)揚(yáng)子江","DS"},{0},{"飛碟","法拉利","豐田","福特","福田","菲亞特","福迪","福田時(shí)代","福田客車","豐田銳志",0,0,0,0,0,0,0,"豐田客車"},{"GMC","廣汽","廣汽日野"},{"哈飛","黃海","悍馬","海馬","華普","紅旗","華泰","皇冠","華菱","哈弗",0,0,0,0,0,0,0,"海格","海格客車","紅巖","黃??蛙?,"匯眾","衡山客車"},{0},{"吉奧","捷豹","金杯","江淮","吉利","九龍汽車","吉普J(rèn)eep","江鈴","金龍","金牛星",0,0,0,0,0,0,0,"江鈴客車","金旅","金龍客車","金旅客車","江淮客車","江環(huán)","吉姆西"},{"凱迪拉克","克萊斯勒","柯尼賽格","開瑞","康迪","凱馬"},{"蘭博基尼","力帆","陸風(fēng)","路虎","蓮花","蓮花汽車","林肯","雷克薩斯","鈴木","雷諾",0,0,0,0,0,0,0,"勞斯萊斯","獵豹","理念","陸地方舟","聯(lián)合卡車"},{"邁巴赫","邁凱倫","迷你MINI","瑪莎拉蒂","馬自達(dá)","歐寶","謳歌",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"MG"},{"南京依維柯","納智捷","南駿","南車時(shí)代"},{0},{"帕加尼","中順"},{"全球鷹","奇瑞","起亞","啟辰","青年客車"},{"日產(chǎn)","瑞麒","榮威"},{"薩博","斯巴魯","雙環(huán)","上海英倫","世爵","斯柯達(dá)","三菱","雙龍","陜汽","上汽大通",0,0,0,0,0,0,0,"紳寶","時(shí)風(fēng)","十通","三環(huán)十通","三一重工","山東五征","申龍客車","申沃客車","思銘","斯堪尼亞","SMART","少林客車"},{"唐駿","特斯拉","同心客車","騰勢"},{0},{0},{"沃爾沃","威麟","五菱汽車","威茲曼","五十鈴","五菱","五征","王牌神風(fēng)"},{"現(xiàn)代","雪佛蘭","夏利","雪鐵龍","西雅特"},{"英菲尼迪","一汽","依維柯","英田","一汽柳特","遠(yuǎn)征","躍進(jìn)","宇通客車","馭勝"},{"中華","眾泰","中興","中國重汽","重汽王牌","中通","知豆"}回調(diào)函數(shù)上報(bào)結(jié)構(gòu)體NETDEV_PIC_DATA_S,中l(wèi)VehicleBody對應(yīng)的車輛外型暫時(shí)未實(shí)現(xiàn)填充值為0;備注:獲取過車數(shù)居,若現(xiàn)場開啟防火墻,請開放53000-53999端口二、Demo模塊介紹2.1初始化、日志設(shè)置、登錄(Linux_main.c)2.1.1.初始化(IMOS_MW_Initiate()函數(shù))/*SDK初始化:只需初始化一次*/ulRet=IMOS_MW_Initiate();if(ERR_COMMON_SUCCEED!=ulRet){printf("Initiatefailed,returnvalue:%lu.\n",ulRet); return0;}else{printf("Initiatesucceed.\n");}2.1.2.日志設(shè)置(IMOS_MW_SetLog()函數(shù))/*SDK設(shè)置日志*/ulRet=IMOS_MW_SetLog(IMOS_SDK_LOG_DEBUG,"./",5*100);if(ERR_COMMON_SUCCEED!=ulRet){printf("IMOS_MW_SetLogfailed,returnvalue:%lu.\n",ulRet); }else{printf("IMOS_MW_SetLogsucceed.\n");}2.1.3.設(shè)備登錄(IMOS_MW_Login()函數(shù))調(diào)用登錄接口,出參返回szUserID為登錄設(shè)備唯一標(biāo)識。/*SDK設(shè)備登錄,外部端口80(SDK訪問設(shè)備端口80、81、554)*/ulRet=IMOS_MW_Login(szUserName,szPassword,szDeviceIP,80,szUserID);if(ERR_COMMON_SUCCEED!=ulRet){printf("IMOS_MW_Loginfailed,returnvalue:%lu.\n",ulRet);return0;}else{printf("Loginsucceed,deviceIP:%s.\n",szDeviceIP);gbLogin=BOOL_TRUE;}2.2.照片流啟流(Linux_main.c)2.2.1.啟流(IMOS_MW_SetPicStreamDataCallback()函數(shù))設(shè)備登錄成功后,使用設(shè)備標(biāo)識szUserID作為入?yún)?,進(jìn)行該設(shè)備啟流。/*SDK開啟照片流(非斷網(wǎng)續(xù)傳方式SDK內(nèi)部端口53000-53999):新接口方式一(啟流+設(shè)置回調(diào)(IMOS_MW_GetPicture))*/case3:{ulRet=IMOS_MW_SetPicStreamDataCallback(szUserID,0,"",(IMOS_MW_TMS_MULTIUSER_PIC_UPLOAD_PF)GetPictureCB,&ulCaptureStreamHandle);if(ERR_COMMON_SUCCEED!=ulRet){printf("Startjpegmediastream1,returnvalue:%lu.\n",ulRet);}else{printf("Startjpegmediastream1succeedhandle[%lu].\n",ulCaptureStreamHandle);}break;}2.2.2.回調(diào)實(shí)現(xiàn)(此接口由SDK定義,調(diào)用方實(shí)現(xiàn))設(shè)備抓拍后,SDK將數(shù)據(jù)通過此接口上報(bào)用戶。此接口由SDK定義,用戶具體實(shí)現(xiàn)。/*Demo過車信息上報(bào)回調(diào)接口實(shí)現(xiàn)*/VOIDGetPictureCB(IMOS_MW_MULTI_UNIVIEW_PROTOCOL_HEADER_S*pstUniviewData,ULONGulStreamHandle){ULONGi=0;FILE*pFile=NULL;CHARszNameBuf[64]={0}; printf("\nStreamHandle:%lu,Capturetime:%s,Carplate:%s.\n",ulStreamHandle,pstUniviewData->szPassTime,pstUniviewData->szCarPlate);for(i=0;i<pstUniviewData->ulPicNumber;i++){IMOS_snprintf(szNameBuf,sizeof(szNameBuf),"./sdcard/%s_%d.jpeg",pstUniviewData->szPassTime,i);pFile=fopen(szNameBuf,"w");printf("Savepath:%s,PicLen:%lu,PData:%p.\n",szNameBuf,pstUniviewData->aulDataLen[i],pstUniviewData->apcData[i]);if(NULL!=pFile){fwrite(pstUniviewData->apcData[i],1,pstUniviewData->aulDataLen[i],pFile);fclose(pFile);}}return;}2.3.設(shè)備控制(Linux_main.c)2.3.3.輸出開關(guān)量-控制開閘(IMOS_MW_SetOutputSwitchStatusCfg()函數(shù))接口控制設(shè)備輸出開關(guān)量,設(shè)備進(jìn)行開閘。關(guān)閘由現(xiàn)場防砸雷達(dá)或其它外設(shè)控制。case15://輸出開關(guān)量(控制開閘){lRet=IMOS_MW_SetOutputSwitchStatusCfg(szUserID);if(lRet<0){printf("SetOutputSwitchStatusCfgfail\n");}else{printf("SetOutputSwitchStatusCfgSucceed\n");}}三、Demo操作說明3.1編譯運(yùn)行[root@localhostDemo]#makecleanCleansuccessful[root@localhostDemo]#make[root@localhostDemo]#./Demo3.2登陸設(shè)備[root@localhostDemo]#./DemoInitiatesucceed.IMOS_MW_GetSDKVersionsucceed,SDKVersion:ITSSDKV122L64SP02T01UNRS_XDLFGD.IMOS_MW_SetLogsucceed.IMOS_MW_SetStatusCallbacksucceed.PleaseinputdeviceIP:192.174.1.225Pleaseinputusername:adminPleaseinputpassword:admin_123DeviceIP:192.174.1.225,Username:admin,Password:admin_123.Loginsucceed,deviceIP:192.174.1.225.3.3選則操作3.3.1.啟流例如啟流:選擇輸入“3”******************************************************************************-1:quit.**00:Showmenu.**01:Showdevice'sbasicinfo.**02:Devicereboot.**03:Startjpegmediastream1new.**04:Startjpegmediastream2old.**05:StartjpegmediastreamPicServer.**06:Stopjpegmediastream.**07:Manualcapture.**08:Exportblack&whitelistfile.

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論