Universal display and control platform for electronic product development
By designing a general display and control platform for electronic product development, and using configuration files to automatically control instructions and status display, the problems of low efficiency and high cost of software development in the existing technology are solved, and cross-platform compilation and multi-hardware adaptation are realized. Reduces the technical requirements and labor costs of developers.
Patent Information
- Application Number
- CN202411307703.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-19
- Publication Date
- 2025-01-03
AI Technical Summary
The existing technology cannot achieve fully automated software development, especially in electronic product development, where the stability and reusability of the software architecture are insufficient, resulting in low development efficiency and high cost.
A general display and control platform for electronic product development was designed. By decomposing the platform into communication modules, analysis modules and display modules, and adapting to different projects through configuration files, using communication configuration files, protocol configuration files and interfaces. Configuration files to automate control commands and status displays.
It realizes cross-platform compilation and adapts to multiple hardware products, reduces the technical requirements and labor costs of developers, and improves the adaptability and software stability of the organization.
Smart Images

Figure CN119248229A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of software development, and in particular to a universal display and control platform for electronic product development. Background Art
[0002] During the development of electronic products, the display control software (display control platform) can display the working status and BIT information of the device, send instructions to the device, and conduct functional and performance tests. It is an indispensable debugging tool. Each hardware product needs to be equipped with a display control software for testing. There is no need to rewrite the code every time. Even if you learn from the old project and make some modifications, the newly modified part will have bugs and lack of stability.
[0003] The development cycle of hardware (electronic products) is long and subject to many restrictive factors. Generally, it is necessary to wait until the components are in place and assembled before software joint debugging can be carried out, and the cycle is generally more than 3 months. The development cycle of software (display and control platform) is short and is calculated in weeks. After the hardware is put into production, there are generally fewer changes, while the software changes are larger. For example, the communication method, communication protocol, and display style will change frequently. Each project is equipped with a display and control developer, and the labor cost is high.
[0004] In a project-centered organization, a universal display and control platform is an important means to improve software stability and software development efficiency. However, fully automatic programming technology is not yet available and requires personnel modification and improvement in the later stage. It is urgent to develop a highly reusable, module-integratable, and parameter-configurable software architecture.
[0005] Traditional software development methods include requirements, design, development, testing, etc. With the development of technology, the automatic generation of display and control software has become possible, especially in specific application scenarios and industries, mainly including model-driven development (MDD), low-code platforms, and artificial intelligence technologies.
[0006] Model-driven development is a software engineering approach that uses the Unified Modeling Language (UML) or other modeling tools to define the structure and behavior of a system and then automatically generates Java, C++, or Python code.
[0007] The low-code development platform provides a large number of pre-built UI components and functional modules, allowing developers to quickly generate applications by dragging components, configuring parameters, etc., without having to write code manually. Since the release of ChatGPT, generative AI has made rapid progress in automatic code completion and program development. It can directly generate C++ and other language codes based on natural language. It can identify common operating modes and control logic, and automatically generate corresponding control software.
[0008] The above three methods have improved the productivity of developers, but they still cannot achieve full automation. Model-driven development is of great help to software architecture, but manual programming is still required for later functional implementation; low-code development platform technology is very friendly to interface development and design, but designers are still needed to design and code functions and business logic; generative AI-based technology has problems such as hallucinations and weak logic, and personnel are required to confirm and test after coding is completed. The above three automatic coding methods are still some distance away from automated programming.
[0009] The above problems need to be solved urgently. Therefore, a universal display and control platform for electronic product development is proposed. Summary of the invention
[0010] The technical problem to be solved by the present invention is: how to provide a highly reusable, module-integrated, parameter-configurable universal display and control platform architecture, and provide a universal display and control platform for electronic product development.
[0011] The present invention solves the above technical problems through the following technical solutions. The present invention includes a communication module, an analysis module and a display module;
[0012] The communication module is used to transmit data to and from the electronic product, send control instructions, and receive status feedback data;
[0013] The analysis module is used to receive the control information of the interface operation, perform protocol conversion and packaging on the control information, and send the control instruction to the communication module; and receive the status feedback data of the communication module, unpack and perform protocol conversion on the status feedback data, and send the status information to the display module;
[0014] The display module is used to receive operation commands from the mouse and keyboard, send control information to the analysis module, and receive status information from the analysis module, and display the status on the interface;
[0015] The universal display and control platform realizes the setting of control instructions of electronic products of different projects and the display of working status by modifying configuration files.
[0016] Furthermore, the communication module includes a communication management module and a communication underlying module. The communication management module is used to read the communication configuration file, establish the communication object according to the communication mode and configuration parameters, and the communication underlying module is used to implement the specific communication mode, and the communication mode includes UDP communication and serial port communication; the parsing module includes a parsing management module, a parsing underlying module and a protocol management module. The parsing management module is used to read the parsing configuration file, establish the parsing object according to the configuration content and the parsing mode, and the parsing underlying module is used to establish the protocol management object to implement the protocol packaging and parsing work, and the parsing types include UDP parsing and serial port parsing. The protocol management module reads the protocol configuration file to implement the protocol conversion function; the display module includes an interface management module and an interface underlying module. The interface management module is used to manage the interface object and interface layout, and the interface underlying module is used to read the interface configuration file to implement the interface design.
[0017] Furthermore, the configuration file includes a communication configuration file, a protocol configuration file, a parsing configuration file and an interface configuration file, wherein the communication configuration file is used to configure the communication method and parameters between the electronic product and the general display and control platform, and the file name cannot be modified; the protocol configuration file is used to configure the protocol interface of each type of electronic product itself, and the file name can be modified, and multiple protocol files can be added. Only communication protocols of the same format can be configured in the same protocol file; the parsing configuration file is used to configure the protocol file corresponding to the communication method, and each communication object corresponds to a protocol file; the interface configuration file is used to configure the interface required for electronic product control and status display, and the file name cannot be modified, and the table format in the file cannot be modified.
[0018] Furthermore, in the communication configuration file, when the communication mode is UDP communication, the configured parameters include the communication object name, local IP, multicast IP, local port, receive blocking time and receive buffer size; when the communication mode is serial port communication, the configured parameters include serial port object name, serial port number, baud rate, stop bit, check bit, data bit, data flow control and working mode.
[0019] Furthermore, in the protocol configuration file, the communication protocol list and the communication protocol parameters are configured, wherein the communication protocol list includes the following attribute information: serial number, name, definition, function number and length; the communication protocol parameters include serial number, data item name, data item definition, data type, byte position, bit position, bit length, byte length and default value.
[0020] Furthermore, in the parsing configuration file, the communication object (defined in the communication configuration file) and the protocol configuration file are configured to establish a corresponding relationship between the communication object and the protocol configuration file.
[0021] Furthermore, in the interface configuration file, the interface list and interface parameters are configured, wherein the interface list includes the following attribute information: serial number, name, definition, type; the interface parameters include serial number, name, definition, type, parent window, number of layout columns and description.
[0022] Furthermore, the specific startup process of the universal display and control platform is as follows:
[0023] S11: Edit the communication configuration file to determine the communication mode and parameters of the electronic product;
[0024] S12: Edit the protocol configuration file to clarify the detailed definition of each protocol;
[0025] S13: Edit and parse the configuration file to establish a corresponding relationship between the communication object and the protocol configuration file;
[0026] S14: Design the interface according to the requirements of the general display and control platform and edit the interface configuration file;
[0027] S15: Save all files, run the executable file, and then start the universal display and control platform.
[0028] Furthermore, the result verification process of the universal display and control platform is as follows:
[0029] S21: Communication connection
[0030] Connect the communication cable, open the test tool debugging assistant, set the communication parameters, and establish a communication connection with the display and control software;
[0031] S22: Control command verification
[0032] Use the keyboard to set the parameter value to be sent, use the mouse to click the button to send the control information, and observe whether the test tool debugging assistant receives the control information, whether the control information format is normal, and whether the control information parameters are correct;
[0033] S23: Status feedback verification
[0034] Send status feedback data to the test tool debugging assistant, and observe whether the display interface receives the status information, whether the display status information format is normal, and whether the status information value is correct.
[0035] Compared with the prior art, the present invention has the following advantages: the universal display and control platform for electronic product development realizes the goal of solving cross-platform compilation and adapting to multiple hardware products with a set of codes, that is, as long as the project leader masters the use of the display and control platform, there is no need to equip each project team with display and control developers, and the display and control developers only need to develop different plug-ins for common problems; the present invention ensures the stability of the display and control platform while maintaining a unified style, which can reduce the technical requirements for developers and increase the adaptability of the organization to personnel flow. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 It is a schematic diagram of the structure of a universal display and control platform for electronic product development in the first embodiment of the present invention;
[0037] Figure 2 This is a schematic diagram of file relationships in Embodiment 1 of the present invention;
[0038] Figure 3 This is a schematic diagram of the startup process of the universal display and control platform for electronic product development in the first embodiment of the present invention;
[0039] Figure 4 is a diagram showing an example of a communication configuration in Embodiment 1 of the present invention;
[0040] Figure 5 This is an example diagram of a protocol list in a protocol configuration file in Embodiment 1 of the present invention;
[0041] Figure 6 This is an example diagram of protocol parameter configuration in Embodiment 1 of the present invention;
[0042] Figure 7 This is an example diagram of the parsing configuration in the first embodiment of the present invention;
[0043] Figure 8 This is an example diagram of the interface configuration in the second embodiment of the present invention;
[0044] Fig. 9 This is an example diagram of interface parameters in the second embodiment of the present invention, where the radar control instruction is working instruction 1;
[0045] Fig.10 This is an example diagram of interface parameters in the second embodiment of the present invention, and the radar state is the working state;
[0046] Fig.11 This is an example diagram of the interface display effect in the second embodiment of the present invention. DETAILED DESCRIPTION
[0047] The following is a detailed description of an embodiment of the present invention. This embodiment is implemented on the premise of the technical solution of the present invention, and a detailed implementation method and a specific operation process are given, but the protection scope of the present invention is not limited to the following embodiment.
[0048] Embodiment 1
[0049] This embodiment provides a technical solution: a universal display and control platform for electronic product development. According to the characteristics of the display control software (display and control platform), it is decomposed into three modules: communication, analysis, and display. Interfaces such as communication configuration files, analysis configuration files, protocol configuration files, and display configuration files are designed.
[0050] In order to realize the display and control development requirements of different projects that can automatically adapt to the configuration files, we have made the following special designs:
[0051] 1. System structure
[0052] This software mainly includes three modules: communication module, analysis module and display module. The data relationship between each module is as follows: Figure 1 shown.
[0053] The functions of each module are as follows:
[0054] The communication module is mainly responsible for data transmission between the product, sending control instructions, and receiving status feedback data;
[0055] The parsing module is mainly responsible for receiving the control information of the interface operation, performing protocol conversion and packaging on the control information, and sending the control instructions to the communication module; receiving the status feedback data of the communication module, unpacking and performing protocol conversion on the status feedback data, and sending the status information to the display module;
[0056] The display module is mainly responsible for receiving operation commands from the mouse and keyboard, sending control information to the analysis module; receiving status information from the analysis module, and displaying the status on the interface.
[0057] The functional composition of each module is shown in the following table.
[0058] Table 1-1 Functional composition of the module
[0059]
[0060] 2. Operating environment
[0061] The parametric display and control software needs to run in a certain environment. In the afternoon, we will introduce the software's requirements for hardware and system environment.
[0062] 2.1 Hardware environment requirements
[0063] The minimum requirements for the basic computer operating hardware environment are shown in the following table.
[0064] Table 2-1 Operating hardware environment
[0065] Configuration items illustrate CPU Intel(R)Core(TM)i5 and other CPU models Memory ≥4GB harddisk ≥1TB Network Card 100 / 1000M
[0066] 2.2 Software Environment Requirements
[0067] The basic computer operating software environment is shown in the following table.
[0068] Table 2-2 Operating software environment
[0069] project illustrate operating system Windows, Linux, etc.
[0070] 3. Package composition
[0071] The main directory of the parameterized display and control software program is SarOWS / bin, which is mainly composed of the following parts: executable files, dynamic link library files, resource folders, communication configuration folders (parsing configuration files and communication configuration files are stored in this folder), protocol configuration folders, and interface configuration folders.
[0072] 3.1 Executable Files
[0073] Executable file name: SarOWS / bin / SarOWSMain.exe;
[0074] Start the parameterized display and control software: double-click or right-click to open the file SarOWSMain.exe.
[0075] 3.2 Dynamic link library files
[0076] The dynamic link library files are distributed in the SarOWS / bin / directory. The file descriptions are shown in the following table.
[0077] Table 3-1 Dynamic link library list
[0078]
[0079] 3.3. Resource folder
[0080] The resource configuration folder is: SarOWS / bin / resource, and the file description is shown in the following table.
[0081] Table 3-2 Resource file list
[0082]
[0083]
[0084] 3.4. Communication configuration folder
[0085] The communication configuration folder is: SarOWS / bin / Config, and the file description is shown in the following table.
[0086] Table 3-3 Communication configuration file list
[0087] Serial number Software Modules File Type file name illustrate 1 Communication Module Communication Profiles CommSettings.xml Configure communication mode and communication parameters 2 Parsing module Parsing configuration files ProcessSettings.xml Configure parsing methods and parsing parameters
[0088] 3.5. Protocol configuration folder
[0089] The protocol configuration folder is: SarOWS / bin / Protocol. The file description is shown in the following table.
[0090] Table 3-4 Protocol configuration file list
[0091]
[0092] 3.6. Interface configuration folder
[0093] The interface configuration folder is: SarOWS / bin / Form. The file description is shown in the following table.
[0094] Table 3-5 Interface configuration file list
[0095] Serial number Software Modules File Type file name illustrate 1 Interface module Interface configuration file Widget.xlsx Configuration interface display
[0096] 3.7. Relationship between various files
[0097] The parameterized display and control software is mainly used to realize a universal display and control software platform, which can realize the setting of control instructions and display of working status of electronic products of different projects by modifying the configuration files.
[0098] The software configuration file mainly includes four types of files:
[0099] 1) Communication configuration file: configure the communication mode and parameters between the electronic product and the display and control software. The file name cannot be modified;
[0100] 2) Protocol configuration file: configure the protocol interface of each type of electronic product. The file name can be modified and multiple protocol files can be added. Only the same format of communication protocol can be configured in the same protocol file.
[0101] 3) Parse the configuration file: configure the protocol file corresponding to the communication method, each communication object corresponds to a protocol file;
[0102] 4) Interface configuration file: configure the interface required for electronic product control and status display. The file name cannot be modified, and the table format in the file cannot be modified.
[0103] The dynamic link library is mainly composed of the basic functional modules of the software. It is complementary to the configuration file and is an indispensable part of the software operation. The relationship between the files is as follows Figure 2 shown.
[0104] 4. Usage process
[0105] The configuration of parameterized display and control software involves multiple files and needs to be used according to certain procedures and specifications.
[0106] 4.1 Software Instructions
[0107] 1) Executable files and dynamic link library files need to remain intact;
[0108] 2) The configuration file directory cannot be changed, and the names of other files except the protocol file cannot be changed;
[0109] 3) The configuration file format cannot be modified and the parameters must be written according to the specifications.
[0110] 4.2 Software Usage Process
[0111] 1) Edit the communication configuration file to determine the communication mode and parameters of the electronic product;
[0112] 2) Edit the protocol configuration file to clarify the detailed definition of each protocol;
[0113] 3) Edit and parse the configuration file to establish the corresponding relationship between the communication object and the protocol configuration file;
[0114] 4) Design the interface according to software requirements and edit the interface configuration file;
[0115] 5) Save all files and run the executable file to start the software.
[0116] The use process of parameterized display and control software is as follows: Figure 3 shown.
[0117] 4.3 Software Result Verification
[0118] After the software is started, the software interface can be used to observe the display effect, modify the interface configuration file for adjustment, and the communication and analysis results can be verified through the test tool. Commonly used test tools are network debugging assistant and serial port debugging assistant. The messages that need to be verified are mainly control instructions and status feedback data.
[0119] The following is the software verification process.
[0120] 1) Communication connection
[0121] Connect the communication cable, open the test tool debugging assistant, set the communication parameters, and establish a communication connection with the display and control software.
[0122] 2) Control instruction verification
[0123] Use the keyboard to set the parameter value to be sent, use the mouse to click the button to send the control information, and observe whether the debugging assistant receives the control information, whether the control information format is normal, and whether the control information parameters are correct.
[0124] 3) Status feedback verification
[0125] Send status data to the test tool debugging assistant, and observe whether the display interface receives the status information, whether the display information format is normal, and whether the information value is correct.
[0126] 5. Communication mode configuration
[0127] Electronic product communications mainly include: UDP, TCP, RS232, RS422, 1553B, CAN, DDS, fiber optic daughter card and other methods. Currently, the most commonly used methods are network and serial port communication. The parameterized display and control software designs a unified communication interface, and can configure different communication methods and parameters according to needs to interact with external information.
[0128] 5.1 Communication Configuration Description
[0129] The communication configuration needs to comply with the following requirements:
[0130] 1) File directory name requirements:
[0131] The file directory is: SarOWS / bin / Config;
[0132] The file name is: CommSettings.xml.
[0133] 2) XML file format requirements:
[0134] The file starts with: <?xml version="1.0" encoding="UTF-8"?>;
[0135] The file begins with: <commsettings>;
[0136] The communication object is: <********** / >;
[0137] The file ends with:< / commsettings> .
[0138] 3) Requirements for communication partners:
[0139] a) Multiple communication modes can be configured at the same time, and different communication modes have different types of communication parameters;
[0140] b) Multiple communication objects can be configured at the same time, each communication object is an independent line (such as Figure 4 UDP1 and
[0141] SERIAL1);
[0142] c) Each communication object has a unique name (such as UDP1), and the name must contain the communication method keyword
[0143] (such as UDP in UDP1);
[0144] d) Each communication object contains multiple parameters, each parameter contains a parameter name, an equal sign, and a parameter value (such as UDP
[0145] Local IP address in LocalIP = "192.168.8.20");
[0146] e) The parameter name is a fixed English name, the parameter value is placed in "", and different parameters are separated by spaces (such as UDP1
[0147] LocalIP="192.168.8.20"LocalPort="20000").
[0148] Communication configuration example Figure 4 shown.
[0149] 5.2. UDP communication configuration
[0150] UDP communication configuration follows the above configuration requirements. Each UDP object is a line, starting with "<" and ending with " / >". The object name contains the "UDP" keyword. Each object name cannot be repeated and is a unique identifier.
[0151] The parameters included in the UDP communication configuration are shown in the following table.
[0152] Table 5-1 UDP communication configuration list
[0153]
[0154] The common parameters for UDP communication configuration are local IP and local port. When configuring, you only need to change the local IP to the IP address required for communication and the local port to the communication port, save the configuration file, and re-run the software.
[0155] 5.3. Serial communication configuration
[0156] Serial communication includes RS232, RS422 and other communication interfaces. Serial communication configuration follows the above configuration requirements. Each serial port object is a line, starting with "<" and ending with " / >". The object name contains the "SERIAL" keyword. Each object name cannot be repeated and is a unique identifier.
[0157] The parameters included in the serial port communication configuration are shown in the following table.
[0158] Table 5-3 Serial communication configuration list
[0159]
[0160]
[0161] The commonly used parameters for serial communication configuration are the serial port number and baud rate. When configuring, you only need to change the serial port number to the one required for communication, the baud rate to the baud rate required for communication, save the configuration file, and re-run the software.
[0162] 6. Communication protocol configuration
[0163] 6.1、Communication protocol configuration instructions
[0164] The communication protocol configuration needs to comply with the following requirements:
[0165] 1) File directory name requirements:
[0166] The file directory is: SarOWS / bin / Protocol;
[0167] The file name is: Protocol.xlsx, and the communication file name can be modified (such as Protocol_udp.xlsx).
[0168] 2)XLSX file format requirements:
[0169] The file starts with: SHEET1 in the EXCEL table is the protocol list, and subsequent SHEETs are named after the definition names in the protocol list;
[0170] The file contents are: protocol list form, protocol parameter form;
[0171] The communication protocol is: protocol list serial number, name, definition, function number, length; protocol parameter serial number, data item definition, data type, byte position, bit position, bit length, byte length, default value
[0172] 3) Communication protocol requirements:
[0173] a) Each communication object corresponds to a communication protocol, such as CTRL_CMD;
[0174] b) The protocol file name can be modified, and multiple protocol files can be added. Only the same format of communication protocol can be configured in the same file;
[0175] c) The data item definitions in the protocol list correspond one-to-one to the data item definitions of the protocol parameters.
[0176] 6.2. Communication protocol list configuration
[0177] The protocol list configuration follows the above configuration requirements to create a new SHEET1 table named PROTOCOL_LIST and can be modified (such as Protocol_udp.xlsx). Each row contains the sequence number, name, definition, function number, and length information.
[0178] This project has multiple protocols. The working mode control instructions are selected in this article. The specific instructions are shown in the following table.
[0179] Table 6-1 Communication protocol list
[0180]
[0181] Configuration protocol list such as Figure 5 shown.
[0182] 6.3 Communication protocol parameter configuration
[0183] Create a new parameter table in the EXCEL table. The name of the parameter table must be the protocol definition keyword such as CTRL_CMD. List the specific parameter information of the protocol, including sequence number, data item, data item definition, data type, byte position, bit position, bit length, byte length, and default value. The specific description is shown in the following table.
[0184] Table 6-2 Communication protocol list
[0185]
[0186] Protocol parameter configuration such as Figure 6 shown.
[0187] 7. Data parsing configuration
[0188] 7.1、Analysis Configuration Instructions
[0189] The parsing configuration needs to comply with the following requirements:
[0190] 1) File directory name requirements:
[0191] The file directory is: SarOWS / bin / Config;
[0192] The file name is: ProcessSettings.xml.
[0193] 2) XML file format requirements:
[0194] The file starts with: <?xml version="1.0" encoding="UTF-8"?>;
[0195] The file begins with: <processsettings>;
[0196] Parsing parameters are: <********** / >;
[0197] The file ends with:< / processsettings> .
[0198] 3) Parsing parameter configuration requirements:
[0199] a) The name of each parsed object is consistent with the communication object name in the communication configuration file, such as UDP1;
[0200] b) The communication protocol used by the parsed object is referenced by the file name, such as Protocol_udp.xlsx.
[0201] The parsing configuration example is as follows Figure 7 shown.
[0202] 7.2. Parsing parameter configuration
[0203] The data parsing configuration follows the above configuration requirements. Each parsing object is a line, starting with "<" and ending with " / >". The object name is consistent with the corresponding communication object. Each object name cannot be repeated and is a unique identifier. The parameters included in the data parsing configuration are shown in the following table.
[0204] Table 7-1 Analysis parameter configuration list
[0205] Serial number Parameter Type Parameter name illustrate 1 Resolving object names UDP*** / SERIAL*** Same as the communication object 2 Protocol Profiles Protocol Communication protocol file
[0206] When configuring data analysis, it corresponds to the communication configuration file and the protocol configuration file. You only need to change the analysis object name to the communication object name, the protocol file to the corresponding protocol configuration file, save the configuration file, and re-run the software.
[0207] 8. Interface interaction configuration
[0208] 8.1、Interface Configuration Instructions
[0209] The interface configuration needs to comply with the following requirements:
[0210] 1) File directory name requirements:
[0211] The file directory is: SarOWS / bin / Form
[0212] The file name is: Widget.xlsx
[0213] 2)XLSX file format requirements:
[0214] The file starts with: creating an interface list in SHEET1 of the EXCEL table, and creating an interface parameter SHEET according to the number of interface parameters in the subsequent SHEET;
[0215] The file contents are: interface list, interface parameters;
[0216] The interface object is: the serial number, name, definition, and type of the interface list;
[0217] The serial number, name, definition, type, parent window, number of layout columns, and description of the interface parameters.
[0218] 3) Interface configuration requirements:
[0219] a) The interface configuration object is consistent with the interface list;
[0220] b) The interface required for configuration, the file name cannot be modified, and the table format in the file cannot be modified;
[0221] c) Unique identification of protocol list and protocol parameter name.
[0222] 8.2. Interface list configuration
[0223] The interface is designed according to the protocol to meet the protocol requirements. The protocol list is listed in the interface list, and the protocol parameters are listed in the interface parameters.
[0224] The interface list configuration follows the above configuration requirements to create a new SHEET1 table named Interface List which cannot be modified. Each row contains the serial number, name, definition, and type information.
[0225] This project has multiple interface lists. This article selects the electronic product control example. The specific description is shown in the following table:
[0226] Table 8-1 Interface list
[0227]
[0228] 8.3. Interface parameter configuration
[0229] Create a new parameter table in the EXCEL table. The name of the parameter table must be the interface definition keyword, and list the specific parameter information of the interface, including serial number, data item, data item definition, data type, byte position, bit position, bit length, byte length, and default value. The specific description is shown in the following table.
[0230] Table 8-2 Interface parameter configuration list
[0231]
[0232]
[0233] Embodiment 2
[0234] 9. Project Examples
[0235] The following is a parameterized display and control software configured for the electronic product project. The following is the software configuration process.
[0236] 9.1. Communication configuration
[0237] This project uses serial communication with a baud rate of 115200. The serial port number recognized by the computer is COM3, and other serial port parameters use default parameters.
[0238] The communication configuration process is:
[0239] 1) Open the communication configuration file: CommSettings.xml in the SarOWS\bin\Config directory.
[0240] 2) Configure the serial port communication object: The XML file format remains unchanged. In the parameter configuration position, it starts with < and ends with / >. It contains the communication object name, serial port number, baud rate, and default parameters.
[0241] Name: SERIAL1 (contains the "SERIAL" keyword, unique identifier);
[0242] Serial port number: ComName = "COM3" (the serial port number identified by the device manager);
[0243] Baud rate: BaudRate = "115200" (the transmission rate agreed upon for communication).
[0244] Default parameters:
[0245] StopBits="OneStop"Parity="OddParity"DataBits="8"FlowCtrl="NoFlowCtrl"
[0246] Mode = "ReadWrite" (usually no need to change);
[0247] The overall serial communication object is:
[0248] <SERIAL1 ComName="COM3"BaudRate="115200"StopBits="OneStop"
[0249] Parity="OddParity"DataBits="8"FlowCtrl="NoFlowCtrl"Mode="ReadWrite" / >
[0250] 3) Save the configuration file.
[0251] 9.2 Protocol Configuration
[0252] This project has multiple protocols. Two instructions are selected as examples in this article, one is the working mode control instruction and the other is the working status feedback instruction. For specific information about the instructions, please refer to the "H-1* Software Interface File".
[0253] The protocol configuration process is:
[0254] 1) Open the file: Protocol.xlsx in the SarOWS\bin\Protocol directory;
[0255] 2) Configure the protocol list: Create a protocol list in SHEET1 of the EXCEL table and list the protocol information that needs to be configured. The protocol information includes serial number, name, definition, function number, length and other information.
[0256] a) Working mode control protocol
[0257] Sequence number: 1 (protocol sorting, number, only for reminder, does not affect the function);
[0258] Name: Working mode control (Chinese name, only for reminder, does not affect the function);
[0259] Definition: CTRL_CMD (a keyword is defined as two uppercase words connected by an underscore "_" in the middle, which is a unique identifier);
[0260] Function number: 0xFF020005 (command information tag, unique identifier, hexadecimal number);
[0261] The length is: 36 (the total length of the instruction in bytes, in decimal).
[0262] b) Working Status Feedback Protocol
[0263] Serial number: 2 (protocol sorting, number, only for reminder, does not affect the function);
[0264] Name: Working status feedback (Chinese name, only for reminder, does not affect the function);
[0265] Definition: RADAR_STATUS (the keyword is defined as two uppercase words connected by an underscore "_" in the middle, which is a unique identifier).
[0266] Function number: 0x02FF0006 (software interface file definition, unique identifier, hexadecimal number)
[0267] Length: 285 (total length of the instruction in bytes)
[0268] Configure protocol parameters: Create a protocol parameter table in an EXCEL table and list the specific parameter information of the protocol. The name of the parameter table must be the protocol definition keyword. The protocol parameter information includes serial number, data item name, data item definition, data type, byte position, bit position, bit length, byte length, default value and other information.
[0269] a) Working mode control parameters: Create a new table named CTRL_CMD;
[0270] Serial number: 1 to 12 (parameter order, numbers, only for reminder, does not affect the function);
[0271] Data item name: Packet header, length 1... (Chinese name, only for prompt, does not affect the function);
[0272] Data item definition: ulHeader, ulLength1... (English name, unique identifier);
[0273] Data type: ULONG, ULONG... (data type);
[0274] Byte position: 0, 4... (byte starting position);
[0275] Bit position: -1, -1... (bit starting position, -1 when no bit is defined);
[0276] Bit length: 0, 0... (bit length, 0 when no bit is defined);
[0277] Byte length: 4, 4... (byte length, 0 when no bit is defined);
[0278] Default value: 0x7E7EAA55, 0x0000001C... (default value);
[0279] b) Working status feedback: Create a new table named RADAR_STATUS, and configure the specific parameters as above.
[0280] 9.3. Parsing Configuration
[0281] This project has only one serial port communication object and one protocol file, so you only need to create one serial port parsing object.
[0282] The parsing configuration process is:
[0283] 1) Open the parsing configuration file: ProcessSettings.xml in the SarOWS\bin\Config directory.
[0284] 2) Configure the serial port parsing object: The XML file format remains unchanged. It starts with < and ends with / > in the parsing configuration position, and contains the parsing object name in the middle;
[0285] Name: SERIAL1 (same as the communication object name, unique identifier);
[0286] Parsing file: Protocol = "Protocol.xlsx" (communication protocol configuration file);
[0287] The overall serial port parsing object is:
[0288] <SERIAL1 Protocol="Protocol.xlsx" / > .
[0289] 3) Save the configuration file.
[0290] 9.4 Interface Configuration
[0291] This project has multiple interface configurations. Two instructions are selected as examples in this article, one for electronic product control and the other for electronic product status.
[0292] Configuration interface list:
[0293] 1) Radar control instructions
[0294] Name: Radar Control (Chinese name);
[0295] Definition: RADAR_CTRL (a keyword is defined as two uppercase words connected by an underscore "_" in the middle, which is a unique identifier);
[0296] Type: Widget (interface window).
[0297] 2) Radar status command
[0298] Name: Radar status (Chinese name);
[0299] Definition: RADAR_STATUS (keywords are defined as two uppercase words connected by an underscore "_" in the middle, which is a unique identifier);
[0300] Type: Widget (interface window);
[0301] Configuration interface files such as Figure 8 shown.
[0302] In the configuration interface parameters, radar control takes working instruction 1 as an example, and radar status takes working status as an example:
[0303] 1) Work instruction 1
[0304] Name: Work Instruction 1 (Chinese name);
[0305] Definition: CTRL_CMD_usWorkCmd1 (the interface name is placed in uppercase letters in front, the parameters are placed in lowercase letters in the English name in the back, and the underscore "_" is used in the middle to connect and uniquely identify them);
[0306] Type: QComboBox (control type);
[0307] Parent Window: The GroupBox in which the generated control is contained;
[0308] Number of columns: 1 (the default fence layout of GroupBox, the number of controls arranged in each row);
[0309] Description: 0x1166 = level flight working section / 0x6666 = dive working section / 0x3366 = downward pressure working section / 0x4466 = terminal working section / 0x5566 = level flight large map working section / 0x0066 = others (multiple Chinese text controls in the same group of data items are separated by the " / " symbol, and the default value and Chinese text are separated by the "=" symbol).
[0310] 2) Working status
[0311] Name: Working status (Chinese name);
[0312] Definition: RADAR_STATUS_usWorkMode (the interface name is placed in uppercase letters in front, the parameter is placed in lowercase letters in the English name in the back, and the underscore "_" is used in the middle to connect and uniquely identify it);
[0313] Type: QLabel (control type);
[0314] Parent window: working status monitoring (the generated controls are contained in the GroupBox);
[0315] Number of columns: 2 (the default fence layout of GroupBox, the number of controls arranged in each row);
[0316] Description: Chinese text in multiple controls of the same data item is separated by the “ / ” symbol. Default values and Chinese text are separated by the “=” symbol.
[0317] The final interface display effect is as follows Fig.11 shown.
[0318] 9.5. Verification Method
[0319] The following is the software verification process.
[0320] 1) Communication connection
[0321] Connect the serial communication cable, open the test tool serial debugging assistant, set the communication parameters, the baud rate is 115200, the serial port number recognized by the computer is COM3, and establish a serial communication connection with the display and control software.
[0322] 2) Control instruction verification
[0323] Use the keyboard to set the sending working frequency to 1, and use the mouse to click the setting button to send the control information. The debugging assistant receives the control information. The control information header and tail format are normal, and the working frequency parameter is 1, which is correct.
[0324] 3) Status feedback verification
[0325] A set of status data is sent in the test tool serial port debugging assistant, and the display interface receives the status information. The display information format is normal and the display information value is correct.
[0326] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. A universal display and control platform for electronic product development, characterized in that: It includes a communication module, an analysis module and a display module; The communication module is used to transmit data to and from the electronic product, send control instructions, and receive status feedback data; The analysis module is used to receive the control information of the interface operation, perform protocol conversion and packaging on the control information, and send the control instruction to the communication module; and receive the status feedback data of the communication module, unpack and perform protocol conversion on the status feedback data, and send the status information to the display module; The display module is used to receive operation commands from the mouse and keyboard, send control information to the analysis module, and receive status information from the analysis module, and display the status on the interface; The universal display and control platform realizes the setting of control instructions of electronic products of different projects and the display of working status by modifying configuration files.
2. A universal display and control platform for electronic product development according to claim 1, characterized in that: The communication module includes a communication management module and a communication underlying module. The communication management module is used to read the communication configuration file, establish the communication object according to the communication mode and configuration parameters, and the communication underlying module is used to implement the specific communication mode, and the communication mode includes UDP communication and serial port communication; the parsing module includes a parsing management module, a parsing underlying module and a protocol management module. The parsing management module is used to read the parsing configuration file, establish the parsing object according to the configuration content and the parsing mode, and the parsing underlying module is used to establish the protocol management object to implement the protocol packaging and parsing work. The parsing types include UDP parsing and serial port parsing. The protocol management module reads the protocol configuration file to implement the protocol conversion function; the display module includes an interface management module and an interface underlying module. The interface management module is used to manage the interface object and interface layout, and the interface underlying module is used to read the interface configuration file to implement the interface design.
3. A universal display and control platform for electronic product development according to claim 1, characterized in that: The configuration files include communication configuration files, protocol configuration files, parsing configuration files and interface configuration files, wherein the communication configuration files are used to configure the communication mode and parameters between the electronic products and the universal display and control platform, and the file names cannot be modified; the protocol configuration files are used to configure the protocol interfaces of various types of electronic products themselves, and the file names can be modified, and multiple protocol files can be added, and only communication protocols of the same format can be configured in the same protocol file; the parsing configuration files are used to configure the protocol files corresponding to the communication mode, and each communication object corresponds to a protocol file; the interface configuration files are used to configure the interfaces required for the control and status display of the electronic products, and the file names cannot be modified, and the table formats in the files cannot be modified.
4. A universal display and control platform for electronic product development according to claim 3, characterized in that: In the communication configuration file, when the communication mode is UDP communication, the configured parameters include the communication object name, local IP, multicast IP, local port, receive blocking time and receive buffer size; when the communication mode is serial port communication, the configured parameters include serial port object name, serial port number, baud rate, stop bit, check bit, data bit, data flow control and working mode.
5. A universal display and control platform for electronic product development according to claim 4, characterized in that: In the protocol configuration file, the communication protocol list and the communication protocol parameters are configured, wherein the communication protocol list includes the following attribute information: serial number, name, definition, function number and length; the communication protocol parameters include serial number, data item name, data item definition, data type, byte position, bit position, bit length, byte length and default value.
6. A universal display and control platform for electronic product development according to claim 5, characterized in that: In the parsed configuration file, the communication object and the protocol configuration file are configured, and a corresponding relationship between the communication object and the protocol configuration file is established.
7. A universal display and control platform for electronic product development according to claim 6, characterized in that: In the interface configuration file, the interface list and interface parameters are configured, wherein the interface list includes the following attribute information: serial number, name, definition, type; the interface parameters include serial number, name, definition, type, parent window, layout column number and description.
8. A universal display and control platform for electronic product development according to claim 7, characterized in that: The specific startup process of the universal display and control platform is as follows: S11: Edit the communication configuration file to determine the communication mode and parameters of the electronic product; S12: Edit the protocol configuration file to clarify the detailed definition of each protocol; S13: Edit and parse the configuration file to establish a corresponding relationship between the communication object and the protocol configuration file; S14: Design the interface according to the requirements of the general display and control platform and edit the interface configuration file; S15: Save all files, run the executable file, and then start the universal display and control platform.
9. A universal display and control platform for electronic product development according to claim 8, characterized in that: The result verification process of the general display and control platform is as follows: S21: Communication connection Connect the communication cable, open the test tool debugging assistant, set the communication parameters, and establish a communication connection with the display and control software; S22: Control command verification Use the keyboard to set the parameter value to be sent, use the mouse to click the button to send the control information, and observe whether the test tool debugging assistant receives the control information, whether the control information format is normal, and whether the control information parameters are correct; S23: Status feedback verification Send status feedback data to the test tool debugging assistant, and observe whether the display interface receives the status information, whether the display status information format is normal, and whether the status information value is correct.
