// Main function
        static void Main(string[] args)
        {
            Console.WriteLine("Calibration client starting...\n");

            // Initialize HoloDataClient
            HoloDataClient holoClient = new HoloDataClient();

            holoClient.ConnectToServer("192.168.1.101", 11001);
            //holoClient.ConnectToServer("127.0.0.1", 11001);

            // Initialize NatNetClient
            NatNetClient nnClient = new NatNetClient();

            nnClient.Connect();

            CalibrationClient calClient = new CalibrationClient(holoClient, nnClient);

            Console.WriteLine("======================== STREAMING DATA (PRESS ESC TO EXIT) =====================\n");

            // Infinite loop
            while (!(Console.ReadKey().Key == ConsoleKey.Escape))
            {
                // Continuously listening for Frame data
                // Enter ESC to exit
            }

            // Disconnect clients
            holoClient.Disconnect();
            nnClient.Disconnect();
        }
示例#2
0
        // Main function
        static void Main(string[] args)
        {
            Console.WriteLine("arIME ExperimentConsole");

            string messageRequest = "\nEnter a phrase id.";

            // Initialize HoloDataClient
            HoloDataClient holoClient = new HoloDataClient();

            holoClient.ConnectToServer("192.168.1.101", 11001);

            // Initialize NatNetClient
            NatNetClient nnClient = new NatNetClient();

            nnClient.Connect();

            // Require spaces
            CalibrationClient calClient = new CalibrationClient(holoClient, nnClient, true);

            Console.WriteLine("======================== STREAMING DATA (PRESS ESC TO EXIT) =====================\n");

            // Read console input, returns the phrase
            string phrase = getInput(messageRequest);

            calClient.NewPhrase(phrase);

            // Loop flag
            bool active = true;

            // Infinite loop
            while (active)
            {
                // Continuously listening for Frame data
                // Enter ESC to exit

                ConsoleKeyInfo key = Console.ReadKey(true);
                switch (key.Key)
                {
                case ConsoleKey.Escape:
                    Console.WriteLine("You pressed ESCAPE!");
                    active = false;
                    break;

                // Special case for stopping phrase during execution
                case ConsoleKey.X:
                    Console.WriteLine("You pressed X!");
                    calClient.ForceRetry();
                    break;

                default:
                    break;
                }
            }

            // Disconnect clients
            holoClient.Disconnect();
            nnClient.Disconnect();
        }
示例#3
0
        // Main function
        static void Main(string[] args)
        {
            string messageRequest = "\nEnter message then press Enter. Type 'exit' to quit.";
            //string messageString = "";


            // Initialize HoloDataClient
            HoloDataClient holoClient = new HoloDataClient();

            holoClient.ConnectToServer("192.168.1.101", 11001);
            //holoClient.ConnectToServer("127.0.0.1", 11001);

            // Initialize NatNetClient
            NatNetClient nnClient = new NatNetClient();

            nnClient.Connect();

            // Don't require spaces
            //CalibrationClient calClient = new CalibrationClient(holoClient, nnClient);

            // Require spaces
            CalibrationClient calClient = new CalibrationClient(holoClient, nnClient, true);

            Console.WriteLine("======================== STREAMING DATA (PRESS ESC TO EXIT) =====================\n");

            //if (!getInput(messageRequest, out messageString))
            //{
            //    break;
            //}

            // Send message to server
            string word = getInput(messageRequest);

            calClient.NewPhrase(word);

            // Infinite loop
            while (true)
            {
                // Continuously listening for Frame data
                // Enter ESC to exit
            }

            // Disconnect clients
            holoClient.Disconnect();
            nnClient.Disconnect();
        }