您好,欢迎来到中国测试科技资讯平台!

首页> 《中国测试》期刊 >本期导读>基于TCP协议的远程监控系统的实现

基于TCP协议的远程监控系统的实现

2268    2016-01-16

免费

全文售价

作者:赵军伟1, 刘勋2, 董浩3

作者单位:1. 成都理工大学自动化工程学院, 四川 成都 610059;
2. 辽宁工程技术大学电气工程控制学院, 辽宁 葫芦岛 125105;
3. 河南天方药业股份有限公司, 河南 驻马店 463000


关键词:TCP协议; 远程监控; Win32控制台; 套接字socket; API函数调用


摘要:

在VC6.0环境下,采用TCP协议和作为程序设计接口的流式套接字(SOCK_STREAM)方式,实现了远程监控系统中数据的准确、实时传输。编程中采用了基于Win32的控制台应用程序,创建和绑定套接字socket,并利用API函数调用,完成了远程的数据和状态监控功能。基本步骤是创建套接字,绑定本地地址和端口,连接通信,接收和发送消息,关闭连接套接字。经实践证明,该系统满足了远程监控对数据传输准确性的需要,达到了预期效果。


Realization of remote monitoring system based on TCP protocol

ZHAO Jun-wei1, LIU Xun2, DONG Hao3

1. College of Automation, Chengdu University of Technology, Chengdu 610059, China;
2. College of Electrical and Control Engineering, Liaoning Technical University, Huludao 125105, China;
3. Topfond Pharmaceutical Co., LTD, Zhumadian 463000, China

Abstract: Under the environment of VC6.0, local area network inspection and surveillance was implemented by applying TCP communication protocol and the streaming socket. Based on Win32 console application, creating and binding socket and directly calling back API functions were used. The First step is creating socket, the second is binding socket to local address and port, the third is connecting and communicating, the fourth is receiving and transferring data, and the last step is closing the connected socket. The application proven that it met the requirements of remote monitoring system for accurate data transmission.

Keywords: TCP protocol; Remote control; Win32 console; Socket; API function call

2010, 36(1): 78-81  收稿日期: 2009-7-26;收到修改稿日期: 2009-10-15

基金项目: 

作者简介: 赵军伟(1983-),男,河南获嘉县人,硕士研究生,专业方向为嵌入式系统应用开发。

参考文献

[1] 王 星,蔡廷文.基于VC的数据采集系统[J].机械,2006(11):41-43.
[2] 杨华荣,刘 钢,许荣彧.TCP/IP技术在监测系统中的应用[J].中国测试技术,2008,34(5):42-44.
[3] 王伯雄.测试系统原理[M].北京:清华大学出版社,2003:53-55.
[4] 孙传友,孙晓斌,汉泽西.测控系统原理与设计[M].北京:北京航空航天大学出版社,2002.
[5] 罗卓君.基于TCP/IP的智能安检网络系统设计[J].微计算机信息,2008(3):81-83.
[6] 何志丹.深入浅出Visual C++入门进阶与应用示例[M].北京:人民邮电出版社,2007:63-67.
[7] 邱中潘.Visuual C++6.0从入门到精通[M].北京:电子工业出版社,2006:48-52.
[8] 孙 鑫,余安萍.VC++深入详解[M].北京:电子工业出版社,2006:75-80.
[9] 罗 斌.Visual C++编程技巧精选500例[M].北京:中国水利水电出版社,2005:353-354.
[10] 罗君舟.TCP/IP协议及网络编程技术[M].北京:清华大学出版社,2004:181-234.
[11] 束长宝,于 照.基于TCP/IP的网络通信及其应用[J].微计算机信息,2006(12):157-159.