CN117421251B - Method and system for debugging user interface of embedded terminal - Google Patents

Method and system for debugging user interface of embedded terminal Download PDF

Info

Publication number
CN117421251B
CN117421251B CN202311732925.0A CN202311732925A CN117421251B CN 117421251 B CN117421251 B CN 117421251B CN 202311732925 A CN202311732925 A CN 202311732925A CN 117421251 B CN117421251 B CN 117421251B
Authority
CN
China
Prior art keywords
event processing
transmission object
debugging
terminal
attribute
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311732925.0A
Other languages
Chinese (zh)
Other versions
CN117421251A (en
Inventor
周晶
姜洲
王乐
董逢华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Tianyu Information Industry Co Ltd
Original Assignee
Wuhan Tianyu Information Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Tianyu Information Industry Co Ltd filed Critical Wuhan Tianyu Information Industry Co Ltd
Priority to CN202311732925.0A priority Critical patent/CN117421251B/en
Publication of CN117421251A publication Critical patent/CN117421251A/en
Application granted granted Critical
Publication of CN117421251B publication Critical patent/CN117421251B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Software Systems (AREA)
  • Stored Programmes (AREA)

Abstract

The present disclosure provides a method for debugging a user interface of an embedded terminal, which is applied to a debugging system, wherein the debugging system comprises: the method for debugging the PC terminal and the embedded terminal comprises the following steps: the PC terminal displays a user interface; responding to the user interface to generate a debugging trigger event, generating an event processing function corresponding to the debugging trigger event by the PC terminal, converting the event processing function into a first transmission object adopting a first data structure, and transmitting the first transmission object to the embedded terminal; the embedded terminal converts the first transmission object to obtain an event processing function, executes the event processing function to obtain an event processing result, converts the event processing result to a second transmission object adopting a second data structure, and sends the second transmission object to the PC terminal; and the PC terminal analyzes the second transmission object to obtain an event processing result, and updates and displays the user interface according to the event processing result.

Description

Method and system for debugging user interface of embedded terminal
Technical Field
The disclosure relates to the technical field of embedded devices, and in particular relates to a method and a system for debugging a user interface of an embedded terminal.
Background
With the development of the internet of things, the requirement for the embedded device to be capable of displaying complex and diversified user interfaces is increasing. The embedded graphic library is widely applied to the embedded equipment by virtue of the advantages of light weight, multifunction, high flexibility, strong portability and the like, and the user interface with diversified drawing can be obtained by calling the embedded graphic library through application.
The display process of the user interface of the embedded device based on the embedded graphic library is as follows: firstly, an application sends a graphic drawing instruction corresponding to a user interface to be displayed (essentially, a calling function corresponding to each element included in the user interface to be displayed) to an embedded graphic library; then, the embedded graphic library executes graphic drawing instructions (which can be regarded as drawing on the user interface) by calling a preset embedded graphic library, and sends the execution result to a buffer (Famebuffer); the display module in the embedded device then effects display of the user interface based on the data in the buffer.
In practical application, it is found that the display module is not installed in the embedded device in the debugging stage, so that the user interface drawn by the embedded graphic library cannot be displayed by the embedded device in the debugging stage, and therefore, the user interface of the embedded device cannot be debugged.
Disclosure of Invention
In order to effectively solve at least one technical problem existing in the prior art, the present disclosure provides a method and a system for debugging a user interface of an embedded terminal.
In a first aspect, an embodiment of the present disclosure provides a method for debugging a user interface of an embedded terminal, which is applied to a debugging system, where the debugging system includes: the method comprises the steps of configuring a first communication module in the PC terminal, storing an interface software development kit in the PC terminal, configuring a second communication module in the embedded terminal, storing an embedded graphic system in the embedded terminal, and debugging the embedded graphic system, wherein the debugging method comprises the following steps:
the PC terminal compiles and displays a user interface designed by using an interface software development kit in advance;
generating a debugging trigger event in response to the user interface, generating an event processing function corresponding to the debugging trigger event by the PC terminal through the interface software development kit, converting the event processing function into a first transmission object adopting a first data structure through the interface software development kit, and sending the first transmission object to the second communication module through the first communication module, wherein the function name and parameter information of the event processing function are recorded in the first transmission object;
The embedded terminal receives the first transmission object through the second communication module, converts the first transmission object through the embedded graphic system to obtain the event processing function, and executes the event processing function through the embedded graphic system to obtain an event processing result;
the embedded terminal converts the event processing result into a second transmission object adopting a second data structure through the embedded graphic system, and sends the second transmission object to the first communication module through the second communication module, wherein the function name of the event processing function and the event processing result are recorded in the second transmission object;
and the PC terminal receives the second transmission object through the second communication module, analyzes the second transmission object through the interface software development kit to obtain the event processing result, and updates and displays the user interface according to the event processing result.
In some embodiments, the interface software development kit comprises: the system comprises a first interface file and a PC-used graphic library, wherein the first interface file is recorded with header files and first conversion rule information of all interfaces required by the interface software development kit, and the PC-used graphic library is configured for a user to carry out user interface design;
Before the step of generating the event processing function corresponding to the debugging trigger event by the PC terminal through the interface software development kit, the method further comprises the following steps:
responding to a first debug mode entering instruction, generating a first debug module in the interface software development kit by the PC terminal according to the first interface file, wherein the first debug module is configured to be capable of converting a function generated by the first interface file into a corresponding transmission object according to the first conversion rule information;
the step of generating an event processing function corresponding to the debugging trigger event by the PC terminal through the interface software development kit and converting the event processing function into a first transmission object adopting a first data structure by the PC terminal through the interface software development kit comprises the following steps:
the PC terminal generates an event processing function corresponding to the debugging trigger event through the first interface file, and converts the event processing function into the first transmission object through the first debugging module according to the first conversion rule information;
the step of analyzing the second transmission object by the PC terminal through the interface software development kit to obtain the event processing result comprises the following steps:
And the PC terminal analyzes the second transmission object through the first debugging module to obtain the event processing result.
In some embodiments, after the step of updating the user interface according to the event processing result, further comprising:
and responding to a first instruction of exiting the debugging mode, and deleting the first debugging module in the interface software development kit by the PC terminal.
In some embodiments, the first conversion rule information has the first data structure recorded therein, including: a first attribute and a second attribute;
the first debug module converting the event processing function into the first transport object according to the first conversion rule information includes:
the first debugging module extracts the function name and parameter information of the event processing function;
the first debugging module constructs a first transmission object adopting a first data structure according to the function name and the parameter information of the event processing function, wherein the attribute value of a first attribute of the first transmission object is the function name of the event processing function, and the attribute value of a second attribute of the first transmission object is the parameter information of the event processing function.
In some embodiments, the second data structure includes a third attribute and a fourth attribute;
The step of analyzing the second transmission object by the interface software development kit to obtain the event processing result comprises the following steps:
the first debugging module obtains an attribute value of a third attribute and an attribute value of a fourth attribute from the second transmission object, wherein the attribute value of the third attribute of the second transmission object is a function name of the event processing function, and the attribute value of the fourth attribute of the second transmission object is the event processing result.
In some embodiments, the embedded graphics system comprises: the system comprises a first interface file and an embedded graphic library, wherein the first interface file is used for storing the first conversion rule information and the second conversion rule information of all interfaces required by the embedded graphic system, the embedded graphic library is configured with a function library, and the function library is used for storing object codes of various functions required by the embedded graphic system;
before the step of generating the event processing function corresponding to the debugging trigger event by the PC terminal through the interface software development kit, the method further comprises the following steps:
responding to a second debug mode entering instruction, generating a second debug module in the embedded graphic system by the embedded terminal according to the second interface file, wherein the second debug module is configured to be capable of converting a transmission object received by the second communication module into a corresponding function according to the second conversion rule information;
The step that the embedded terminal converts the first transmission object through the embedded graphic system to obtain the event processing function, and the step that the embedded graphic system executes the event processing function to obtain an event processing result comprises the following steps:
and the embedded terminal converts the first transmission object according to second conversion rule information through the second debugging module to obtain the event processing function, and calls an object code corresponding to the event processing function in a function library configured by the embedded graphic library through the second interface file to execute the event processing function.
In some embodiments, after the step of updating the user interface according to the event processing result, further comprising:
and responding to a second instruction of exiting the debugging mode, and deleting the second debugging module in the embedded graphic system by the embedded terminal.
In some embodiments, the second conversion rule information includes attribute information included in the first data structure, where the attribute information includes: an attribute of the first attribute and an attribute of the second attribute;
the step of converting the first transmission object by the second debugging module according to the second conversion rule information to obtain the event processing function comprises the following steps:
The second debugging module acquires the attribute value of the first attribute and the attribute value of the second attribute from the first transmission object;
the second debugging module constructs the event processing function according to the attribute value of the first attribute in the first transmission object and the attribute value of the second attribute, the function name of the event processing function is the attribute value of the first attribute in the first transmission object, and the parameter information of the event processing function is the attribute value of the second attribute in the first transmission object.
In some embodiments, the second data structure includes a third attribute and a fourth attribute;
the step of the embedded graphics system converting the event processing result into a second transport object in a second data structure comprises:
and the second debugging module constructs a second transmission object adopting a second data structure according to the function name of the event processing function and the event processing result, wherein the attribute value of the third attribute of the second transmission object is the function name of the event processing function, and the attribute value of the fourth attribute of the second transmission object is the event processing result.
In a second aspect, an embodiment of the present disclosure provides a debugging system of a user interface of an embedded terminal configured to enable the debugging method as provided in the first aspect, the debugging system comprising: the system comprises a PC terminal and an embedded terminal, wherein the PC terminal is provided with a first communication module, an interface software development kit is stored in the PC terminal, the embedded terminal is provided with a second communication module, and an embedded graphic system is stored in the embedded terminal;
The PC terminal is used for compiling and displaying a user interface designed by using the interface software development kit in advance; and the system is also used for responding to the user interface to generate a debugging trigger event, generating an event processing function corresponding to the debugging trigger event through the interface software development kit, converting the event processing function into a first transmission object adopting a first data structure through the interface software development kit, and sending the first transmission object to the second communication module through the first communication module, wherein the function name and parameter information of the event processing function are recorded in the first transmission object;
the embedded terminal is used for receiving the first transmission object through the second communication module, converting the first transmission object through the embedded graphic system to obtain the event processing function, and executing the event processing function through the embedded graphic system to obtain an event processing result; the embedded graphic system is further used for converting the event processing result into a second transmission object with a second data structure, and sending the second transmission object to the first communication module through the second communication module, wherein the function name of the event processing function and the event processing result are recorded in the second transmission object;
The PC terminal is also used for receiving the second transmission object through the second communication module, analyzing the second transmission object through the interface software development kit to obtain the event processing result, and updating a user interface according to the event processing result.
The technical scheme of the invention can realize the debugging of the user interface required by the embedded terminal in the debugging stage.
Drawings
FIG. 1 is a block diagram of a debug system according to an embodiment of the present disclosure;
FIG. 2 is a method flow diagram of a debug method provided in an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of data processing and data transmission performed in a user interface debugging process implemented by a PC terminal and an embedded terminal in an embodiment of the present disclosure;
FIG. 4 is a method flow diagram of a debug method provided in an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of data processing and data transmission performed in a user interface debugging process implemented by a PC terminal and an embedded terminal in an embodiment of the present disclosure;
fig. 6 is a schematic diagram corresponding to a debug system in a debug mode and a non-debug mode in an embodiment of the disclosure.
Detailed Description
In order that those skilled in the art will better understand the technical solutions of the present disclosure, the present disclosure will be described in further detail with reference to the accompanying drawings and detailed description.
Unless defined otherwise, technical or scientific terms used in this disclosure should be given the ordinary meaning as understood by one of ordinary skill in the art to which this disclosure belongs. The terms "first," "second," and the like, as used in this disclosure, do not denote any order, quantity, or importance, but rather are used to distinguish one element from another. Likewise, the terms "a," "an," or "the" and similar terms do not denote a limitation of quantity, but rather denote the presence of at least one. The word "comprising" or "comprises", and the like, means that elements or items preceding the word are included in the element or item listed after the word and equivalents thereof, but does not exclude other elements or items. The terms "connected" or "connected," and the like, are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "upper", "lower", "left", "right", etc. are used merely to indicate relative positional relationships, which may also change accordingly when the absolute position of the object being described changes.
Like elements are denoted by like reference numerals throughout the various figures. For purposes of clarity, the various features of the drawings are not drawn to scale. Furthermore, some well-known portions may not be shown in the drawings.
Numerous specific details of the disclosure are set forth in the following description in order to provide a more thorough understanding of the disclosure; however, as will be understood by those skilled in the art, the present disclosure may be practiced without these specific details.
It should be noted that, a "transmission object" in this disclosure refers to a specific instance of a data stream having a specific data structure.
Fig. 1 is a block diagram of a debugging system according to an embodiment of the present disclosure. Fig. 2 is a method flowchart of a debugging method provided in an embodiment of the present disclosure. Fig. 3 is a schematic diagram of data processing and data transmission performed in a user interface debugging process implemented by a PC terminal and an embedded terminal in an embodiment of the disclosure. As shown in fig. 1 to 3, the debugging method provided by the embodiment of the present disclosure may implement debugging of a user interface (also referred to as a graphical user interface, graphical User Interface) of an embedded terminal, where the debugging method is applied to a debugging system, and the debugging system includes: the system comprises a PC terminal and an embedded terminal, wherein the PC terminal is provided with a first communication module, an interface software development kit is stored in the PC terminal, the embedded terminal is provided with a second communication module, and an embedded graphic system is stored in the embedded terminal.
Where embedded terminals refer to embedded devices, they refer to electronic devices embedded in a specific hardware system of a specific application, which are typically used to manage, monitor or control the system or device to which they are connected. Such as a digital television set-top box, a smart watch, an automotive embedded system, a smart POS, etc.
PC terminals, also known as computer terminals, have sophisticated operating systems (e.g. windows systems) and display devices.
The debugging method provided by the embodiment of the disclosure comprises the following steps:
and S1, compiling and displaying a user interface designed by using an interface software development kit in advance by the PC terminal.
A developer may complete the design of a user interface to be applied to an embedded terminal based on an interface software development kit (Software Development Kit, abbreviated as SDK) on a PC terminal in advance. When the user interface is required to be debugged later, the PC terminal compiles and runs the user interface designed in the interface software development kit in advance and displays the user interface on the PC terminal.
And step S2, generating a debugging trigger event in response to the user interface, generating an event processing function corresponding to the debugging trigger event by the PC terminal through an interface software development kit, converting the event processing function into a first transmission object adopting a first data structure through the interface software development kit, and sending the first transmission object to a second communication module through the first communication module, wherein the function name and parameter information (including the parameter name and the parameter value) of the event processing function are recorded in the first transmission object.
The debugging trigger event refers to an event triggered on the user interface according to the debugging requirement. The event processing function generated by the PC terminal is a function that can be executed by the embedded terminal later.
In the embodiment of the present disclosure, wired communication or wireless communication may be adopted between a first communication module configured by a PC terminal and a second communication module configured by an embedded terminal, where communication protocols supported by the two modules include: bluetooth (Bluetooth), bluetooth low energy (Bluetooth Low Energy, BLE for short), ultra Wide Band (UWB for short), socket/WebSocket, HTTP, serial port, SPI, I2C.
In some embodiments, the first transport object may be a Json object or an XML object.
In consideration of factors that there may be no object code required for executing the event processing function in the PC terminal, that a part of the trigger event needs to call the peripheral of the embedded terminal, and that the PC terminal cannot call the peripheral of the embedded terminal, the event processing function is transferred to the embedded terminal for execution in the disclosure.
And S3, the embedded terminal receives the first transmission object through the second communication module, converts the first transmission object through the embedded graphic system to obtain an event processing function, and executes the event processing function through the embedded graphic system to obtain an event processing result.
And S4, converting the event processing result into a second transmission object adopting a second data structure by the embedded terminal through the embedded graphic system, and sending the second transmission object to the first communication module through the second communication module, wherein the function name of the event processing function and the event processing result are recorded in the second transmission object.
In some embodiments, the second transport object is a data stream with a specific data structure, which may be a Json object or an XML object.
And S5, the PC terminal receives the second transmission object through the second communication module, analyzes the second transmission object through the interface software development kit to obtain an event processing result, and updates and displays the user interface according to the event processing result so as to realize the debugging of the user interface.
After the user interface is debugged, the code corresponding to the user interface (essentially, the calling function corresponding to each element included in the user interface, but not the graph of the user interface) can be burnt into the embedded terminal for the application in the embedded terminal to use.
Based on the above, the technical solution of the present disclosure may realize debugging a user interface required to be used by an embedded terminal in a debugging stage.
Fig. 4 is a method flowchart of a debugging method provided in an embodiment of the present disclosure. Fig. 5 is a schematic diagram of data processing and data transmission performed in a user interface debugging process implemented by a PC terminal and an embedded terminal in an embodiment of the disclosure. Fig. 6 is a schematic diagram corresponding to a debug system in a debug mode and a non-debug mode in an embodiment of the disclosure. As shown in fig. 4-6, in some embodiments, the interface software development kit includes: the system comprises a first interface file and a PC-used graphic library, wherein the first interface file records header files and first conversion rule information of all interfaces required by an interface software development kit, and the PC-used graphic library is configured for a user to carry out user interface design; the embedded graphics system includes: the system comprises a second interface file and an embedded graphic library, wherein the second interface file records the header files of all interfaces required by the embedded graphic system and second conversion rule information, the embedded graphic library is configured with a function library, and the function library stores object codes of various functions required by the embedded graphic system.
The debugging method provided by the embodiment of the disclosure comprises the following steps:
and step S1a, responding to a first debug mode entering instruction, and generating a first debug module in an interface software development kit by the PC terminal according to the first interface file.
The first debugging module is configured to be capable of converting a function generated by the first interface file into a corresponding transmission object according to the first conversion rule information.
And step S1b, responding to a second debug mode entering instruction, and generating a second debug module in the embedded graphic system by the embedded terminal according to the second interface file.
The second debugging module is configured to convert the transmission object received by the second communication module into a corresponding function according to the second conversion rule information.
It should be noted that, the execution sequence of the step S1a and the step S1b is not limited in the technical solution of the present disclosure; for example, step S1a may be performed prior to step S1b, or performed subsequent to step S1b, or performed simultaneously with step S1 b.
And S1, compiling and displaying a user interface designed by using an interface software development kit in advance by the PC terminal.
Step S201, generating a debugging trigger event in response to the user interface, and generating an event processing function corresponding to the debugging trigger event by the PC terminal through the first interface file.
Step S202, the PC terminal converts the event processing function into a first transmission object according to the first conversion rule information through the first debugging module.
In some embodiments, having the first data structure recorded in the first conversion rule information includes: a first attribute and a second attribute.
In step S202, the first debug module converting the event processing function into the first transport object according to the first conversion rule information includes: firstly, a first debugging module extracts function names and parameter information of event processing functions; then, the first debugging module constructs a first transmission object adopting a first data structure according to the function name and the parameter information of the event processing function, wherein the attribute value of the first attribute of the first transmission object is the function name of the event processing function, and the attribute value of the second attribute of the first transmission object is the parameter information of the event processing function.
Step S203, the PC terminal sends the first transmission object to the second communication module through the first communication module.
And step S301, the embedded terminal converts the first transmission object through the second debugging module according to the second conversion rule information to obtain an event processing function.
In step S301, the step of the second debug module converting the first transmission object according to the second conversion rule information to obtain an event processing function specifically includes: firstly, a second debugging module acquires an attribute value of a first attribute and an attribute value of a second attribute from a first transmission object; and then, the second debugging module constructs an event processing function according to the attribute value of the first attribute and the attribute value of the second attribute in the first transmission object, the function name of the event processing function is the attribute value of the first attribute in the first transmission object, and the parameter information of the event processing function is the attribute value of the second attribute in the first transmission object.
Step S302, the embedded terminal calls an object code corresponding to an event processing function in a function library configured by the embedded graphic library through a second interface file so as to execute the event processing function and obtain an event processing result.
And S401, converting the event processing result into a second transmission object adopting a second data structure by the embedded terminal through a second debugging module.
In some embodiments, the second data structure includes a third attribute and a fourth attribute.
In step S401, the step of converting, by the second debug module, the event processing result into a second transmission object adopting the second data structure specifically includes: the second debugging module constructs a second transmission object adopting a second data structure according to the function name of the event processing function and the event processing result; wherein, the attribute value of the third attribute of the second transmission object is the function name of the event processing function, and the attribute value of the fourth attribute of the second transmission object is the event processing result.
Step S402, the embedded terminal sends the second transmission object to the first communication module through the second communication module.
In step S501, the PC terminal analyzes the second transmission object through the first debug module to obtain an event processing result.
In step S501, the step of the first debug module analyzing the second transmission object to obtain the event processing result specifically includes: the first debugging module acquires the attribute value of the third attribute and the attribute value of the fourth attribute from the second transmission object, wherein the attribute value of the third attribute of the second transmission object is the function name of the event processing function, and the attribute value of the fourth attribute of the second transmission object is the event processing result.
Step S502, the PC terminal updates and displays the user interface according to the event processing result.
And step S6a, responding to the first instruction of exiting the debugging mode, and deleting the first debugging module in the interface software development kit by the PC terminal.
Specifically, the PC terminal selects, through compiling configuration, a program corresponding to the first debug module in the uncompiled interface software development kit, so as to achieve the effect of closing (deleting) the first debug module.
And step S6b, responding to a second instruction of exiting the debugging mode, and deleting the second debugging module in the embedded graphic system by the embedded terminal.
Specifically, the embedded terminal selects to not compile the program corresponding to the second debugging module in the embedded graphics system through compiling configuration so as to achieve the effect of closing (deleting) the second debugging module.
In the method, corresponding debugging modules are respectively generated in the PC terminal and the embedded terminal for debugging the user interface in the debugging stage, and the debugging modules in the PC terminal and the embedded terminal are closed after the debugging stage is finished, so that the problem of resource waste caused by occupied memory space of useless debugging modules in the non-debugging stage can be effectively avoided by designing the method, and code leakage can be effectively avoided by hiding the debugging modules in the embedded terminal.
In order to facilitate a better understanding of the technical solutions of the present disclosure by a person skilled in the art, an exemplary description will be given below in connection with an example.
The peripheral connected with the embedded equipment is assumed to comprise a printer, the embedded equipment has a file printing function, and the function library stores object codes corresponding to the file printing function. The file print function may be expressed as: process_print (int fd, char) content, int x, int y). Triggering of a print event is also supported on the user interface displayed on the PC side by step S1.
When the print function on the user interface is debugged, a print event (i.e., a debug trigger event) on the user interface may be triggered, at which time the first interface file monitors the print event and generates a corresponding file print function in step S201. Taking the generated file print function as process_print (1, 0102030405, 20, 30) as an example, in step S202, the function name of the file print function is "process_print", and the values of the parameters in the file print function are extracted as follows: fd=1, content=0102030405, x=20, y=30.
The first conversion rule information is recorded with a declaration of the first data structure (a declaration of one class in nature):
class API_FUN
{
char* name;
API_PARAM* param;
}
class API_PARAM
{
char* key;
char* value;
}
wherein, name is the attribute name of the first attribute in the first data structure, and param is the attribute name of the second attribute in the first data structure.
At this time, according to the declaration of the first data structure, the following can be extracted from the file print function:
name="process_print"
param[0].key="fd"
param[0].value="1"
param[1].key="content"
param[1].value="0102030405"
param[2].key="x"
param[2].value="20"
param[3].key="y"
param[3].value="30"
at this time, in step S202, a corresponding first transmission object with the first data structure is constructed:
{name:"process_print",param:[{"fd","1"},{"content","0102030405"},{"x","20"},{"y","30"}]}
subsequently, in step S301, the first transmission object may be subjected to conversion processing based on a similar conversion rule, and the file print function is translated into: process_print (1, 0102030405, 20, 30).
In step S302, by executing the process_print (1, 0102030405, 20, 30) and obtaining the corresponding event processing result, the time processing result may be represented by a structure or class (the event processing result representation may be preset by defining the return value form of the event processing function). As one example, the return value of the file print function (i.e., event processing result) is a PrintResult structure:
{name:"PrintResult",param:{state:1}}
state 1 indicates that the execution state of the file print function is "1". Assuming that "1" is known to indicate that the file print function is successfully executed by the preset identification rule, the print event normal response triggered in the debugging process is known by the event processing result.
In step S401, the event processing result may also be converted into a second transmission object adopting the second data structure according to the declaration code of the second data structure (for example, including a third attribute and a fourth attribute, where the attribute name of the third attribute is name and the attribute name of the fourth attribute is result).
{name:"process_print",result:{name:"PrintResult",param:{state:1}}}
In step S501, the PC terminal analyzes the PrintResult structure from the second transmission object, and obtains state 1 from the PrintResult structure, namely, the event processing result is the normal response of the printing event.
In step S502, a prompt message indicating that printing was successful may be generated and displayed based on the print event normal response indicating the print event normal response acquired in step S501 to update the user interface.
Based on the same inventive concept, the embodiment of the disclosure also provides a debugging system of the user interface of the embedded terminal. Referring again to fig. 1, the debug system is configured to enable the debug method provided in any of the previous embodiments, the debug system comprising: the system comprises a PC terminal and an embedded terminal, wherein the PC terminal is provided with a first communication module, an interface software development kit is stored in the PC terminal, the embedded terminal is provided with a second communication module, and an embedded graphic system is stored in the embedded terminal.
The PC terminal is used for compiling and displaying a user interface designed by a user through the interface software development kit; and the system is also used for responding to the user interface to generate a debugging trigger event, generating an event processing function corresponding to the debugging trigger event through an interface software development kit, converting the event processing function into a first transmission object adopting a first data structure through the interface software development kit, and transmitting the first transmission object to a second communication module through a first communication module, wherein the function name and parameter information of the event processing function are recorded in the first transmission object.
The embedded terminal is used for receiving the first transmission object through the second communication module, converting the first transmission object through the embedded graphic system to obtain an event processing function, and executing the event processing function through the embedded graphic system to obtain an event processing result; and the second transmission object is used for transmitting the second transmission object to the first communication module through the second communication module, and the function name of the event processing function and the event processing result are recorded in the second transmission object.
The PC terminal is also used for receiving the second transmission object through the second communication module, analyzing the second transmission object through the interface software development kit to obtain an event processing result, and updating the user interface according to the event processing result.
For a specific description of the embedded terminal and the PC terminal in this embodiment, reference may be made to the corresponding content in the foregoing embodiment, which is not repeated here.
In some embodiments, the PC terminal includes one or more first processors and a first memory; the first memory stores one or more first programs, which when executed by the one or more first processors, enable the first processors to implement the processes of step S1a, step S1, step S2 (including step S201 to step S203), step S5 (including step S501 and step S502), and step S6a in the above embodiments.
In addition, one or more first I/O interfaces may be disposed between the first processor and the first memory, the first I/O interfaces configured to enable information interaction between the first processor and the first memory.
In some embodiments, the embedded terminal includes one or more first processors and a first memory; the first memory stores one or more first programs, which when executed by the one or more first processors, cause the processors to implement the processes of step S1b, step S3 (including step S301 and step S302), step S4 (including step S401 and step S402), and step S6b in the above embodiments.
In addition, one or more second I/O interfaces may be disposed between the second processor and the second memory, the second I/O interfaces configured to enable information interaction of the second processor with the second memory.
Wherein the processor is a device having data processing capabilities, including but not limited to a Central Processing Unit (CPU) or the like; the memory is a device with data storage capability including, but not limited to, random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically charged erasable programmable read-only memory (EEPROM), FLASH memory (FLASH); the I/O interface (read/write interface) is connected between the processor and the memory, and can implement information interaction between the processor and the memory, including but not limited to a data Bus (Bus), etc.
In some embodiments, processors, memory, and I/O interfaces located within the same terminal (embedded terminal or PC terminal) are interconnected by corresponding buses, which in turn are connected with other components of the computing device.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a machine-readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such embodiments, the computer program may be downloaded and installed from a network via a communication portion, and/or installed from a removable medium. The above-described functions defined in the system of the present disclosure are performed when the computer program is executed by a Central Processing Unit (CPU).
It should be noted that the computer readable medium shown in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
It is to be understood that the above embodiments are merely exemplary embodiments employed to illustrate the principles of the present disclosure, however, the present disclosure is not limited thereto. Various modifications and improvements may be made by those skilled in the art without departing from the spirit and substance of the disclosure, and are also considered to be within the scope of the disclosure.

