Пример #1
0
        /// <summary>
        /// 修改案件
        /// </summary>
        /// <param name="caseInfo">案件信息</param>
        /// <returns>成功返回TRUE,失败返回FALSE</returns>
        public bool MdfCase(CaseInfo caseInfo)
        {
            TVDASDK_CASE_BASE tCaseBase = ModelParser.Convert(caseInfo);

            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, string.Format("IVXSDKProtocol VdaSdk_MdfCase caseID:{0},"
                                                                                                       + "szCaseName:{1},"
                                                                                                       + "szCaseNo:{2},"
                                                                                                       + "dwCaseHappenTime:{3},"
                                                                                                       + "szCaseDescription:{4},"
                                                                                                       + "szCaseHappenAddr:{5},"
                                                                                                       + Environment.NewLine
                                                                                                       , caseInfo.CaseID
                                                                                                       , tCaseBase.szCaseName
                                                                                                       , tCaseBase.szCaseNo
                                                                                                       , tCaseBase.dwCaseHappenTime
                                                                                                       , tCaseBase.szCaseDescription
                                                                                                       , tCaseBase.szCaseHappenAddr
                                                                                                       ));
            bool retVal = IVXSDKProtocol.VdaSdk_MdfCase(caseInfo.CaseID, tCaseBase);

            if (!retVal)
            {
                // 调用失败,抛异常
                CheckError();
            }
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, string.Format("IVXSDKProtocol VdaSdk_MdfCase ret:{0}", retVal));
            return(retVal);
        }
Пример #2
0
        /// <summary>
        /// 摘要播放指定任务单元的视频
        /// </summary>
        /// <param name="taskUnitId">任务单元</param>
        /// <param name="windowHandle">窗口句柄</param>
        /// <param name="dwUserData">用户数据</param>
        /// <returns>-1表示失败,其他值表示返回的摘要播放标示值</returns>
        public int OpenBriefPlay(uint taskUnitId, IntPtr windowHandle, uint dwUserData)
        {
            int nRet = -1;

            TVDASDK_BRIEF_PLAY_INFO ptBriefPlayInfo = new TVDASDK_BRIEF_PLAY_INFO()
            {
                dwVideoTaskUnitID = taskUnitId,
                hPlayWnd          = windowHandle
            };

            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, string.Format("IVXSDKProtocol VdaSdk_OpenBriefPlay taskUnitId:{0}"
                                                                                                       + ",windowHandle:{1}"
                                                                                                       , ptBriefPlayInfo.dwVideoTaskUnitID
                                                                                                       , ptBriefPlayInfo.hPlayWnd
                                                                                                       ));

            nRet = IVXSDKProtocol.VdaSdk_OpenBriefPlay(ref ptBriefPlayInfo, m_BriefPlayPosCB, dwUserData);

            if (nRet == -1)
            {
                CheckError();
            }
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, string.Format("IVXSDKProtocol VdaSdk_OpenBriefPlay ret:{0}"
                                                                                                       , nRet
                                                                                                       ));

            return(nRet);
        }
Пример #3
0
        /// <summary>
        /// 查询下一个案件(遍历接口)
        /// </summary>
        /// <param name="queryHandle">查询标示值</param>
        /// <returns>案件信息</returns>
        public CaseInfo QueryNextCase(Int32 queryHandle)
        {
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol VdaSdk_QueryNextCase lQueryHandle:" + queryHandle);
            TVDASDK_CASE_INFO ptCaseInfo;
            bool retVal = IVXSDKProtocol.VdaSdk_QueryNextCase(queryHandle, out ptCaseInfo);

            CaseInfo caseInfo = null;

            // 不会有SDK调用失败的情况, 因为数据已经全部取到SDK了, 不需要再跟Server交互。所以不需要CheckError

            if (retVal)
            {
                MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, string.Format("IVXSDKProtocol VdaSdk_QueryNextCase ret:{0},"
                                                                                                           + "dwCaseID:{1},"
                                                                                                           + "szCaseHappenAddr:{2},"
                                                                                                           + "dwCaseHappenTime:{3},"
                                                                                                           + "szCaseDescription:{4},"
                                                                                                           + "szCaseName:{5},"
                                                                                                           + "szCaseNo:{6},"
                                                                                                           + Environment.NewLine
                                                                                                           , retVal
                                                                                                           , ptCaseInfo.dwCaseID
                                                                                                           , ptCaseInfo.tGroupBase.szCaseHappenAddr
                                                                                                           , ptCaseInfo.tGroupBase.dwCaseHappenTime
                                                                                                           , ptCaseInfo.tGroupBase.szCaseDescription
                                                                                                           , ptCaseInfo.tGroupBase.szCaseName
                                                                                                           , ptCaseInfo.tGroupBase.szCaseNo
                                                                                                           ));

                caseInfo = ModelParser.Convert(ptCaseInfo);
            }

            return(caseInfo);
        }
