Пример #1
0
        public void refreshTemperInfo()
        {
            NETDEV_TAMPER_ALARM_INFO_S stTamperAlarmInfo = new NETDEV_TAMPER_ALARM_INFO_S();
            Int32 dwBytesReturned = 0;
            int   iRet            = NETDEVSDK.NETDEV_GetDevConfig(m_deviceInfoList[m_oNetDemo.m_curSelectedTreeDeviceIndex].m_lpDevHandle, m_oNetDemo.m_curSelectedTreeChannelIndex + 1, (int)NETDEV_CONFIG_COMMAND_E.NETDEV_GET_TAMPERALARM, ref stTamperAlarmInfo, Marshal.SizeOf(stTamperAlarmInfo), ref dwBytesReturned);

            if (NETDEVSDK.TRUE != iRet)
            {
                m_oNetDemo.showFailLogInfo(m_deviceInfoList[m_oNetDemo.m_curSelectedTreeDeviceIndex].m_ip + " chl:" + (m_oNetDemo.m_curSelectedTreeChannelIndex + 1), "Get tamper info", NETDEVSDK.NETDEV_GetLastError());
                return;
            }

            m_oNetDemo.showSuccessLogInfo(m_deviceInfoList[m_oNetDemo.m_curSelectedTreeDeviceIndex].m_ip + " chl:" + (m_oNetDemo.m_curSelectedTreeChannelIndex + 1), "Get tamper info");

            m_deviceInfoList[m_oNetDemo.m_curSelectedTreeDeviceIndex].m_channelInfoList[m_oNetDemo.m_curSelectedTreeChannelIndex].m_tamperAlarmInfo.tamperAlarmInfo = stTamperAlarmInfo;
            m_oNetDemo.showTemperInfo(ref stTamperAlarmInfo);
            m_deviceInfoList[m_oNetDemo.m_curSelectedTreeDeviceIndex].m_channelInfoList[m_oNetDemo.m_curSelectedTreeChannelIndex].m_tamperAlarmInfo.existFlag = true;
        }