Esempio n. 1
0
 static public void CloseDevice()
 {
     if (!bOpened)
     {
         return;
     }
     NMC2.nmc_CloseDevice(m_nModuleIP);
     bOpened = false;
 }
Esempio n. 2
0
        static public bool ReOpenDevice()
        {
            NMC2.nmc_CloseDevice(m_nModuleIP);

            if (NMC2.nmc_PingCheck(m_nModuleIP, 200) != 0)
            {
                Log.Trace("PAIX", "ReOpen Ping Test Error 192.168.0." + m_nModuleIP.ToString());
                return(false);
            }

            short nRet = NMC2.nmc_OpenDevice(m_nModuleIP);

            if (nRet == 0)
            {
                Log.ShowMessage("PAIX", "ReOpen Success! 192.168.0." + m_nModuleIP.ToString());
                return(true);
            }
            Log.Trace("PAIX", "ReOpen Failed! 192.168.0." + m_nModuleIP.ToString());
            return(false);
        }