Пример #4
0
        /// <summary>
        /// 获取指定案件详细信息
        /// </summary>
        /// <param name="caseID">案件编号</param>
        /// <returns>案件信息</returns>
        public CaseInfo GetCaseByID(UInt32 caseID)
        {
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol VdaSdk_GetCaseByID caseID:" + caseID);
            TVDASDK_CASE_INFO ptCaseInfo;
            bool retVal = IVXSDKProtocol.VdaSdk_GetCaseByID(caseID, out ptCaseInfo);

            if (!retVal)
            {
                // 调用失败,抛异常
                CheckError();
                // 如果不抛异常, 应该是记录不存在, 返回 null
                return(null);
            }

            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, string.Format("IVXSDKProtocol VdaSdk_GetCaseByID ret:{0},"
                                                                                                       + "dwCaseID:{1},"
                                                                                                       + "szCaseHappenAddr:{2},"
                                                                                                       + "dwCaseHappenTime:{3},"
                                                                                                       + "szCaseDescription:{4},"
                                                                                                       + "szCaseName:{5},"
                                                                                                       + "szCaseNo:{6},"
                                                                                                       + Environment.NewLine
                                                                                                       , retVal
                                                                                                       , ptCaseInfo.dwCaseID
                                                                                                       , ptCaseInfo.tGroupBase.szCaseHappenAddr
                                                                                                       , ptCaseInfo.tGroupBase.dwCaseHappenTime
                                                                                                       , ptCaseInfo.tGroupBase.szCaseDescription
                                                                                                       , ptCaseInfo.tGroupBase.szCaseName
                                                                                                       , ptCaseInfo.tGroupBase.szCaseNo
                                                                                                       ));

            CaseInfo caseInfo = ModelParser.Convert(ptCaseInfo);

            return(retVal ? caseInfo : null);
        }
Пример #5
0
        /// <summary>
        /// 获取播放绘制的闯入闯出区域信息
        /// </summary>
        /// <param name="vodHandle">播放标示句柄</param>
        /// <returns>绘制的闯入闯出区域信息</returns>
        public List <BreakRegion> GetPlayDrawBreakRegion(Int32 vodHandle)
        {
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol VdaSdk_GetPlayDrawBreakRegion lVodHandle:" + vodHandle);
            TVDASDK_DRAW_BREAK_REGION ptDrawBreakRegion = new TVDASDK_DRAW_BREAK_REGION();
            bool retVal = IVXSDKProtocol.VdaSdk_GetPlayDrawBreakRegion(vodHandle, out ptDrawBreakRegion);

            if (!retVal)
            {
                // 调用失败,抛异常
                CheckError();
            }
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, string.Format("IVXSDKProtocol VdaSdk_GetPlayDrawBreakRegion ret:{0},"
                                                                                                       , retVal));
            List <BreakRegion> ret = new List <BreakRegion>();

            for (int i = 0; i < ptDrawBreakRegion.dwBreakRegionNum; i++)
            {
                TVDASDK_SEARCH_BREAK_REGION region = ptDrawBreakRegion.atBreakRegionList[i];
                BreakRegion newregion = new BreakRegion();
                newregion.RegionPointList = new List <System.Drawing.Point>();
                newregion.RegionType      = region.dwRegionType;
                for (int j = 0; j < region.dwPointNum; j++)
                {
                    newregion.RegionPointList.Add(
                        new System.Drawing.Point((int)region.atRegionPointList[j].dwX, (int)region.atRegionPointList[j].dwY)
                        );
                }
                ret.Add(newregion);
            }
            return(ret);
        }
