期刊文献+

基于事件驱动方式的高速串口通信方案的设计 被引量:3

Design of High Speed Serial Communication Based on Event-driven Mode
下载PDF
导出
摘要 针对串口通信中系统资源利用不足的问题,提出了一种基于多线程技术和事件驱动方式的串口通信方案。该方案在读取串口数据、对串口通信的错误及通信事件进行监视时,用OVERLAPPED结构体中的hEvent参数指定I/O操作完成后所触发的事件对象。然后,用等待函数检查事件对象的当前状态。最后,当事件对象为有信号状态时完成后续操作。在Win7操作系统的Visual C++开发平台下,结合Windows通信API控制串口的编程方法进行仿真测试。测试结果表明该方案能有效解决采用查询方式时因数据高速涌入造成数据丢失的问题。 This paper proposes a High Speed Serial Communication scheme,which is based on multithread technology and Event-driven mode.The scheme can solve the problem of the underutilization in serial communication.In our scheme,when reading serial data,monitoring the communication error and communication event,the hEvent parameter of the OVERLAPPED structure is used to specify the event object that is triggered by the I/O operation after it is finished.Then,this paper use the wait function to check the current state of the event object.Finally,all the remaining operations are run when the event object is signaling status.In Visual C++ development platform,this paper conduct the computer simulation experiment by exploiting the programming method of communication API in the environment of Win7 operation system.
出处 《工业控制计算机》 2014年第5期14-16,共3页 Industrial Control Computer
关键词 串口通信 多线程 异步操作 事件 high speed serial communication,multithread,asynchronous operation,event
  • 相关文献

参考文献4

二级参考文献15

  • 1苏岳龙,李贻斌,宋锐.基于VC++6.0的高速串口通信数据采集系统[J].微计算机信息,2005,21(5):147-148. 被引量:41
  • 2Charles Petzold.Windows程序设计[M].北京:北京大学出版社,1999,10..
  • 3SteveTeiceira 龙劲松 等译.Xavier Paeheoo Delphi6开发人员指南[M].北京:机械工业出版社,2002..
  • 4求是科技,李现勇.Visual C++串口通讯技与工程实践[M].北京:人民邮电出版社,2004.
  • 5FX系列微型可编程控制器用户手册(通信篇)[Z].三菱电机自动化有限公司,2006.
  • 6李宝峰,富弘毅,李韬.多核程序设计技术[M].北京:电子工业出版社,2007.
  • 7RICHTERJeffrey.Windows核心编程[M].北京:机械工业出版社,2008.
  • 8侯捷.Win32多线程程序设计[M].武汉:华中科技大学出版社,2006.
  • 9董红政,王忠勇,史晓鹏.基于MSComm控件实现串行通信的方法[J].微计算机信息,2007(27):145-147. 被引量:30
  • 10Chris Cant 孙义 马莉波 国雪飞 等译.WindowsWDM设备驱动程序开发指南[M].北京:机械工业出版社,2000..

共引文献53

同被引文献23

引证文献3

二级引证文献12

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部