• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Ports.SerialErrorReceivedEventArgs类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中System.IO.Ports.SerialErrorReceivedEventArgs的典型用法代码示例。如果您正苦于以下问题:C# SerialErrorReceivedEventArgs类的具体用法?C# SerialErrorReceivedEventArgs怎么用?C# SerialErrorReceivedEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SerialErrorReceivedEventArgs类属于System.IO.Ports命名空间,在下文中一共展示了SerialErrorReceivedEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: ErrorReceivedHandler

 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);
     }
 }
开发者ID:ibnoe,项目名称:parkir,代码行数:27,代码来源:SerialComPort.cs


示例2: ErrorRecieved

        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);
            }
        }
开发者ID:AntonPashkowskiy,项目名称:Labs,代码行数:9,代码来源:Program.cs


示例3: ErrorEvent

 public void ErrorEvent(object sender, SerialErrorReceivedEventArgs e)
 {
     if (ErrorHandler != null)
     {
         ErrorHandler(sender, e);
     }
 }
开发者ID:hpbaotho,项目名称:top4ever-pos,代码行数:7,代码来源:SerialPortHelper.cs


示例4: Sp_ErrorReceived

 private static void Sp_ErrorReceived(object sender, SerialErrorReceivedEventArgs e)
 {
     Console.WriteLine();
     sp.Close();
     Console.WriteLine(e.EventType.ToString());
     Console.ReadLine();
     Console.WriteLine();
 }
开发者ID:AlistairCheeseman,项目名称:WindTunnelApparatus,代码行数:8,代码来源:Program.cs


示例5: TestSerialPort_ErrorReceived

 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);
 }
开发者ID:awakegod,项目名称:NETMF-LPC,代码行数:24,代码来源:TestSerialPort.cs


示例6: m_serialPort_ErrorReceived

        void m_serialPort_ErrorReceived(object sender,
		SerialErrorReceivedEventArgs e)
        {
            if (ErrorReceived != null)
            ErrorReceived(sender, e);
        }
开发者ID:calimeradriver,项目名称:Domotica,代码行数:6,代码来源:DnSerialPort.cs


示例7: SerialErrorReceived

 private static void SerialErrorReceived(object sender, SerialErrorReceivedEventArgs e)
 {
     Log.Add(Log.Severity.Debug, "SerialErrorReceived(): {0}", e.EventType);
 }
开发者ID:astrospark,项目名称:LazerTagHost,代码行数:4,代码来源:LazerTagSerial.cs


示例8: _port_ErrorReceived

 void _port_ErrorReceived(object sender, SerialErrorReceivedEventArgs e)
 {
     if(_evtHandler != null)
     {
         _evtHandler(_portIndex, (uint)SerialPortEventErrors.USART_EVENT_TYPE_ERROR);
     }
 }
开发者ID:koson,项目名称:.NETMF_for_LPC17xx,代码行数:7,代码来源:SerialPort.cs


示例9: OnErrorReceived

		internal void OnErrorReceived (SerialErrorReceivedEventArgs args)
		{
			SerialErrorReceivedEventHandler handler =
				(SerialErrorReceivedEventHandler) Events [error_received];

			if (handler != null)
				handler (this, args);
		}
开发者ID:Profit0004,项目名称:mono,代码行数:8,代码来源:SerialPort.cs


示例10: comport_ErrorReceived

 void comport_ErrorReceived(object sender, SerialErrorReceivedEventArgs e)
 {
     txtReceive.Invoke(new EventHandler(delegate { txtReceive.Text += e.ToString(); }));
 }
开发者ID:andrejpanic,项目名称:win-mobile-code,代码行数:4,代码来源:Form1.cs


示例11: MyPort_ErrorReceived

 private void MyPort_ErrorReceived(object sender, SerialErrorReceivedEventArgs e)
 {
     throw new SerialError();
 }
开发者ID:acj4,项目名称:nxt-ucontrol,代码行数:4,代码来源:NXTBox.cs


示例12: Port_ErrorReceived

 //TODO реализовать при необходимости
 private void Port_ErrorReceived(object sender, SerialErrorReceivedEventArgs e)
 {
     Debug.WriteLine("Port_ErrorReceived");
 }
开发者ID:alexrigin,项目名称:HMS2,代码行数:5,代码来源:MitutoyoRS232InputDevice.cs


示例13: error

 private void error(Object sender, SerialErrorReceivedEventArgs e)
 {
     comErrorsReceived++;
     log("Serial com error:" + e.ToString(), false, 2);
     if (comErrorsReceived == 10)
         close();
 }
开发者ID:CNCBASHER,项目名称:Repetier-Host,代码行数:7,代码来源:PrinterConnection.cs


示例14: CatchErrorEvents

 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);
             }
         }
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:15,代码来源:SerialPort.cs


示例15: ErrorReceivedHandler

 private void ErrorReceivedHandler(object sender, SerialErrorReceivedEventArgs e)
 {
     Debug.Print("Serial error received with type: " + e.EventType);
 }
开发者ID:kmarcell,项目名称:IoTFrameworks,代码行数:4,代码来源:XbeeCoordinator.cs


示例16: ErrorReceivedEvent

 private static void ErrorReceivedEvent(Object sender, SerialErrorReceivedEventArgs e)
 {
     lastPort = ((SerialPort)sender).PortName;
     lastError = e.EventType.ToString();
     if (null != ErrorReceivedDelegate) ErrorReceivedDelegate();
 }
开发者ID:litdev1,项目名称:LitDev,代码行数:6,代码来源:CommPort.cs


示例17: serialPort_ErrorReceived

 void serialPort_ErrorReceived(object sender, SerialErrorReceivedEventArgs e)
 {
     //MessageBox.Show();
     throw new NotImplementedException();
 }
开发者ID:EraYaN,项目名称:EV2020,代码行数:5,代码来源:SerialInterface.cs


示例18: serialPort1_ErrorReceived

 void serialPort1_ErrorReceived(object sender, SerialErrorReceivedEventArgs e)
 {
     //throw new NotImplementedException();
 }
开发者ID:sshakuf,项目名称:mdop,代码行数:4,代码来源:RS232Class.cs


示例19: DataError

 /// <summary>
 /// Событие происходящее при какой-либо ошибке
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private static void DataError(object sender,SerialErrorReceivedEventArgs e)
 {
 }
开发者ID:Brabys2012,项目名称:SmartHouse,代码行数:8,代码来源:ComPortExecutable.cs


示例20: _serialPort_ErrorReceived

 private void _serialPort_ErrorReceived(object sender, SerialErrorReceivedEventArgs e)
 {
     SerialError err = e.EventType;
     _labelConnectionState.Text = "ERR=" + err.ToString();
 }
开发者ID:mamu7211,项目名称:ArduinoSpider,代码行数:5,代码来源:Form1.cs



注:本文中的System.IO.Ports.SerialErrorReceivedEventArgs类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Ports.SerialPort类代码示例发布时间:2022-05-26
下一篇:
C# Ports.SerialDataReceivedEventArgs类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap