示例#1
0
 private void SendInMission(AgvInMissonModel mission)
 {
     SendLogEvent?.Invoke(new StationClientState {
         State = StationClientStateEnum.INFO, Message = "入库请求:" + mission.Type.EnumToString()
     }.ToString());
     SendSingnalrEvent?.Invoke(AgvSendActionEnum.SendInMission.EnumToString(), mission);
 }
示例#2
0
 void w_EventRaised(object sender, EventWatcherArgs e)
 {
     if (SendLogEvent != null)
     {
         SendLogEvent.Invoke(this, e);
     }
 }
示例#3
0
        public void StartStationClentFlow()
        {
            while (!token.IsCancellationRequested)
            {
                var ret = StationClientFlow();
                if (ret == false)
                {
                    while (ret == false)
                    {
                        ret = StationDevice.SetAlarm(true);
                        SendLogEvent?.Invoke(
                            new StationClientState {
                            State = StationClientStateEnum.ERROR, Message = "物料调用失败,发送错误信息至设备!"
                        }.ToString());
                        Thread.Sleep(1000);
                    }

                    bool dev_reset = false;
                    while (dev_reset == false)
                    {
                        StationDevice.GetReset(ref dev_reset);
                        SendLogEvent?.Invoke(
                            new StationClientState {
                            State = StationClientStateEnum.INFO, Message = "物料调用失败,等待设备的复位信号"
                        }.ToString());
                        Thread.Sleep(1000);
                    }
                }

                Thread.Sleep(1000);
                SendFeedingSignal();
            }
        }