private void SendInMission(AgvInMissonModel mission) { SendLogEvent?.Invoke(new StationClientState { State = StationClientStateEnum.INFO, Message = "入库请求:" + mission.Type.EnumToString() }.ToString()); SendSingnalrEvent?.Invoke(AgvSendActionEnum.SendInMission.EnumToString(), mission); }
void w_EventRaised(object sender, EventWatcherArgs e) { if (SendLogEvent != null) { SendLogEvent.Invoke(this, e); } }
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(); } }