Exemplo n.º 1
0
        /// <summary>
        /// The Launch command does not return a response from the MAP200 so we have to check the status until we get a 1 indicating it's running.
        /// If we don't get a 1 within 5 seconds, we throw a timeout exception
        /// </summary>
        public void StartPct()
        {
            //send the command to launch the PCT
            SendCommand("SUPer:LAUNch PCT", requestResponse: false);

            //create and start the timeout timer
            Stopwatch sw = new Stopwatch();

            sw.Start();


            while (GetPctStatus().Trim() != "1")
            {
                Thread.Sleep(500);
                if (sw.ElapsedMilliseconds > 5000)
                {
                    throw new TimeoutException("Timed out starting the PCT");
                }
            }
            pct = new PCT();
        }
Exemplo n.º 2
0
 public MAP200()
 {
     conman = new MAP200_ConnectionManager();
     pct    = new PCT();
     GetTestSetInfo();
 }