Пример #6
0
        /// <summary>
        /// 获取播放绘制的越界线信息
        /// </summary>
        /// <param name="vodHandle">播放标示句柄</param>
        /// <returns>绘制的越界线信息</returns>
        public List <PassLine> GetPlayDrawPassline(Int32 vodHandle)
        {
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol VdaSdk_GetPlayDrawPassline lVodHandle:" + vodHandle);
            TVDASDK_DRAW_PASSLINE passline = new TVDASDK_DRAW_PASSLINE();
            bool retVal = IVXSDKProtocol.VdaSdk_GetPlayDrawPassline(vodHandle, out passline);

            if (!retVal)
            {
                // 调用失败,抛异常
                CheckError();
            }
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, string.Format("IVXSDKProtocol VdaSdk_GetPlayDrawPassline ret:{0},"
                                                                                                       , retVal));
            List <PassLine> ret = new List <PassLine>();

            for (int i = 0; i < passline.dwPassLineNum; i++)
            {
                TVDASDK_IA_SEARCH_PASS_LINE line = passline.atPassLineList[i];
                ret.Add(new PassLine
                {
                    PassLineType    = line.dwPassLineType,
                    PassLineStart   = new System.Drawing.Point((int)line.tPassLine.tStartPt.dwX, (int)line.tPassLine.tStartPt.dwY),
                    PassLineEnd     = new System.Drawing.Point((int)line.tPassLine.tEndPt.dwX, (int)line.tPassLine.tEndPt.dwY),
                    DirectLineStart = new System.Drawing.Point((int)line.tDirectLine.tStartPt.dwX, (int)line.tDirectLine.tStartPt.dwY),
                    DirectLineEnd   = new System.Drawing.Point((int)line.tDirectLine.tEndPt.dwX, (int)line.tDirectLine.tEndPt.dwY),
                });
            }
            return(ret);
        }
Пример #7
0
        /// <summary>
        /// 设置要显示的本地图片文件
        /// </summary>
        /// <param name="hPdoHandle">标示句柄</param>
        /// <param name="image">图片数据</param>
        /// <returns>成功返回PDO_OK,失败返回错误码</returns>
        public UInt32 Pdo_DisplayPicDataSet(UInt32 hPdoHandle, System.Drawing.Image image)
        {
            IntPtr pPicData      = IntPtr.Zero;
            UInt32 dwPicDataSize = 0;

            if (image != null)
            {
                byte[] bytes = Model.ModelParser.ImageToJpegBytes(image);

                dwPicDataSize = (uint)bytes.Length;
                pPicData      = Marshal.AllocHGlobal(bytes.Length);

                Marshal.Copy(bytes, 0, pPicData, bytes.Length);
            }
            UInt32 dwPicType = (uint)E_PDO_PIC_TYPE.E_PDO_PIC_JPG;//图片格式类型,见E_PDO_PIC_TYPE

            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol Pdo_DisplayPicDataSet hPdoHandle:" + hPdoHandle);
            UInt32 retVal = IVXSDKProtocol.Pdo_DisplayPicDataSet(hPdoHandle, pPicData, dwPicDataSize, dwPicType);

            //if (0 != retVal)
            //{
            //    // 调用失败,抛异常
            //    CheckError();
            //}
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol Pdo_DisplayPicDataSet ret:" + retVal);

            if (pPicData != IntPtr.Zero)
            {
                Marshal.FreeHGlobal(pPicData);
            }

            return(retVal);
        }
Пример #8
0
        public UInt32 Pdo_DrawRectSet(UInt32 hPdoHandle, List <System.Drawing.Rectangle> rects)
        {
            TPDO_DRAW_RECT ptDrawRect = new TPDO_DRAW_RECT();

            ptDrawRect.dwRectNum  = (uint)rects.Count;
            ptDrawRect.atRectList = new TPDO_RECT[Common.PDO_DRAW_RECT_MAXNUM];

            for (int i = 0; i < ptDrawRect.dwRectNum; i++)
            {
                ptDrawRect.atRectList[i] = new TPDO_RECT {
                    dwHeight = (uint)rects[i].Height, dwWidth = (uint)rects[i].Width, dwX = (uint)rects[i].X, dwY = (uint)rects[i].Y
                };
            }

            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol Pdo_DrawRectSet hPdoHandle:" + hPdoHandle);
            UInt32 retVal = IVXSDKProtocol.Pdo_DrawRectSet(hPdoHandle, ref ptDrawRect);

            //if (0 != retVal)
            //{
            //    // 调用失败,抛异常
            //    CheckError();
            //}
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol Pdo_DrawRectSet ret:" + retVal);

            return(retVal);
        }
