• 7120阅读
  • 3回复

用QSocketNotifier监测串口问题 [复制链接]

上一主题 下一主题
离线lzpmail
 
只看楼主 正序阅读 楼主  发表于: 2011-04-22
— 本帖被 XChinux 从 Qt基础编程 移动到本区(2011-04-22) —
各位高手好,我现在用Qt 4.7写了一个小程序,其间用QSocketNotifier监测串口来读取数据,但当数据量比较大时,容易丢数据,请问这是什么原因,请高手指点有什么补救的方法或有什么好方法来保证串口读取大量数据。谢谢
离线kanger
只看该作者 3楼 发表于: 2012-10-06
引用第1楼yaotong195于2011-04-22 16:06发表的  :
使用这个要遵循三步:
1、Disable the notifier.
2、Read data from the socket.
3、Re-enable the notifier if you are interested in more data  

学习了,正为这个问题发愁呢!!
离线lzpmail
只看该作者 2楼 发表于: 2011-04-22
没看懂,你是意思是在有数据读时,要disable notifier吗,然后读完数据再enable notifier吗
离线yaotong195

只看该作者 1楼 发表于: 2011-04-22
使用这个要遵循三步:
1、Disable the notifier.
2、Read data from the socket.
3、Re-enable the notifier if you are interested in more data
快速回复
限100 字节
 
上一个 下一个