在c Sharp中进行串行通信时,清除(刷新)串行端口缓冲区的过程是什么? [英] what is the procedure to clear (flush) the serial port buffer during serial communication in c sharp?

查看:185
本文介绍了在c Sharp中进行串行通信时,清除(刷新)串行端口缓冲区的过程是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在C Sharp中进行串行通信时,清除(刷新)串行端口缓冲区的过程是什么?

如果要使用.NET和"System.IO.Ports"命名空间中的"SerialPort"类,则可以使用"DiscardInBuffer" "或"DiscardOutBuffer"刷新输入或输出流.


what is the procedure to clear (flush) the serial port buffer during a serial communication in c sharp?

thanks

解决方案

If you are using .NET and the ''SerialPort'' class from the ''System.IO.Ports'' namespace you could use ''DiscardInBuffer'' or ''DiscardOutBuffer'' to flush the input or output stream.


这篇关于在c Sharp中进行串行通信时,清除(刷新)串行端口缓冲区的过程是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