Пример #9
0
        /// <summary>
        /// 抓图并获取数据
        /// </summary>
        /// <param name="vodHandle">点播标示句柄</param>
        /// <returns>图片</returns>
        public System.Drawing.Image GrabPicture(Int32 vodHandle)
        {
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, string.Format("IVXSDKProtocol VdaSdk_GrabPictureData vodHandle:{0}"
                                                                                                       , vodHandle
                                                                                                       ));
            uint   pictype    = (uint)E_VDA_GRAB_PIC_TYPE.E_GRAB_PIC_BMP;
            uint   buflen     = 10 * 1024 * 1024;
            IntPtr picbuf     = Marshal.AllocHGlobal((int)buflen);
            uint   picdatalen = 0;
            bool   retVal     = IVXSDKProtocol.VdaSdk_GrabPictureData(vodHandle, pictype, picbuf, buflen, out picdatalen);

            if (!retVal)
            {
                // 调用失败,抛异常
                CheckError();
            }
            System.Drawing.Image img = ModelParser.GetImage(picbuf, (int)picdatalen);

            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, string.Format("IVXSDKProtocol VdaSdk_GrabPictureData ret:{0},picdatalen:{1}"
                                                                                                       , retVal
                                                                                                       , picdatalen
                                                                                                       ));
            if (picbuf != IntPtr.Zero)
            {
                Marshal.FreeHGlobal(picbuf);
            }
            return(img);
        }
Пример #10
0
        /// <summary>
        /// 点播指定任务单元的视频
        /// </summary>
        /// <param name="vodInfo">点播信息</param>
        /// <param name="userData">用户数据</param>
        /// <returns>-1表示失败,其他值表示返回的点播标示值。</returns>
        public Int32 PlayBackByTaskUnit(VodInfo vodInfo, UInt32 userData)
        {
            TVDASDK_TASK_UNIT_VOD_INFO info = new TVDASDK_TASK_UNIT_VOD_INFO();

            info.bIsPlayAllFile    = vodInfo.IsPlayAllFile;
            info.dwEndTime         = ModelParser.ConvertLinuxTime(vodInfo.EndTime);
            info.dwStartTime       = ModelParser.ConvertLinuxTime(vodInfo.StartTime);
            info.dwVideoTaskUnitID = vodInfo.VideoTaskUnitID;
            info.hPlayWnd          = vodInfo.PlayWnd;
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, string.Format("IVXSDKProtocol VdaSdk_PlayBackByTaskUnit dwVideoTaskUnitID:{0}"
                                                                                                       + ",hPlayWnd:{1}"
                                                                                                       + ",bIsPlayAllFile:{2}"
                                                                                                       + ",dwStartTime:{3}"
                                                                                                       + ",dwEndTime:{4}"
                                                                                                       , info.dwVideoTaskUnitID
                                                                                                       , info.hPlayWnd
                                                                                                       , info.bIsPlayAllFile
                                                                                                       , info.dwStartTime
                                                                                                       , info.dwEndTime
                                                                                                       ));

            m_TfuncPlayPosCB = TfuncPlayPosCB;

            int retVal = IVXSDKProtocol.VdaSdk_PlayBackByTaskUnit(ref info, m_TfuncPlayPosCB, userData);

            if (-1 == retVal)
            {
                // 调用失败,抛异常
                CheckError();
            }


            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol VdaSdk_PlayBackByTaskUnit ret:" + retVal);
            return(retVal);
        }
