Beispiel #1
0
        public bool GetOneLog(TerminalDevice device, bool delete = false)
        {
            bool ok = false;

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

            if (myTerminal.isAlive())
            {
                myTerminal.INT_ReceiveTimeOut = 10000;
                try
                {
                    device.LastLog = null;
                    device.SetOneLog((byte[])myTerminal.RetOneLog(delete));
                    ok = true;
                }
                catch (Exception ex)
                {
                    DataAccess.InsertError(new ExceptionDB()
                    {
                        Date = DateTime.Now, Message = "GetOneLog-GetOneLog: " + ex.Message
                    });
                }
            }

            return(ok);
        }