Claims (10)

1. A method for debugging a user interface of an embedded terminal, the method being applied to a debugging system, the debugging system comprising: the method comprises the steps of configuring a first communication module in the PC terminal, storing an interface software development kit in the PC terminal, configuring a second communication module in the embedded terminal, storing an embedded graphic system in the embedded terminal, and debugging the embedded graphic system, wherein the debugging method comprises the following steps:
the PC terminal compiles and displays a user interface designed by using an interface software development kit in advance;
generating a debugging trigger event in response to the user interface, generating an event processing function corresponding to the debugging trigger event by the PC terminal through the interface software development kit, converting the event processing function into a first transmission object adopting a first data structure through the interface software development kit, and sending the first transmission object to the second communication module through the first communication module, wherein the function name and parameter information of the event processing function are recorded in the first transmission object;
the embedded terminal receives the first transmission object through the second communication module, converts the first transmission object through the embedded graphic system to obtain the event processing function, and executes the event processing function through the embedded graphic system to obtain an event processing result;
The embedded terminal converts the event processing result into a second transmission object adopting a second data structure through the embedded graphic system, and sends the second transmission object to the first communication module through the second communication module, wherein the function name of the event processing function and the event processing result are recorded in the second transmission object;
and the PC terminal receives the second transmission object through the second communication module, analyzes the second transmission object through the interface software development kit to obtain the event processing result, and updates and displays the user interface according to the event processing result.
2. The debugging method of claim 1, wherein the interface software development kit comprises: the system comprises a first interface file and a PC-used graphic library, wherein the first interface file is recorded with header files and first conversion rule information of all interfaces required by the interface software development kit, and the PC-used graphic library is configured for a user to carry out user interface design;
before the step of generating the event processing function corresponding to the debugging trigger event by the PC terminal through the interface software development kit, the method further comprises the following steps:
Responding to a first debug mode entering instruction, generating a first debug module in the interface software development kit by the PC terminal according to the first interface file, wherein the first debug module is configured to be capable of converting a function generated by the first interface file into a corresponding transmission object according to the first conversion rule information;
the step of generating an event processing function corresponding to the debugging trigger event by the PC terminal through the interface software development kit and converting the event processing function into a first transmission object adopting a first data structure by the PC terminal through the interface software development kit comprises the following steps:
the PC terminal generates an event processing function corresponding to the debugging trigger event through the first interface file, and converts the event processing function into the first transmission object through the first debugging module according to the first conversion rule information;
the step of analyzing the second transmission object by the PC terminal through the interface software development kit to obtain the event processing result comprises the following steps:
and the PC terminal analyzes the second transmission object through the first debugging module to obtain the event processing result.
3. The debugging method of claim 2, further comprising, after the step of updating the user interface based on the event processing results:
and responding to a first instruction of exiting the debugging mode, and deleting the first debugging module in the interface software development kit by the PC terminal.
4. The debugging method of claim 2, wherein the first data structure is recorded in the first transformation rule information comprises: a first attribute and a second attribute;
the first debug module converting the event processing function into the first transport object according to the first conversion rule information includes:
the first debugging module extracts the function name and parameter information of the event processing function;
the first debugging module constructs a first transmission object adopting a first data structure according to the function name and the parameter information of the event processing function, wherein the attribute value of a first attribute of the first transmission object is the function name of the event processing function, and the attribute value of a second attribute of the first transmission object is the parameter information of the event processing function.
5. The debugging method of claim 2, wherein the second data structure comprises a third attribute and a fourth attribute;
The step of analyzing the second transmission object by the interface software development kit to obtain the event processing result comprises the following steps:
the first debugging module obtains an attribute value of a third attribute and an attribute value of a fourth attribute from the second transmission object, wherein the attribute value of the third attribute of the second transmission object is a function name of the event processing function, and the attribute value of the fourth attribute of the second transmission object is the event processing result.
6. The debugging method according to any one of claims 1 to 5, wherein the embedded graphics system comprises: the system comprises a first interface file and an embedded graphic library, wherein the first interface file is used for storing the first conversion rule information and the second conversion rule information of all interfaces required by the embedded graphic system, the embedded graphic library is configured with a function library, and the function library is used for storing object codes of various functions required by the embedded graphic system;
before the step of generating the event processing function corresponding to the debugging trigger event by the PC terminal through the interface software development kit, the method further comprises the following steps:
responding to a second debug mode entering instruction, generating a second debug module in the embedded graphic system by the embedded terminal according to the second interface file, wherein the second debug module is configured to be capable of converting a transmission object received by the second communication module into a corresponding function according to the second conversion rule information;
The step that the embedded terminal converts the first transmission object through the embedded graphic system to obtain the event processing function, and the step that the embedded graphic system executes the event processing function to obtain an event processing result comprises the following steps:
and the embedded terminal converts the first transmission object according to second conversion rule information through the second debugging module to obtain the event processing function, and calls an object code corresponding to the event processing function in a function library configured by the embedded graphic library through the second interface file to execute the event processing function.
7. The debugging method of claim 6, further comprising, after the step of updating the user interface based on the event processing results:
and responding to a second instruction of exiting the debugging mode, and deleting the second debugging module in the embedded graphic system by the embedded terminal.
8. The debugging method of claim 6, wherein the second conversion rule information includes attribute information included in the first data structure comprising: an attribute of the first attribute and an attribute of the second attribute;
The step of converting the first transmission object by the second debugging module according to the second conversion rule information to obtain the event processing function comprises the following steps:
the second debugging module acquires the attribute value of the first attribute and the attribute value of the second attribute from the first transmission object;
the second debugging module constructs the event processing function according to the attribute value of the first attribute in the first transmission object and the attribute value of the second attribute, the function name of the event processing function is the attribute value of the first attribute in the first transmission object, and the parameter information of the event processing function is the attribute value of the second attribute in the first transmission object.
9. The method of debugging in accordance with claim 6, wherein the second data structure comprises a third attribute and a fourth attribute;
the step of the embedded graphics system converting the event processing result into a second transport object in a second data structure comprises:
and the second debugging module constructs a second transmission object adopting a second data structure according to the function name of the event processing function and the event processing result, wherein the attribute value of the third attribute of the second transmission object is the function name of the event processing function, and the attribute value of the fourth attribute of the second transmission object is the event processing result.
10. A debugging system of a user interface of an embedded terminal, configured to enable the debugging method according to any one of claims 1 to 9, the debugging system comprising: the system comprises a PC terminal and an embedded terminal, wherein the PC terminal is provided with a first communication module, an interface software development kit is stored in the PC terminal, the embedded terminal is provided with a second communication module, and an embedded graphic system is stored in the embedded terminal;
the PC terminal is used for compiling and displaying a user interface designed by using the interface software development kit in advance; and the system is also used for responding to the user interface to generate a debugging trigger event, generating an event processing function corresponding to the debugging trigger event through the interface software development kit, converting the event processing function into a first transmission object adopting a first data structure through the interface software development kit, and sending the first transmission object to the second communication module through the first communication module, wherein the function name and parameter information of the event processing function are recorded in the first transmission object;
the embedded terminal is used for receiving the first transmission object through the second communication module, converting the first transmission object through the embedded graphic system to obtain the event processing function, and executing the event processing function through the embedded graphic system to obtain an event processing result; the embedded graphic system is further used for converting the event processing result into a second transmission object with a second data structure, and sending the second transmission object to the first communication module through the second communication module, wherein the function name of the event processing function and the event processing result are recorded in the second transmission object;
The PC terminal is also used for receiving the second transmission object through the second communication module, analyzing the second transmission object through the interface software development kit to obtain the event processing result, and updating a user interface according to the event processing result.
CN202311732925.0A 2023-12-18 2023-12-18 Method and system for debugging user interface of embedded terminal Active CN117421251B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311732925.0A CN117421251B (en) 2023-12-18 2023-12-18 Method and system for debugging user interface of embedded terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311732925.0A CN117421251B (en) 2023-12-18 2023-12-18 Method and system for debugging user interface of embedded terminal

