private void ErrorReceivedHandler(object sender, SerialErrorReceivedEventArgs e) { // TODO processing error message here string message = ""; switch (e.EventType) { case SerialError.Frame: message = "Framing error "; break; case SerialError.Overrun: message = "character-buffer overrun "; break; case SerialError.RXOver: message = "Input buffer overflow"; break; case SerialError.RXParity: message = "parity error pada hardware"; break; case SerialError.TXFull: message = "transmit data, namun output buffer sedang penuh"; break; } if (null != ErrorData) { ErrorData(message); } }
private static void ErrorRecieved(object sender, SerialErrorReceivedEventArgs e) { SerialPort serialPort = sender as SerialPort; if (serialPort != null) { Console.WriteLine("Error recieved. Port name: {0}.", serialPort.PortName); } }
public void ErrorEvent(object sender, SerialErrorReceivedEventArgs e) { if (ErrorHandler != null) { ErrorHandler(sender, e); } }
void serial_ErrorReceived(object sender, Ports.SerialErrorReceivedEventArgs e) { if (ErrorReceived != null) { ErrorReceived(this, e); } }
private static void Sp_ErrorReceived(object sender, SerialErrorReceivedEventArgs e) { Console.WriteLine(); sp.Close(); Console.WriteLine(e.EventType.ToString()); Console.ReadLine(); Console.WriteLine(); }
private void CatchErrorEvents(object src, SerialErrorReceivedEventArgs e) { SerialErrorReceivedEventHandler errorReceived = this.ErrorReceived; SerialStream internalSerialStream = this.internalSerialStream; if ((errorReceived != null) && (internalSerialStream != null)) { lock (internalSerialStream) { if (internalSerialStream.IsOpen) { errorReceived(this, e); } } } }
void TestSerialPort_ErrorReceived(object sender, SerialErrorReceivedEventArgs e) { Log.Exception("TestSerialPort Error Rcvd event fired."); string type = ""; switch (e.EventType) { case SerialError.Frame: type = "Frame"; break; case SerialError.Overrun: type = "Overrun"; break; case SerialError.RXOver: type = "RXOver"; break; case SerialError.RXParity: type = "RXParity"; break; case SerialError.TXFull: type = "TXFull"; break; } Log.Comment("Event Type: " + type); }
/// <summary> /// Событие происходящее при какой-либо ошибке /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private static void DataError(object sender,SerialErrorReceivedEventArgs e) { }
void m_port_ErrorReceived(object sender, SerialErrorReceivedEventArgs e) { }
private void Roomba_DataErrorRecieved(object sender, SerialErrorReceivedEventArgs e) { string m_sReturn = Program.UI.CurrentRoomba.IO.ReadExisting(); m_bRCV_Err = true; }
void serialPort_ErrorReceived(object sender, SerialErrorReceivedEventArgs e) { //MessageBox.Show(); throw new NotImplementedException(); }
private void error(Object sender, SerialErrorReceivedEventArgs e) { log("Serial com error:" + e.ToString(), false, 2); }
void eventSerialPort_ErrorReceived_AfterOpen(object sender, SerialErrorReceivedEventArgs e) { if (e.EventType == expectedError) { if (eventCount == 0) { Log.Comment("AfterOpen event fired. Event Type: " + e.EventType); } eventCount++; } // with loopback you can't get a TxFull without an RX FULL else if (!(e.EventType == SerialError.RXOver && expectedError == SerialError.TXFull)) { Log.Exception("Expected EventType " + expectedError + " but received EventType " + e.EventType); result = MFTestResults.Fail; } }
//TODO реализовать при необходимости private void Port_ErrorReceived(object sender, SerialErrorReceivedEventArgs e) { Debug.WriteLine("Port_ErrorReceived"); }
private void serialPort1_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) { }
public void comPort_ErrorReceived(Object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) { MessageBox.Show(">ERR>>>>>>>>>>>>>>>>>>>>>>>>>>>" + comPort.ReadExisting() + "\n\r"); // sipXtapi.Interop.sipXtapi.sipxCallReject(CurrCall, 400, "BUSY HERE"); }
void m_serialPort_ErrorReceived(object sender, SerialErrorReceivedEventArgs e) { if (ErrorReceived != null) ErrorReceived(sender, e); }
private void serialPort1_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) { this.Invoke(new writeToLogDelegate(writeToLog), false, true, e.EventType.ToString()); }
private void serialPort1_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) { richTextBox2.AppendText("ErrorReceived"); }
private void serialPort1_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) { XtraMessageBox.Show("接收数据时发生错误:" + e.EventType); }
private void serialPort1_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) { logEvent("Error Received! " + e.EventType.ToString()); }
private void serialPort1_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) { this.SetText("[异常]x" + e.EventType.ToString()); }
private static void SerialErrorReceived(object sender, SerialErrorReceivedEventArgs e) { Log.Add(Log.Severity.Debug, "SerialErrorReceived(): {0}", e.EventType); }
private void serialPort1_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) { MessageBox.Show("Port1 error: " + e.EventType); }
private void SP_Joy_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) { Close_Serial_Port(SP_Joy); MessageBox.Show("Erreur sur le port série !\n\n" + e.ToString(), "Erreur", MessageBoxButtons.OK, MessageBoxIcon.Error); }
void port_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) { //spinfo.Text += "" + e.ToString(); //MessageBox.Show("error port:" + e.ToString()); }
void serialPort1_ErrorReceived(object sender, SerialErrorReceivedEventArgs e) { //throw new NotImplementedException(); }
private void serialPort1_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) { SetText("COM port error\r\n"); }
private void _serialPort_ErrorReceived(object sender, SerialErrorReceivedEventArgs e) { SerialError err = e.EventType; _labelConnectionState.Text = "ERR=" + err.ToString(); }
void serialPort1_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) { this.toolStripStatusLabel1.Text = "Error event trapped from Serial Port"; MessageBox.Show(this, "Error received", "Serial Port Event", MessageBoxButtons.OK, MessageBoxIcon.Error); }
void myPort_ErrorReceived(object sender, SerialErrorReceivedEventArgs e) { myPort.DiscardInBuffer(); myPort.DiscardOutBuffer(); EventLogger.LogMessage("Serial Error Received. Discarding both buffers", System.Diagnostics.TraceLevel.Error); }
private void serialPort1_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) { //RxString = "Serial: Error!" + "\r\n"; //this.Invoke(new EventHandler(DisplayText)); }
/// <summary> /// 错误处理函数 /// </summary> void comPort_ErrorReceived(object sender, SerialErrorReceivedEventArgs e) { if (Error != null) { Error(sender, e); } }
private void serialPort_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) { MessageBox.Show(e.ToString()); }
private static void ErrorReceivedEvent(Object sender, SerialErrorReceivedEventArgs e) { lastPort = ((SerialPort)sender).PortName; lastError = e.EventType.ToString(); if (null != ErrorReceivedDelegate) ErrorReceivedDelegate(); }
/// <summary> /// Fires an event when a COM port operation results in an error /// </summary> /// <param name="sender">Sending object</param> /// <param name="e">Serial Port event args instance</param> private void ErrorReceivedTrigger(object sender, SerialComPort.SerialErrorReceivedEventArgs e) { LogError(e.EventType.ToString()); }
private void MyPort_ErrorReceived(object sender, SerialErrorReceivedEventArgs e) { throw new SerialError(); }
/// <summary> /// Called when a serial communication error occurs. /// </summary> private void UartErrorReceived(object sender, SerialErrorReceivedEventArgs e) { // TODO if (this.ObdErrorEvent != null) { this.ObdErrorEvent(this, new ErrorEventArgs(new Exception(e.ToString()))); } }
void comport_ErrorReceived(object sender, SerialErrorReceivedEventArgs e) { txtReceive.Invoke(new EventHandler(delegate { txtReceive.Text += e.ToString(); })); }
private void error(Object sender, SerialErrorReceivedEventArgs e) { comErrorsReceived++; log(Trans.T("L_SERIAL_COM_ERROR") + e.ToString(), false, 2); // "Serial com error:" if (comErrorsReceived == 10) close(); }
internal void OnErrorReceived (SerialErrorReceivedEventArgs args) { SerialErrorReceivedEventHandler handler = (SerialErrorReceivedEventHandler) Events [error_received]; if (handler != null) handler (this, args); }
private void SerialPort_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) { WriteInfo("Ошибка при чтении: " + e.EventType); }
void _port_ErrorReceived(object sender, SerialErrorReceivedEventArgs e) { if(_evtHandler != null) { _evtHandler(_portIndex, (uint)SerialPortEventErrors.USART_EVENT_TYPE_ERROR); } }
private void port_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) { Utility.WriteToTraceLog(string.Format("SerialPort: Error received data '{0}'", e.EventType.ToString())); }
private void RsPort_ErrReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) { PortOpen(); RequestSend(); }
private void ErrorReceivedHandler(object sender, SerialErrorReceivedEventArgs e) { Debug.Print("Serial error received with type: " + e.EventType); }
private void HandleErrorReceived(object sender, SerialErrorReceivedEventArgs e) { logger.Error(e.EventType); }
protected virtual void ErrorReceivedHandler(object sender, SerialErrorReceivedEventArgs e) { }
private void error(Object sender, SerialErrorReceivedEventArgs e) { comErrorsReceived++; log("Serial com error:" + e.ToString(), false, 2); if (comErrorsReceived == 10) close(); }