private void UploadAlarm(BaseCommand e) { if (e != null && e.RemoteSocket != null) { Controller controller = ControllerManager.Instance().Get(e.RemoteSocket); if (controller != null) { int dockNo = controller.DockNo; AgingDock dock = m_DockList.Find((x) => { return((int)x.Tag == dockNo); });//在每个货架内部保存报警信息 if (dock != null) { dock.UpdateAlarmInfo(e as GetAlarm); } else { Logger.Instance().ErrorFormat("UploadAlarm()->货架没找到 DockNo={0}", dockNo); } } else { IPEndPoint point = e.RemoteSocket.ConnectSocket.RemoteEndPoint as IPEndPoint; byte[] ipByte = point.Address.GetAddressBytes(); long ip = ControllerManager.Bytes2Long(ipByte); Logger.Instance().ErrorFormat("UploadAlarm()->控制器没找到 ip={0}", ip); } } else { Logger.Instance().Error("UploadAlarm()->传入的参数为空"); } }