Publications (2)

Publication Number Publication Date
CN117421251A CN117421251A (en) 2024-01-19
CN117421251B true CN117421251B (en) 2024-03-19

Family

ID=89525121

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311732925.0A Active CN117421251B (en) 2023-12-18 2023-12-18 Method and system for debugging user interface of embedded terminal

Country Status (1)

Country Link
CN (1) CN117421251B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6456308B1 (en) * 1996-08-08 2002-09-24 Agranat Systems, Inc. Embedded web server
JP2003271385A (en) * 2002-01-08 2003-09-26 Ricoh Co Ltd Application generating method, application generating program, information processor and application developing and recording medium
CN201548951U (en) * 2009-09-30 2010-08-11 福建新大陆通信科技有限公司 Analog device for set-top-box interface
CN102855190A (en) * 2005-06-29 2013-01-02 高通股份有限公司 Visual debugging system for 3D user interface program
CN107329997A (en) * 2017-06-08 2017-11-07 腾讯科技(深圳)有限公司 Page display method and device, client, storage medium
CN111580806A (en) * 2020-04-10 2020-08-25 天津大学 Collaborative robot graphical programming system
US11074156B1 (en) * 2020-04-06 2021-07-27 Marklogic Corporation Debug adapter to facilitate server-side javascript debugging
CN114116443A (en) * 2021-07-06 2022-03-01 深圳点猫科技有限公司 Page data transmission method, device, system and medium
CN114422857A (en) * 2021-12-28 2022-04-29 炫彩互动网络科技有限公司 Webpage debugging method on IPTV set-top box and set-top box
CN114936151A (en) * 2022-05-05 2022-08-23 北京达佳互联信息技术有限公司 Display method, device, equipment, storage medium and communication system of debugging page

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001095161A2 (en) * 2000-06-02 2001-12-13 Virtio Corporation Method and system for virtual prototyping
TW201101170A (en) * 2009-06-26 2011-01-01 Ibm Computer apparatus and method for processing graphic user interface (GUI) objects

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6456308B1 (en) * 1996-08-08 2002-09-24 Agranat Systems, Inc. Embedded web server
JP2003271385A (en) * 2002-01-08 2003-09-26 Ricoh Co Ltd Application generating method, application generating program, information processor and application developing and recording medium
CN102855190A (en) * 2005-06-29 2013-01-02 高通股份有限公司 Visual debugging system for 3D user interface program
CN201548951U (en) * 2009-09-30 2010-08-11 福建新大陆通信科技有限公司 Analog device for set-top-box interface
CN107329997A (en) * 2017-06-08 2017-11-07 腾讯科技(深圳)有限公司 Page display method and device, client, storage medium
US11074156B1 (en) * 2020-04-06 2021-07-27 Marklogic Corporation Debug adapter to facilitate server-side javascript debugging
CN111580806A (en) * 2020-04-10 2020-08-25 天津大学 Collaborative robot graphical programming system
CN114116443A (en) * 2021-07-06 2022-03-01 深圳点猫科技有限公司 Page data transmission method, device, system and medium
CN114422857A (en) * 2021-12-28 2022-04-29 炫彩互动网络科技有限公司 Webpage debugging method on IPTV set-top box and set-top box
CN114936151A (en) * 2022-05-05 2022-08-23 北京达佳互联信息技术有限公司 Display method, device, equipment, storage medium and communication system of debugging page

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于ARM和RTOS的嵌入式GUI应用平台设计;袁睿;;考试周刊;20110517(第39期);全文 *
基于嵌入式Linux的Web远程继电器控制系统的设计实现;丁天然;王乐;;中国传媒大学学报(自然科学版);20090630(第02期);全文 *

