基于Socket的空调远程控制系统设计
2021-05-09许丽



摘 要:探讨了基于Socket的空调远程控制系统设计和实现,介绍了系统设计的总体方案,并在Delphi编程环境下实现了基于局域网的控制系统。该系统由服务器及客户端组成,服务器负责下达指令,客户端接收指令,采集空调机组的运行数据上报给服务器。服务器与客户端之间采用Socket进行远程通信。实验证明,该系统能有效地实现一对多的实时控制。
关键词:Socket;Delphi;空调;远程控制
中图分类号:TP311 文献标识码:A文章编号:2096-4706(2021)20-0024-04
Design of Air Conditioner Remote Control System Based on Socket
XU Li
(Nanjing Tica Climate Solutions Co.,Ltd., Nanjing 210046, China)
Abstract: This paper discusses the design and implementation of air conditioner remote control system based on Socket, introduces the overall scheme of system design, and realizes the control system based on LAN in Delphi programming environment. The system consists of a server and some clients. The server is responsible for issuing instructions. The clients receive instructions, collect the operation data of the air conditioning unit and report them to the server. Socket is used for remote communication between server and clients. Experiments show that the system can realize one-to-many real-time control effectively.
Keywords: Socket; Delphi; air conditioner; remote control
0 引 言
随着楼宇自动化的不断发展,空调系统使用传统的工业现场控制管理模式已无法适应需求,而网络技术的发展,使远程控制逐渐进入人们的意识。用户及维护人员不仅可以通过操作遥控器或线控器控制空调,也可通过计算机远程遥控空调。这大大提高了客户及维护人员的运行维护能力,也降低了管理费用。本系统在Delphi编程环境下,利用Socket建立服务器与客户端的连接,对空调系统实施远程控制。
1 相关知识简介
1.1 TCP/IP
TCP/IP(Transmission Control Protocol/Internet Protocol)即传输控制协议/网间协议,定义了主机如何连入因特网及数据如何在它们之间传输的标准。TCP/IP系列协议歸类到四个抽象层中,应用层、传输层、网络层、数据链路层。每一抽象层建立在低一层提供的服务上,并且为高一层提供服务。
1.2 Socket
Socket是在应用层和传输层之间的一个抽象层,它把TCP/IP层复杂的操作抽象为几个简单的接口供应用层调用已实现进程在网络中通信。服务器Socket与客户端Socket建立通过三次握手建立可靠的连接。
1.3 Delphi
由Borland公司推出的Delphi是全新的可视化编程环境,它提供了一种方便、快捷的Windows应用程序开发工具。……
