private void Probe_Error(MTConnectError.Document errorDocument) { if (errorDocument != null) { var sender = errorDocument.UserObject as ProbeSender; if (sender != null) { ProbeError?.Invoke(this, sender.Address, sender.Port); } } }
private void Client_Error(MTConnectError.Document errorDocument) { if (errorDocument == null || errorDocument.Errors == null || errorDocument.Errors.Count < 1) { return; } Poco[] pocos = new Poco[errorDocument.Errors.Count]; for (int i = 0; i < errorDocument.Errors.Count; i++) { pocos[i] = new Poco() { Name = "err:" + errorDocument.Header + ":" + errorDocument.Errors[i].ErrorCode, Timestamp = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), Value = errorDocument.Errors[i].CDATA }; PushToMonitorService ptms = PushToMonitorService.getInstance(); if (ptms != null) { ptms.push(errorDocument.Errors[i].ErrorCode.ToString(), DateTime.Now, errorDocument.Errors[i].CDATA); } } putToLV(pocos); }
private void Client_Error(MTConnectError.Document errorDocument) { logger.Error(errorDocument.ToString()); }