Пример #11
0
        /// <summary>
        /// 查询视频下载进度
        /// </summary>
        /// <param name="downloadHandle">下载句柄</param>
        /// <param name="downLoadState">下载状态</param>
        /// <param name="percent">下载进度</param>
        /// <returns>成功返回TRUE,失败返回FALSE</returns>
        public bool GetDownloadVideoPos(Int32 downloadHandle, out VideoDownloadStatus downLoadState, out UInt32 percent)
        {
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, string.Format("IVXSDKProtocol VdaSdk_GetDownloadVideoPos downloadHandle:{0}"
                                                                                                       , downloadHandle
                                                                                                       ));
            uint pwdDownLoadState = 0;
            bool retVal           = IVXSDKProtocol.VdaSdk_GetDownloadVideoPos(downloadHandle, out pwdDownLoadState, out percent);

            if (!retVal)
            {
                // 调用失败,抛异常
                CheckError();
            }

            downLoadState = (VideoDownloadStatus)pwdDownLoadState;

            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, string.Format("IVXSDKProtocol VdaSdk_GetDownloadVideoPos ret:{0}"
                                                                                                       + ",downLoadState:"
                                                                                                       + ",percent:"
                                                                                                       , retVal
                                                                                                       , pwdDownLoadState
                                                                                                       , percent
                                                                                                       ));
            return(retVal);
        }
Пример #12
0
        /// <summary>
        /// 登陆请求
        /// </summary>
        /// <param name="devIp">ip</param>
        /// <param name="devPort">端口</param>
        /// <param name="userName">用户名</param>
        /// <param name="authPwd">密码</param>
        /// <param name="timeOutS">超时时间(秒)</param>
        /// <param name="disConnectd">断开连接通知回调函数</param>
        /// <param name="userData">用户参数</param>
        /// <returns>成功返回TRUE,失败返回FALSE</returns>
        public bool Login(string devIp,
                          UInt16 devPort,
                          string userName,
                          string authPwd,
                          UInt32 timeOutS,
                          UInt32 userData)
        {
            TVDASDK_LOGIN_INFO info = new TVDASDK_LOGIN_INFO();

            info.szDevIp    = devIp;
            info.szAuthPwd  = authPwd;
            info.szUserName = userName;
            info.wDevPort   = devPort;
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, string.Format("IVXSDKProtocol VdaSdk_Login chDevIp:{0},wDevPort:{1},szUserName:{2},szAuthPwd:{3},dwTimeoutS:{4},dwUserData:{5}",
                                                                                                       devIp, devPort, userName, authPwd, timeOutS, userData));

            m_TfuncDisConnectNtfCB = TfuncDisConnectNtfCB;

            bool retVal = IVXSDKProtocol.VdaSdk_Login(info, timeOutS, m_TfuncDisConnectNtfCB, userData);

            if (!retVal)
            {
                // 调用失败,抛异常
                CheckError();
            }

            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol VdaSdk_Login ret:" + retVal);
            return(retVal);
        }
Пример #13
0
        /// <summary>
        /// 获取错误信息
        /// </summary>
        /// <param name="errCode">输出参数,错误码编号</param>
        /// <returns>错误信息</returns>
        public static string GetErrorMsg(UInt32 errCode)
        {
            string retVal = IVXSDKProtocol.VdaSdk_GetErrorMsg(errCode);

            MyLog4Net.ILogExtension.ErrorWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol VdaSdk_GetErrorMsg ret:" + retVal);
            return(retVal);
        }
Пример #14
0
        /// <summary>
        /// 获取目标物图片请求
        /// </summary>
        /// <param name="sessionID">检索唯一编号</param>
        /// <param name="camID">目标所属相机</param>
        /// <param name="taskUnitID">目标所属任务单元</param>
        /// <param name="id">目标编号</param>
        /// <param name="imgURL">请求的图片url</param>
        /// <returns></returns>
        public bool StartGetImage(UInt32 sessionID, UInt32 camID, UInt32 taskUnitID, UInt32 id, string imgURL)
        {
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, string.Format("IVXSDKProtocol VdaSdk_StartGetImage sessionID:{0},camID:{1},taskUnitID:{2},id:{3},imgURL:{4}", sessionID, camID, taskUnitID, id, imgURL));

            bool ret = false;
            TVDASDK_SEARCH_OBJ_ID info = new TVDASDK_SEARCH_OBJ_ID();

            info.dwCameraID   = camID;
            info.dwMoveObjID  = id;
            info.dwTaskUnitID = taskUnitID;

            TVDASDK_SEARCH_GET_IMAGE_FILTER imageFilter = new TVDASDK_SEARCH_GET_IMAGE_FILTER()
            {
                tObjID = info, szURLPath = imgURL
            };

            UInt32 userData = 0;

            ret = IVXSDKProtocol.VdaSdk_StartGetImage(sessionID, imageFilter, userData);

            if (!ret)
            {
                CheckError();
            }

            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol VdaSdk_StartGetImage ret" + ret);

            return(ret);
        }
