Esempio n. 1
0
        public static void Main(string[] args)
        {
            LCM.LCM lcm;

            try
            {
                lcm = new LCM.LCM(new string[] { "tcpq://127.0.0.1:7700" });
                // allow the TCP provider reader to connect to the server before the subscription attempt
                System.Threading.Thread.Sleep(500);
                lcm.SubscribeAll(new SimpleSubscriber());

                while (true)
                {
                    try
                    {
                        System.Threading.Thread.Sleep(1000);

                        Console.WriteLine("SEND: TEST");
                        lcm.Publish("TEST", "foobar");
                    }
                    catch (Exception ex)
                    {
                        Console.Error.WriteLine("Ex: " + ex);
                    }
                }
            }
            catch (Exception ex)
            {
                Console.Error.WriteLine("Ex: " + ex);
                Environment.Exit(1);
            }
        }
Esempio n. 2
0
        public static void Main(string[] args)
        {
            LCM.LCM lcm;

            try
            {
                lcm = new LCM.LCM(new string[] { "tcpq://127.0.0.1:7700" });
                // allow the TCP provider reader to connect to the server before the subscription attempt
                System.Threading.Thread.Sleep(500);
                lcm.SubscribeAll(new SimpleSubscriber());

                while (true)
                {
                    try
                    {
                        System.Threading.Thread.Sleep(1000);

                        Console.WriteLine("SEND: TEST");
                        lcm.Publish("TEST", "foobar");
                    }
                    catch (Exception ex)
                    {
                        Console.Error.WriteLine("Ex: " + ex);
                    }
                }

            }
            catch (Exception ex)
            {
                Console.Error.WriteLine("Ex: " + ex);
                Environment.Exit(1);
            }
        }
Esempio n. 3
0
        public static void Main(string[] args)
        {
            LCM.LCM myLCM;

            try
            {
                myLCM = new LCM.LCM();

                myLCM.SubscribeAll(new SimpleSubscriber());

                while (true)
                    System.Threading.Thread.Sleep(1000);
            }
            catch (Exception ex)
            {
                Console.Error.WriteLine("Ex: " + ex);
                Environment.Exit(1);
            }
        }
Esempio n. 4
0
        public static void Main(string[] args)
        {
            LCM.LCM myLCM;

            try
            {
                myLCM = new LCM.LCM();

                myLCM.SubscribeAll(new SimpleSubscriber());

                while (true)
                {
                    System.Threading.Thread.Sleep(1000);
                }
            }
            catch (Exception ex)
            {
                Console.Error.WriteLine("Ex: " + ex);
                Environment.Exit(1);
            }
        }