Also Published As

Publication number Publication date
CN117421251A (en) 2024-01-19

Similar Documents

Publication Publication Date Title
CN107592238B (en) Automatic test method and system of interface, service terminal and memory
CN111831538B (en) Debugging method, device and storage medium
GB2589658A (en) Method and apparatus for running an applet
CN110135168B (en) Application program detection method, device and system, terminal equipment and storage medium
CN112965794B (en) Algorithm calling method, electronic equipment and storage medium
CN114610640A (en) Fuzzy testing method and system for trusted execution environment of Internet of things
EP4246153A1 (en) Test circuit, method and apparatus for module to be subjected to testing
CN115185533A (en) Compiling processing method, device and equipment
CN108282542A (en) Remote operation method and device for test equipment
CN113127000B (en) Compiling method, compiling device, compiling equipment and compiling storage medium for application program component
CN113052942B (en) Chart generation method, device, storage medium and electronic equipment
CN113094138B (en) Interface display method and device, electronic equipment and storage medium
CN117421251B (en) Method and system for debugging user interface of embedded terminal
CN110489180B (en) Buried point reporting method, device, medium and electronic equipment
CN111752644A (en) Interface simulation method, device, equipment and storage medium
US11962929B2 (en) Method, apparatus, and device for configuring video special effect, and storage medium
CN107562629B (en) Method and device for testing
CN111273967A (en) Remote hook setting method and device suitable for Android system and electronic equipment
CN113448585B (en) Compiling method and device of thread pool, electronic equipment and storage medium
CN111309323B (en) Parameter initialization method and device and electronic equipment
CN112214392B (en) JS code debugging method, device, terminal and storage medium
CN113704079A (en) Interface testing method and device based on Protobuf
CN110430175B (en) Encryption protocol implanting method, device and equipment based on AC35 platform
CN113553040B (en) Registration realization method, device, equipment and medium for visible and spoken identification function
CN111752636B (en) Data grabbing method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant