public bool Subscribe(string cameraCode)
        {
            RealAnalyseInfo anainfo = GetAllCrowd().Find(item => item.realAnalyseParam.realCameraInfo.szCameraID == cameraCode);

            AdpsInfo adpsinfo = GetAllEvents().Find(item => item.tEventParam.szCameraID == cameraCode && item.tEventParam.szReceiveIp == LocalIP && item.tEventParam.dwAnalyseType == (uint)E_VIDEO_ANALYZE_TYPE.E_ANALYZE_CROWD);

            if (adpsinfo != null)
            {
                return(true);
            }

            AdpsParam adps = new AdpsParam()
            {
                dwAnalyseType  = (uint)E_VIDEO_ANALYZE_TYPE.E_ANALYZE_CROWD,
                szReceiveIp    = LocalIP,
                wReceivePort   = (ushort)LocalPort,
                szServerIp     = anainfo.realAnalyseParam.szArsIp,
                wServerPort    = anainfo.realAnalyseParam.wArsPort,
                szCameraID     = anainfo.realAnalyseParam.realCameraInfo.szCameraID,
                dwTaskUnitID   = anainfo.realAnalyseParam.dwAnalysisPlanID,
                dwTaskType     = 1,
                dwStoreStyle   = 1,
                dwProtocolType = 1,
                dwMergeStyle   = 0,
            };

            return(AddEvent(adps) > 0);
        }
        private uint AddEvent(AdpsParam param)
        {
            uint anaID = 0;

            IVXProtocol.AdpsSdk_AddEvent(m_loginIDAdps, param, out anaID);
            return(anaID);
        }
        public bool AddDefaultEvent(string cameraCode)
        {
            RealAnalyseInfo anainfo = GetAllBehavior().Find(item => item.realAnalyseParam.realCameraInfo.szCameraID == cameraCode);

            AdpsInfo adpsinfo = GetAllEvents().Find(item => item.tEventParam.szCameraID == cameraCode && item.tEventParam.szReceiveIp == ServerIP && item.tEventParam.dwAnalyseType == (uint)E_VIDEO_ANALYZE_TYPE.E_ANALYZE_BEHAVIOR_ALARM);

            if (adpsinfo != null)
            {
                return(true);
            }

            AdpsParam adps = new AdpsParam()
            {
                dwAnalyseType  = (uint)E_VIDEO_ANALYZE_TYPE.E_ANALYZE_BEHAVIOR_ALARM,
                szReceiveIp    = RTRISServerIP,
                wReceivePort   = (ushort)RTRISPort,
                szServerIp     = anainfo.realAnalyseParam.szArsIp,
                wServerPort    = anainfo.realAnalyseParam.wArsPort,
                szCameraID     = anainfo.realAnalyseParam.realCameraInfo.szCameraID,
                dwTaskUnitID   = anainfo.realAnalyseParam.dwAnalysisPlanID,
                dwTaskType     = 1,
                dwStoreStyle   = 1,
                dwProtocolType = 1,
                dwMergeStyle   = 0,
            };

            return(AddEvent(adps) > 0);
        }
 private uint EditEvent(uint anaID, AdpsParam param)
 {
     IVXProtocol.AdpsSdk_UpdateEvent(m_loginIDAdps, param, anaID);
     return(anaID);
 }