Пример #1
0
        public void getAlarmOutputInfo(int channelID)
        {
            NETDEV_ALARM_OUTPUT_LIST_S stAlarmOutputList = new NETDEV_ALARM_OUTPUT_LIST_S();

            stAlarmOutputList.astAlarmOutputInfo = new NETDEV_ALARM_OUTPUT_INFO_S[NETDEVSDK.NETDEV_MAX_ALARM_OUT_NUM];

            Int32 dwBytesReturned = 0;
            int   iRet            = NETDEVSDK.NETDEV_GetDevConfig(m_deviceInfoList[m_oNetDemo.m_CurSelectTreeNodeInfo.dwDeviceIndex].m_lpDevHandle, channelID, (int)NETDEV_CONFIG_COMMAND_E.NETDEV_GET_ALARM_OUTPUTCFG, ref stAlarmOutputList, Marshal.SizeOf(stAlarmOutputList), ref dwBytesReturned);

            if (NETDEVSDK.TRUE != iRet)
            {
                m_oNetDemo.showFailLogInfo(m_deviceInfoList[m_oNetDemo.m_CurSelectTreeNodeInfo.dwDeviceIndex].m_ip + " chl:" + (m_oNetDemo.getChannelID()), "Get alarm output info", NETDEVSDK.NETDEV_GetLastError());
                m_oNetDemo.initIOAlarmOutputCfgTab();
                return;
            }

            m_oNetDemo.showSuccessLogInfo(m_deviceInfoList[m_oNetDemo.m_CurSelectTreeNodeInfo.dwDeviceIndex].m_ip + " chl:" + (m_oNetDemo.getChannelID()), "Get alarm output info");

            m_deviceInfoList[m_oNetDemo.m_CurSelectTreeNodeInfo.dwDeviceIndex].m_channelInfoList[m_oNetDemo.getChannelIndex()].m_IOInfo.stOutPutInfo = stAlarmOutputList;
            m_oNetDemo.showAlarmOutputInfo(0);
        }