コード例 #1
0
ファイル: Program.cs プロジェクト: RX-00/monopod
        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);
            }
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: RussTedrake/lcm
        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);
            }
        }
コード例 #3
0
ファイル: example_t_display.cs プロジェクト: RussTedrake/lcm
        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);
            }
        }
コード例 #4
0
ファイル: example_t_display.cs プロジェクト: RX-00/monopod
        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);
            }
        }