示例#1
0
 public Status StartTesting(uint tests, DeviceDescrip deviceToUse, string firmwareFilePath, string paramData)
 {
     _tests        = tests;
     _device       = deviceToUse;
     _firmwarePath = firmwareFilePath;
     _configData   = paramData;
     if (_runningThread == null)
     {
         dotNET.Thread t = new dotNET.Thread(TestThread);
         t.Start();
         _runningThread = t;
         return(Status.Ok);
     }
     else
     {
         return(Status.Busy);
     }
 }
示例#2
0
        public Status StartHttpGet(HostNameAndPort hostName, string model, byte deviceID, ActionType action, int timeout = 2000, string extraParams = "")
        {
            if (_thread != null)
            {
                return(Status.Busy);
            }

            _params.hostName    = hostName;
            _params.model       = model;
            _params.deviceID    = deviceID;
            _params.action      = action;
            _params.timeout     = timeout;
            _params.extraParams = extraParams;

            _params.isPOST = false;

            _isDone.Reset();

            _thread = new dotNET.Thread(ExecuteTask);
            _thread.Start();

            return(Status.Ok);
        }