首页 | 官方网站   微博 | 高级检索  
     

基于Win32 API的通用串口通信组件的开发
引用本文:丁国兴,高琴,高伟.基于Win32 API的通用串口通信组件的开发[J].工业控制计算机,2013(11):33-35,37.
作者姓名:丁国兴  高琴  高伟
作者单位:福建省电力有限公司检修分公司;福建水口发电集团;福州大学
摘    要:介绍了基于Win32 API的通用串行通信组件的开发.采用OVERLAPPED串口操作方式,通过一种多缓冲区、多线程协同工作方式,实现了可用于各种Windows平台下串口通信编程的通用组件,并提供了手动模式及消息模式两种接口方式.分析了目前串口通信组件的不足和工业领域串口通信组件的需求;在归纳了Win32串口相关API的基础上提出了组件设计框架,对组件实现过程中的缓冲区设计、线程同步、信号系统、回调函数接口、读写线程流程等进行了详细介绍.文末给出了串口通信组件的两个应用实例,其运行效果证明了串口通信组件的设计合理、有效.

关 键 词:串口通信组件  Win32  API  多线程  OVERLAPPED方式

Development of Generic Serial Communication Component Based on Win32 APIs
Abstract:A design of generic serial communication component which can be used on windows serial communication programming is introduced.By Win32 API and OVERLAPPED manipulating mode,the component is implemented using multi-threading and multi-buffer technique,and the component offers two methods to use which are manual mode and message mode. The insignificances of current serial communication component are listed and the requirements of industrial serial communi- cation are analyzed firstly.To construct the framework of component,an induction of Win32 platform API is presented.
Keywords:serial communication component  Win32 API  multi-threading  OVERLAPPED mode
本文献已被 CNKI 维普 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司    京ICP备09084417号-23

京公网安备 11010802026262号