示例#1
0
        public int GetLogs(TerminalDevice device)
        {
            int logCount = 0;

            oTerminal myTerminal = new oTerminal(device.IPAddress, device.ID, device.Port, device.AccKey);

            if (myTerminal.isAlive())
            {
                myTerminal.INT_ReceiveTimeOut = 10000;
                try
                {
                    device.SetLogs(myTerminal.RetAllLog() as ArrayList);
                    logCount = device.Logs.Count();
                }
                catch (Exception ex)
                {
                    DataAccess.InsertError(new ExceptionDB()
                    {
                        Date = DateTime.Now, Message = "DeviceControl-GetLogs: " + ex.Message
                    });
                }
            }

            return(logCount);
        }