Пример #15
0
        /// <summary>
        /// 以图搜图检索请求
        /// </summary>
        /// <param name="searchPara">检索条件</param>
        /// <returns>检索唯一编号</returns>
        public UInt32 StartCompareSearchByTaskUnit(SearchPara searchPara)
        {
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol StartCompareSearchByTaskUnit");
            UInt32 searchID = 0;

            TVDASDK_SEARCH_TASK_UNIT_LIST targets = ModelParser.GetTargetList(searchPara);
            TVDASDK_SEARCH_IMAGE_FILTER   filter  = ModelParser.GetCompareSearchFilter(searchPara);

            TVDASDK_SEARCH_RESULT_REQUIREMENT pageAndSortInfo = ModelParser.GetPageAndSortSettings(searchPara);
            UInt32 userData = 0;
            bool   result   = IVXSDKProtocol.VdaSdk_StartImageSearchByTaskUnitID(targets, filter, pageAndSortInfo, userData, ref searchID);

            if (!result)
            {
                CheckError();
            }

            if (filter.tImageInfo.dwImageSize > 0)
            {
                Marshal.FreeHGlobal(filter.tImageInfo.ptImageData);
            }

            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol StartCompareSearchByTaskUnit ret :" + searchID);

            return(searchID);
        }
Пример #16
0
        /// <summary>
        /// 获取登录用户信息
        /// </summary>
        /// <param name="ptUserInfo"></param>
        /// <returns>用户信息</returns>

        /// <summary>
        /// 获取登录中心服务器的版本
        /// </summary>
        /// <returns>版本字符串</returns>
        public string GetServerVersion()
        {
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol VdaSdk_GetServerVersion");
            string retVal = IVXSDKProtocol.VdaSdk_GetServerVersion();

            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol VdaSdk_GetServerVersion ret:" + retVal);
            return(retVal);
        }
Пример #17
0
        /// <summary>
        /// 注销登陆
        /// </summary>
        /// <returns>成功返回TRUE,失败返回FALSE</returns>
        public bool Logout()
        {
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol VdaSdk_Logout");
            bool retVal = IVXSDKProtocol.VdaSdk_Logout();

            if (!retVal)
            {
                // 调用失败,抛异常
                CheckError();
            }
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol VdaSdk_Logout ret:" + retVal);
            return(retVal);
        }
Пример #18
0
        /// <summary>
        /// 清除播放绘制内容
        /// </summary>
        /// <param name="vodHandle">播放标示句柄</param>
        /// <returns></returns>
        public bool ClearPlayDraw(Int32 vodHandle)
        {
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol VdaSdk_ClearPlayDraw lVodHandle:" + vodHandle);
            bool retVal = IVXSDKProtocol.VdaSdk_ClearPlayDraw(vodHandle);

            //if (!retVal)
            //{
            //    // 调用失败,抛异常
            //    CheckError();
            //}
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol VdaSdk_ClearPlayDraw ret:" + retVal);
            return(retVal);
        }
Пример #19
0
        /// <summary>
        /// 判断是否选中摘要运动目标
        /// </summary>
        /// <param name="sessionId">播放标示句柄</param>
        /// <returns>成功返回TRUE,选中,失败返回FALSE,未选中</returns>
        public bool IsSelectBriefMoveObj(int sessionId)
        {
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, string.Format("IVXSDKProtocol VdaSdk_IsSelectBriefMoveObj sessionId:{0}"
                                                                                                       , sessionId
                                                                                                       ));
            bool bRet = IVXSDKProtocol.VdaSdk_IsSelectBriefMoveObj(sessionId);

            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, string.Format("IVXSDKProtocol VdaSdk_IsSelectBriefMoveObj ret:{0}"
                                                                                                       , bRet
                                                                                                       ));

            return(bRet);
        }
