예제 #1
0
        public OutsideStockInResponseResult ConfirmBalanceMES(OutsideStockInResponse obj)
        {
            OutsideStockInResponseResult retModel = new OutsideStockInResponseResult();

            retModel.WarehousingId     = obj.WarehousingId;
            retModel.IsNormalExecution = true;
            _eventBus.Post(new KeyValuePair <OutsideStockInResponse, OutsideStockInResponseResult>(obj, retModel), TimeSpan.Zero);
            return(retModel);
        }
예제 #2
0
        public CreateOutStockResult CreateOutStock([FromBody] OutStockInfo outStockInfo)
        {
            CreateOutStockResult result = new CreateOutStockResult()
            {
                Successd = true
            };

            _eventBus.Post(new KeyValuePair <OutStockInfo, CreateOutStockResult>(outStockInfo, result), TimeSpan.Zero);
            return(result);
        }
예제 #3
0
        private void Proxy_SendSingnalrEvent(string arg1, object arg2)
        {
            var obj      = Type.GetType($"AGV.Web.Service.Models.{arg1}");
            var instance = Activator.CreateInstance(obj, new object[] { arg2 });

            eventBus.Post(instance, TimeSpan.FromSeconds(1));
        }
예제 #4
0
        public void start()
        {
            if (StaticData.BackGroudJobIsStart)
            {
                return;
            }
            StaticData.BackGroudJobIsStart = true;


            WebAgvMissionManager webAgvMission = new WebAgvMissionManager();

            var hub = new NoticeHub();

            hub.clearAllWaitSignal();
            hub.clearAgvOrder();

            eventBus.Post(new ClearMissionNode(), TimeSpan.FromSeconds(1));
            StaticData.CurrentMissionOrder = new System.Collections.Concurrent.BlockingCollection <Agv.Common.Model.AgvMissonModel>();
            try
            {
                var job2 = BackgroundJob.Enqueue(() => webAgvMission.Start());
                //   ListAgvJob.Add(job1);
                ListAgvJob.Add(job2);


                Clients.All.getBackJobState(StaticData.BackGroudJobIsStart);
            }
            catch (Exception ex)
            {
                Clients.All.getStartLog(ex.Message);
            }
        }
예제 #5
0
        public void PostTest()
        {
            var test1 = new TestClass1();
            var test2 = new TestClass2();

            SimpleEventBus.Register(test1);
            SimpleEventBus.Register(test2);
            SimpleEventBus.Post(new TestEvent {
                Str = "A", Num = 1000
            });

            Assert.AreEqual("A1", test1.Str);
            Assert.AreEqual(1001, test1.Num);
            Assert.AreEqual("A2", test2.Str);
            Assert.AreEqual(1002, test2.Num);

            SimpleEventBus.Unregister(test1);
            SimpleEventBus.Post(new TestEvent {
                Str = "B", Num = 2000
            });

            Assert.AreEqual("A1", test1.Str);
            Assert.AreEqual(1001, test1.Num);
            Assert.AreEqual("B2", test2.Str);
            Assert.AreEqual(2002, test2.Num);
        }
예제 #6
0
        public string Initialize(SimpleEventBus eventBus)
        {
            MusicPlayerWindow musicPlayerWindow = new MusicPlayerWindow();

            eventBus.Post(new ShowWindowEvent(musicPlayerWindow), TimeSpan.Zero);

            WpfConsole.WriteLine("Hello from Music Plugin!");

            return("OK");
        }
예제 #7
0
        private void AgvMissionManagerClient_SendSignalrEvent(string arg1, object arg2)
        {
            if (arg1 == "SendMissonInOrder" || arg1 == "SendMissonOutOrder")
            {
                SendMissonOrder(arg2 as AgvMissonModel);
                return;
            }
            if (arg1 == "SendFirstWaitEndSignal")
            {
                new AgvMissonHub().SendFirstWaitEndSignal(arg2.ToString());
                return;
            }
            if (arg1 == "SendLastWaitEndSignal")
            {
                new AgvMissonHub().SendLastWaitEndSignal(arg2.ToString());
                return;
            }
            var obj      = Type.GetType($"AGV.Web.Service.Models.{arg1}");
            var instance = Activator.CreateInstance(obj, new object[] { arg2 });

            eventBus.Post(instance, TimeSpan.FromSeconds(1));
        }
예제 #8
0
        public void clearOrder()
        {
            StaticData.CurrentMissionOrder = new System.Collections.Concurrent.BlockingCollection <Agv.Common.Model.AgvMissonModel>();

            eventBus.Post(new ClearMissionNode(), TimeSpan.FromSeconds(1));
        }