Exemplo n.º 1
0
 static void Main(string[] args)
 {
     // создаем клиента
     var client = new TestingClient();
     // назначаем обработчик сенсоров
     client.SensorDataReceived += HandleSensorData;
     // указываем настройки
     if (args.Length > 1)
         client.Configurate(int.Parse(args[1]), true, RoboMoviesBots.Stand, ip: args[0], cvarcTag: "00000000-0000-0000-0000-000000000008");
     else
         client.Configurate(14000, false, RoboMoviesBots.Stand, ip: "127.0.0.1", cvarcTag: "00000000-0000-0000-0000-000000000008");
     Control(client);
 }
Exemplo n.º 2
0
 static void InitConnection()
 {
     var client = new TestingClient();
     var configs = new ConfigurationProposal
     {
         LoadingData = new LoadingData { AssemblyName = ToolConstants.AssemblyName, Level = ToolConstants.Level },
         SettingsProposal = ToolConstants.Settings
     };
     try
     {
         client.Configurate(ToolConstants.ServicePort, configs, ToolConstants.WorldState, ToolConstants.Ip);
     }
     catch (Exception e)
     {
         Console.WriteLine("maybe error while sending settings: " + e.Message);
     }
     client.Exit();
 }