Пример #20
0
        /// <summary>
        /// 清除播放绘制内容
        /// </summary>
        /// <param name="hPdoHandle">标示句柄</param>
        /// <returns>成功返回PDO_OK,失败返回错误码</returns>
        public UInt32 Pdo_DrawClear(UInt32 hPdoHandle)
        {
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol Pdo_DrawClear hPdoHandle:" + hPdoHandle);
            UInt32 retVal = IVXSDKProtocol.Pdo_DrawClear(hPdoHandle);

            //if (0 != retVal)
            //{
            //    // 调用失败,抛异常
            //    CheckError();
            //}
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol Pdo_DrawClear ret:" + retVal);
            return(retVal);
        }
Пример #21
0
        /// <summary>
        /// 设置绘图类型(如画线,画矩形等内容)
        /// </summary>
        /// <param name="hPdoHandle">标示句柄</param>
        /// <param name="dwDrawType">搜索行为过滤类型 见E_PDO_DRAW_TYPE</param>
        /// <returns>成功返回PDO_OK,失败返回错误码</returns>
        public UInt32 Pdo_DrawTypeSet(UInt32 hPdoHandle, E_PDO_DRAW_TYPE dwDrawType)
        {
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol Pdo_DrawTypeSet hPdoHandle:" + hPdoHandle + ",dwDrawType:" + dwDrawType);
            UInt32 retVal = IVXSDKProtocol.Pdo_DrawTypeSet(hPdoHandle, (uint)dwDrawType);

            //if (0 != retVal)
            //{
            //    // 调用失败,抛异常
            //    CheckError();
            //}
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol Pdo_DrawTypeSet ret:" + retVal);
            return(retVal);
        }
Пример #22
0
        /// <summary>
        /// 设置播放绘图类型(如画越界线,画闯入闯出区域,切换绘图类型时,会自动清除前面绘制的内容)
        /// </summary>
        /// <param name="vodHandle"></param>
        /// <param name="drawType">搜索行为过滤类型 见E_VDA_SEARCH_MOVE_OBJ_RANGE_FILTER_TYPE</param>
        /// <returns>成功返回TRUE,失败返回FALSE</returns>
        public bool SetPlayDrawType(Int32 vodHandle, E_VDA_SEARCH_MOVE_OBJ_RANGE_FILTER_TYPE drawType)
        {
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol VdaSdk_SetPlayDrawType lVodHandle:" + vodHandle + ",dwDrawType:" + drawType);
            bool retVal = IVXSDKProtocol.VdaSdk_SetPlayDrawType(vodHandle, (uint)drawType);

            if (!retVal)
            {
                // 调用失败,抛异常
                CheckError();
            }
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol VdaSdk_SetPlayDrawType ret:" + retVal);
            return(retVal);
        }
Пример #23
0
        /// <summary>
        /// 关闭案件查询
        /// </summary>
        /// <param name="queryHandle">查询标示值</param>
        /// <returns></returns>
        public bool CloseCaseQuery(Int32 queryHandle)
        {
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol VdaSdk_CloseCaseQuery lQueryHandle:" + queryHandle);
            bool retVal = IVXSDKProtocol.VdaSdk_CloseCaseQuery(queryHandle);

            if (!retVal)
            {
                // 调用失败,抛异常
                CheckError();
            }
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol VdaSdk_CloseCaseQuery ret:" + retVal);
            return(retVal);
        }
Пример #24
0
        /// <summary>
        /// 删除案件
        /// </summary>
        /// <param name="caseID">案件编号</param>
        /// <returns>成功返回TRUE,失败返回FALSE</returns>
        public bool DelCase(UInt32 caseID)
        {
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol VdaSdk_DelCase caseID:" + caseID);
            bool retVal = IVXSDKProtocol.VdaSdk_DelCase(caseID);

            if (!retVal)
            {
                // 调用失败,抛异常
                CheckError();
            }
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol VdaSdk_DelCase ret:" + retVal);
            return(retVal);
        }
