论文部分内容阅读
针对目前串口通信组件设计中的异步调用与并发运行的问题,以及功能上局限在串口管理或简单数据收发的缺陷,采用分布式对象组件模型(DCOM)提出了一种新的设计方案。设计了异步缓冲区模板类和线程管理器,实现了通信组件的异步访问接口。通过IDL设计并实现了便于调用的参数传递方式,通过接口查询实现组件内COM对象间的调用。调试与运行测试结果表明,该组件可被本地或远程调用,并可反复运行且无资源泄漏。
Aiming at the problem of asynchronous calling and concurrent running in the design of serial communication components and the limitation of function management on serial management or simple data sending and receiving, a new design scheme is proposed by using Distributed Object Component Model (DCOM). Asynchronous buffer template class and thread manager are designed to realize the asynchronous access interface of communication components. Through the IDL design and implementation of the parameters of the transfer method is easy to call, through the interface query component COM objects within the call. Debug and run Test results show that the component can be called locally or remotely, and can be run repeatedly without resource leaks.