Method for configuring ip of qws oscillograph based on qt interface program
Patent Information
- Application Number
- CN202411988773.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-15
AI Technical Summary
容易输入错误,网口多了就更容易输入错误
[0007] The beneficial effect of this method is that the configuration of the ip route of the qws recorder is realized based on the qt interface program. Compared with directly operating the vi editor to open the configuration file, it is user-friendly and less likely to make mistakes.
Smart Images

Figure CN119835151A_ABST
Abstract
Description
Technical Field
[0001] This method involves the IP configuration method of the qws recorder. Background Art
[0002] The existing QWS recorder usually modifies the IP manually in the corresponding configuration file. Use an editor to open the configuration file in the terminal, and then manually enter the IP address and other information. It is easy to make mistakes, and it is easier to make mistakes when there are more network ports.
[0003] This article provides a method to modify the IP through the interface program under the qws recorder. Summary of the invention
[0004] At present, to configure the IP of the QWS recorder, you first open the terminal, or remotely connect to the system through SSH, then open the IP configuration file with the vi editor, manually enter the IP and other information, and save it. This operation is cumbersome and prone to input errors.
[0005] The technical solution used by this method to solve its technical problem is: a method for managing IP based on QT interface program and TCP server program. First, input IP and routing information through QT interface program to generate a script file, and then the interface program sends it to TCP server program through TCP connection. The server program executes the script and saves the script file to the corresponding directory. This script has also been added to the startup script that runs at startup, so that the script can be executed to configure IP and routing information the next time the computer is started.
[0006] The above configuration of the QWS recorder IP based on the QT interface program configuration mainly consists of several parts. The QT interface program inputs the IP and route, and the server program is responsible for receiving the script file generated by the information input in the interface, executing and saving the script to the specified location. The script file will also be executed when the computer is started.
[0007] The beneficial effect of this method is that the configuration of the IP routing of the QWS recorder is realized based on the Qt interface program, which is humanized and less prone to errors compared to directly operating the vi editor to open the configuration file. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] Figure 1 This is an example diagram of configuring IP in the Qt interface.
[0009] Figure 2 This is an example diagram of the ip configuration script. DETAILED DESCRIPTION
[0010] [Example 1] In the qws recorder (QWS stands for Qt windows system, which is a window system developed by QT. Qt is a cross-platform C++ graphical user interface application framework. The qws recorder refers to a program that uses qws to display the recorder without a desktop system), since there is no desktop system, the IP can only be configured in the terminal or by connecting to the system with SSH (SSH stands for secure shell, SSH is a network protocol used for encrypted login between computers) and using an editor to open the system's own IP configuration file, and then manually enter the IP address and other information, which is prone to input errors. This method uses the qt interface program to modify the IP configuration and perform legality judgment when entering.
[0011] The following is the specific implementation plan: The system starts running the TCP server program. The server program is used to receive the QT interface program for communication; refer to Figure 1 , start the Qt interface program to configure the IP, enter the IP address in the IP input box, and make a legal judgment on the input; After the QT interface program is configured, a script file is generated and sent to the TCP server program; The server program receives the script and executes it to achieve immediate effect; The server program places the custom script file in the specified directory so that the qws recorder initialization script can be called when the system is started, so as to achieve the purpose of automatically configuring the IP after the system is started; Reference Figure 2 , which is the content of the custom script.
Claims
1. A method for configuring the IP of a QWS recorder based on a QT interface. Involving a method for configuring the IP of a QWS recorder. Including: Qt interface program, TCP server program, script program for configuring IP and routing. The Qt interface program is used to input legal IP, routing and other information. After the input is completed, it is composed of a shell script and sent to the TCP server program through the TCP link. After the server program receives the script, it executes the script and saves it. And this script has also been added to the startup script that runs at boot time, and is used to call this script after the system starts.
2. The method according to claim 1, characterized in that The IP configuration of the qws recorder is input based on the qt interface program and passed to the server program to execute the script configuration.
3. The method according to claim 1, characterized in that The IP and routing information of multiple network ports are placed in the script file, which is used to configure them instead of directly configuring them through the Qt interface program.