Пример #25
0
        /// <summary>
        /// 获取案件列表(相同用户组共享案件列表)
        /// </summary>
        /// <returns>-1表示失败,其他值表示返回的查询标示值。获取错误码调用VdaSdk_GetLastError</returns>
        public Int32 QueryCaseList()
        {
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol VdaSdk_QueryCaseList ");
            int retVal = IVXSDKProtocol.VdaSdk_QueryCaseList();

            if (retVal == -1)
            {
                // 调用失败,抛异常
                CheckError();
            }
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol VdaSdk_QueryCaseList ret:" + retVal);
            return(retVal);
        }
Пример #26
0
        /// <summary>
        /// 设置播放窗口鼠标动作通知回调参数
        /// </summary>
        /// <param name="lVodHandle"></param>
        /// <param name="dwUserData"></param>
        /// <returns></returns>
        public bool SetPlayWndMouseOptNtfCB(Int32 lVodHandle, UInt32 dwUserData)
        {
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol VdaSdk_SetPlayWndMouseOptNtfCB lVodHandle:" + lVodHandle);
            m_pfuncMouseOptNtf = OnPlayWndMouseOptNtfCB;
            bool retVal = IVXSDKProtocol.VdaSdk_SetPlayWndMouseOptNtfCB(lVodHandle, OnPlayWndMouseOptNtfCB, dwUserData);

            if (!retVal)
            {
                // 调用失败,抛异常
                CheckError();
            }
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol VdaSdk_SetPlayWndMouseOptNtfCB ret:" + retVal);
            return(retVal);
        }
Пример #27
0
        /// <summary>
        /// 获取登录用户类型
        /// </summary>
        /// <returns>用户角色类型,见E_VDA_USER_ROLE_TYPE定义</returns>
        public E_VDA_USER_ROLE_TYPE GetLoginUserType()
        {
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol VdaSdk_GetLoginUserType");
            uint dwUserType;
            bool retVal = IVXSDKProtocol.VdaSdk_GetLoginUserType(out dwUserType);

            if (!retVal)
            {
                // 调用失败,抛异常
                CheckError();
            }

            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol VdaSdk_GetLoginUserType ret:" + retVal);
            return((E_VDA_USER_ROLE_TYPE)dwUserType);
        }
Пример #28
0
        /// <summary>
        /// 开启显示图片叠加控制
        /// </summary>
        /// <param name="hWnd">显示图片的窗口句柄</param>
        /// <param name="dwUserData"></param>
        /// <returns>返回操作标示句柄</returns>
        public UInt32 Pdo_Open(IntPtr hWnd, UInt32 dwUserData)
        {
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol Pdo_Open hWnd:" + hWnd);
            m_pfuncMouseEventCb = OnPDOMouseOptNtfCB;
            UInt32 phPdoHandle = 0;
            UInt32 retVal      = IVXSDKProtocol.Pdo_Open(hWnd, null, dwUserData, out phPdoHandle);

            //if (0 != retVal)
            //{
            //    // 调用失败,抛异常
            //    CheckError();
            //}
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol Pdo_Open ret:" + retVal);
            return(phPdoHandle);
        }
Пример #29
0
        /// <summary>
        /// 初始化
        /// </summary>
        /// <returns>成功返回TRUE,失败返回FALSE</returns>
        private bool Init(bool bCreateJVM)
        {
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol VdaSdk_Init");

            bool retVal = IVXSDKProtocol.VdaSdk_Init(bCreateJVM);

            if (!retVal)
            {
                // 调用失败,抛异常
                CheckError();
            }

            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol VdaSdk_Init ret:" + retVal);
            return(retVal);
        }
Пример #30
0
        /// <summary>
        /// 结束检索
        /// </summary>
        /// <param name="sessionID"></param>
        /// <returns></returns>
        public bool CloseSearchSession(UInt32 sessionID)
        {
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol VdaSdk_CloseSearchQueryHandle sessionID:" + sessionID);

            bool ret = false;

            ret = IVXSDKProtocol.VdaSdk_CloseSearchQueryHandle(sessionID);
            if (!ret)
            {
                CheckError();
            }

            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol VdaSdk_CloseSearchQueryHandle ret:" + ret);

            return(ret);
        }