基于Win32 API的通用串口通信组件的开发  被引量:4

Development of Generic Serial Communication Component Based on Win32 APIs

在线阅读下载全文

作  者:丁国兴[1] 高琴 高伟[3] 

机构地区:[1]福建省电力有限公司检修分公司,福建福州350013 [2]福建水口发电集团,福建福州350002 [3]福州大学,福建福州350108

出  处:《工业控制计算机》2013年第11期33-35,37,共4页Industrial Control Computer

摘  要:介绍了基于Win32 API的通用串行通信组件的开发。采用OVERLAPPED串口操作方式,通过一种多缓冲区、多线程协同工作方式,实现了可用于各种Windows平台下串口通信编程的通用组件,并提供了手动模式及消息模式两种接口方式。分析了目前串口通信组件的不足和工业领域串口通信组件的需求;在归纳了Win32串口相关API的基础上提出了组件设计框架,对组件实现过程中的缓冲区设计、线程同步、信号系统、回调函数接口、读写线程流程等进行了详细介绍。文末给出了串口通信组件的两个应用实例,其运行效果证明了串口通信组件的设计合理、有效。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.

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

分 类 号:TP273[自动化与计算机技术—检测技术与自动化装置]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象