# A Magnetotelluric Signal Acquisition and Monitoring System Based on a Cloud Platform
## 4 Development of Terminal Control Software  
### Functional Framework  
The terminal control software is a platform running on a computer that directly interacts with users. It has a user-friendly interface and is mainly responsible for data acquisition, calculation, and display. It can also download data files from acquisition stations and the cloud platform, with its functions including acquisition control, status viewing, CLI command debugging, data downloading, timing monitoring, ground resistance measurements, and device calibration. The software's main interface displays a list of online acquisition stations on the left, including station numbers, online status, acquisition mode, and acquisition status. The right side of the main interface displays major function buttons, including MT acquisition, file download, instrument information, CLI commands, and instrument configuration.  
The control software adopts a layered structure design, enabling plug-and-play management of business modules to enhance the system's robustness, scalability, and maintainability. The overall structural design is shown in Figure 10.  
Figure 9: Structural design of the acquisition software.  
The presentation layer is the human-machine interface of the software, including MT interface, CSAMT interface, SIP interface, AMT interface, and a general interface. Each interface provides parameter input interfaces, data table display pages, and graphical display pages for the corresponding exploration methods. The general interface includes file transfer pages, instrument status viewing pages, and communication setting pages, which are common functions needed for various exploration methods.  
The business layer is the main business logic layer of the software, which is further divided into an exploration business layer, task layer, and command protocol layer. The exploration business layer mainly includes the operational logic and algorithmic logic of the different exploration methods, with the general functions including CLI command modules, device status display modules, file download modules, timing monitoring modules, ground resistance measurement modules, instrument calibration modules, and magnetic rod calibration logic modules. The task layer mainly implements batch processing of upper-level instructions and responses to feedback instructions, with basic functions such as adding, deleting, inserting, clearing, timed detection, and timeout retransmission of instructions. The command protocol layer mainly implements the encapsulation, sending, receiving, and parsing of command data packets, providing a checksum mechanism to verify the integrity of data packets, but does not guarantee the reliable transmission of data packets.  
The communication layer is mainly responsible for communication between the control software and the acquisition software. The communication module in this layer supports multiple underlying communication protocols, such as Zigbee, Ethernet, and WiFi. The communication module provides a unified calling interface for upper applications, shielding the differences in underlying communication protocols and facilitating future expansion of communication protocols.