首页 | 本学科首页   官方微博 | 高级检索  
     

一个利用多线程及重叠I/O实现的串口通信类
引用本文:龙飞,李晓帆,蔡志开,高奇峰.一个利用多线程及重叠I/O实现的串口通信类[J].微机发展,2004,14(3):49-51,69.
作者姓名:龙飞  李晓帆  蔡志开  高奇峰
作者单位:华中科技大学电气与电子工程学院,华中科技大学电气与电子工程学院,华中科技大学电气与电子工程学院,华中科技大学电气与电子工程学院 湖北武汉430074,湖北武汉430074,湖北武汉430074,湖北武汉430074
摘    要:Win32系统中.多线程环境为实现实时串口通信提供了一个很好的解决办法。文中提出了一个多线程串口通信类,该类具有简单的接口,使用重叠I/O方式实现.不会导致线程阻塞。给出了该类的具体实现方法.并将其应用到一个直流电源的监控系统中,通过与扩展异步通信芯片配合使用,成功实现了在38400波特率下运行。

关 键 词:Windows32  操作系统  多线程  I/O方式  串口通信类  串口通信程序  人机界面
文章编号:1005-3751(2004)03-0049-03

A Serial Port Communication Class Realized with Multithread and Overlapped I/O
LONG Fei,LI Xiao-fan,CAI Zhi-kai,GAO Qi-feng.A Serial Port Communication Class Realized with Multithread and Overlapped I/O[J].Microcomputer Development,2004,14(3):49-51,69.
Authors:LONG Fei  LI Xiao-fan  CAI Zhi-kai  GAO Qi-feng
Abstract:In Win32 system, multithread environment provides a good solution for realizing serial port communication.In this paper,a serial port communication class is proposed.It has the simple interface.It adopts overlapped I/O method and thus threads won't be blocked. The realizing methods of class are also described in this paper.This class is successfully used in a DC power'smonitor and control system.This system operates well under 38400 bps baud rate.
Keywords:Win32 system  multithread  overlapped I/O  serial port communication
本文献已被 CNKI 维普 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

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