摘要
现有试验设备接入试验训练体系结构需要具备中间件功能的资源接入设备的支持,TCP通信线程的设计是资源接入设备与训练体系通信的关键。通过select I/O复用实现单线程TCP并发数据接收,使用队列实现单线程TCP并发数据发送,并使用信号量和队列实现TCP通信线程与外围线程的同步和通信。经过在DM642网络板上测试,资源接入设备与训练体系通讯正常。
Support of a resource insertion device with middleware functionality is needed for putting existing test facilities into test and training enabling architecture. The design of TCP communication threads is the key for the resource insertion device corresponding with the architecture. In this paper, TCP concurrent data receiving in single thread is implemented through select I/O multiplexing,while TCP concurrent data transmission in single thread is accomplished using queue technique. Synchronization and communication among TCP communication threads and peripheral threads are also achieved, by utilizing semaphore technique and queue technique. It is figured out that the resource insertion device equipped with designed threads communicates well with the architecture by means of testing on DM642 network card.
出处
《电子测量技术》
2012年第8期129-132,共4页
Electronic Measurement Technology