节点文献

实现基于Visual C++7.0的多线程串口通信

Implementation of multithread serial communication with Visual C++7.0

  • 推荐 CAJ下载
  • PDF下载
  • 不支持迅雷等下载工具,请取消加速工具后下载。

【作者】 李东晓李晓明肖鲲张发忠彭家银

【Author】 LI Dong xiao,LI Xiao ming,XIAO Kun,ZHANG Fa zhong,PENG Jia yin (Department of Electrical Engineering,Wuhan University,Wuhan 430072,China)

【机构】 武汉大学电力工程系武汉大学电力工程系 湖北武汉430072湖北武汉430072湖北武汉430072

【摘要】 串口通信程序多是用微软提供的MSComm控件实现的 ,但MSComm控件实现方法很难加入多线程技术提高程序的执行效率 ,尤其对微机与多台智能设备之间同时进行通信 ,这种方法的单线程局限性就更明显。为此 ,深入介绍了 32位串口通信的结构体和WindowsAPI函数及多线程编程技术 ,并结合面向对象的编程思想 ,将WindowsAPI函数、结构体及多线程技术进行了封装 ,形成新的串口通信类CCommunication ,该类可以完成MSComm控件的所有功能 ,用该类开发的程序比用MSComm控件开发的程序的执行速度快。应用该类可很方便地实现基于VisualC + + 7.0多线程串口通信 ,且具有通用性好、使用性强等优点。

【Abstract】 Most serial communication programs are developed with MSComm control supplied by Microsoft,but Multithread technology could not be easily added into it.The defect is more noteworthy in multi CPU communication.The structs and Windows API functions of 32?bit serial communication and the multithread programming technique are introduced.According to the OOP,the structs and functions are encapsulated to form a new class CCommunication.It can realize all the functions produced by MSComm control,and the efficiency of the program developed with it is better than that with the MSComm control.The multithread serial communication programming based on Visual C++7.0 becomes easier with better transplantability and practicability.

  • 【文献出处】 电力自动化设备 ,Electric Power Automation Equipment , 编辑部邮箱 ,2002年09期
  • 【分类号】TP311.52
  • 【被引频次】16
  • 【下载频次】277
节点文献中: 

本文链接的文献网络图示:

本文的引文网络