Exemplo n.º 1
0
        /// <summary>
        /// Configuration state
        /// </summary>
        private int InitialState(int currentState, object o)
        {
            TextBoxStreamWriter.DefaultLog.WriteLine("HAL9000.-> Initializing RoboZoo test.");

            //Load the WORLD configuration for this test
            SMConfiguration = new RoboZoo_WORLD();
            searchAttempt = 0;

            //initialize the threads fos async robot's movements
            t_HEADSearchMovements = new Thread(new ThreadStart(HEADSearchMovements));
            t_ARMSSearchMovements = new Thread(new ThreadStart(ARMSSearchMovements));
            t_SPGENSearchPhrases = new Thread(new ThreadStart(SPGENSearchPhrases));

            //Launch the threads to move asynchronous the robot's head
            t_HEADSearchMovements.Start();
            while (!t_HEADSearchMovements.IsAlive);
            //Launch the thread to move asynchronous the robot's arms
            t_ARMSSearchMovements.Start();
            while (!t_ARMSSearchMovements.IsAlive) ;
            //Launch the thread to asynchronously play a message
            t_SPGENSearchPhrases.Start();
            while (!t_SPGENSearchPhrases.IsAlive) ;

            return (int)States.SearchMarker;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Configuration state
        /// </summary>
        private int InitialState(int currentState, object o)
        {
            TextBoxStreamWriter.DefaultLog.WriteLine("HAL9000.-> Initializing RoboZoo test.");

            //Load the WORLD configuration for this test
            SMConfiguration = new RoboZoo_WORLD();

            // TODO: Change the next status
            return (int)States.FinalState;
        }