Exemple #1
0
        public void GetSetHandler()
        {
            IMethodImpl handler = new DummyMethod();

            _builder.Handler = handler;
            Assert.AreSame(handler, _builder.Handler);
        }
Exemple #2
0
        public override void Execute() /*throws Throwable*/
        {
            Packet wp = _destination.Receive();

            if (wp == null)
            {
                return;
            }
            _destination.Close();

            Packet p = _cfgp.Receive();

            if (p != null)
            {
                string param = p.Content.ToString();
                _timeout = Double.Parse(param);
                Drop(p);
                _cfgp.Close();
            }

            TextBox tb = wp.Content as TextBox;

            Drop(wp);

            while ((p = _inport.Receive()) != null)
            {
                LongWaitStart(_timeout);
                //Thread.Sleep(3000);   // testing only
                string line = p.Content as string;
                if (tb.Multiline)
                {
                    line += "\r\n";
                }
                DummyMethod dg = delegate()
                {
                    tb.AppendText(line);
                };

                tb.Invoke(dg);
                LongWaitEnd();
                _outport.Send(p);
            }
            // tw.Close();
        }
Exemple #3
0
        /// <summary>
        /// constructor
        /// </summary>
        /// <param name="instance">instance</param>
        public DummyPathManager(Instance instance)
            : base(instance)
        {
            //Need a Request on Fail
            BotNormal.RequestReoptimizationAfterFailingOfNextWaypointReservation = true;

            //translate to lightweight graph
            var graph = GenerateGraph();

            PathFinder = new DummyMethod(graph, instance.SettingConfig.Seed, new PathPlanningCommunicator(
                                             instance.LogSevere,
                                             instance.LogDefault,
                                             instance.LogInfo,
                                             instance.LogVerbose,
                                             () => { instance.StatOverallPathPlanningTimeouts++; }));
            var method = PathFinder as DummyMethod;

            method.LengthOfAWaitStep    = instance.ControllerConfig.PathPlanningConfig.LengthOfAWaitStep;
            method.RuntimeLimitPerAgent = instance.ControllerConfig.PathPlanningConfig.RuntimeLimitPerAgent;
            method.RunTimeLimitOverall  = instance.ControllerConfig.PathPlanningConfig.RunTimeLimitOverall;
        }
Exemple #4
0
 public void GetSetHandler()
 {
     IMethodImpl handler = new DummyMethod();
     _builder.Handler = handler;
     Assert.AreSame(handler, _builder.Handler);
 }