检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
机构地区:[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[自动化与计算机技术—检测技术与自动化装置]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:3.128.171.15