CN112579087A - Development method of cooking machine human-computer interface based on Lua script - Google Patents
Development method of cooking machine human-computer interface based on Lua script Download PDFInfo
- Publication number
- CN112579087A CN112579087A CN202011565904.0A CN202011565904A CN112579087A CN 112579087 A CN112579087 A CN 112579087A CN 202011565904 A CN202011565904 A CN 202011565904A CN 112579087 A CN112579087 A CN 112579087A
- Authority
- CN
- China
- Prior art keywords
- interface
- lua
- lua script
- script
- service logic
- 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.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/38—Creation or generation of source code for implementing user interfaces
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/31—Programming languages or programming paradigms
- G06F8/313—Logic programming, e.g. PROLOG programming language
Abstract
The invention discloses a method for developing a man-machine interface of a cooking machine based on a Lua script, which comprises the following steps: dividing the functional module into an abstract interface layer of UI design, service logic and a C interface; calling a standard packaged C language function library by the abstract interface layer of the Lua script according to the Lua script; and the Lua script is packaged through a calling interface, and the service logic calls back the interface and analyzes and executes hardware operation through a Lua engine. By introducing and developing the Lua script, the product functions are divided into service logic and an abstract interface, the service logic adopts Lua programming to realize the design of the concrete logic and the UI component of the product, and the abstract interface finishes the control of the hardware interface. And the common requirement is subjected to modular design, so that the reusability is improved, and the development of common products is simplified.
Description
Technical Field
The invention relates to the technical field of intelligent home furnishing, in particular to a method for developing a cooking machine human-computer interface based on a Lua script.
Background
At present, the development of a human-computer interface on an intelligent cooking machine is realized based on the traditional Java and C/C + +. The common defects of the above technologies are as follows: the developed code amount is huge, and the code logic design is complex. This is a huge bottleneck for rapidly launching products with individuality in the market with fierce competition.
Lua is a small scripting language designed to provide flexible extension and customization of UI functions for embedded applications. Lua is compiled based on standard C, and almost all operating systems and platforms can be compiled and run; therefore, the existing interface development technology still needs to be improved.
Disclosure of Invention
In order to solve the problems in the prior art, the invention aims to provide a method for developing a man-machine interface of a cooking machine based on a Lua script, so that the problems of huge code amount, complex code logic design and the like of man-machine interface development in the prior art are solved; by introducing and developing the Lua script, the product functions are divided into service logic and an abstract interface, the service logic adopts Lua programming to realize the design of the concrete logic and the UI component of the product, and the abstract interface finishes the control of the hardware interface. And the common requirement is subjected to modular design, so that the reusability is improved, and the development of common products is simplified.
In order to achieve the purpose, the invention adopts the technical scheme that: a method for developing a cooking machine human-computer interface based on a Lua script comprises the following steps:
dividing the functional module into an abstract interface layer of UI design, service logic and a C interface;
calling a standard packaged C language function library by the abstract interface layer of the Lua script according to the Lua script;
and the Lua script is packaged through a calling interface, and the service logic calls back the interface and analyzes and executes hardware operation through a Lua engine.
As a further improvement of the present invention, the abstract interface layer includes various hardware-related call interfaces.
As a further improvement of the invention, the calling interface comprises UART, RTC, HTTP, TCP/UDP, GPIO and timer operation interface.
As a further improvement of the invention, the functional module also comprises an embedded real-time operating system, a file system, a graphical interface and a corresponding development tool.
As a further improvement of the invention, the UI design and the design and development of the business logic specifically comprise the following steps:
firstly, operating the C language part to provide an environment for the operation of Lua language application, and simultaneously separating a hardware control part from service logic through a Lua engine, so that a user service logic script developed by Lua is unrelated to hardware, and simulation debugging development can be carried out on a PC;
a basic development tool VisualTFT of a Lua screen of the cooker is installed on the PC, and UI component callback and hardware operation callback functions related to product service logic are completed by using a Lua script language.
The invention has the beneficial effects that:
the invention fully utilizes the characteristics of lightweight, easy transplantation and high efficiency of the Lua script, introduces the Lua into interface development, provides a brand new development mode for the interface development, has the functions of live expansion and UI customization and greatly shortens the development period of a human-computer interface.
Drawings
FIG. 1 is a block diagram of a functional module according to an embodiment of the present invention;
FIG. 2 is a block flow diagram of an embodiment of the present invention.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
Examples
As shown in fig. 1, a method for developing a human-computer interface of a cooking machine based on a Lua script includes:
1. dividing the functional module into a UI, a business logic and an abstract interface layer; calling a standard packaged C language function library by the Lua and C interface abstract layer according to a Lua script; and the Lua script is packaged through a calling interface, and the service logic calls back the interface and analyzes and executes hardware operation through the Lua engine.
2. The abstract interface layer comprises various operation interfaces such as UART, RTC, HTTP, TCP/UDP, GPIO, timer and the like which are related to hardware.
3. The Lua service logic layer is a product logic service application program.
4. The UI layer can customize different UI components for the user to design.
5. The functional module also comprises an embedded real-time operating system, a file system, a graphical interface and a corresponding development tool, and is used for providing an operable interface for upper-layer application so as to meet the requirement of rapid development.
The product service logic and UI design development on the PC is as follows:
1. the C language part is operated to provide an environment for the operation of Lua language application, and simultaneously, a hardware control part and service logic are separated through a Lua engine, so that a user service logic script developed by Lua is unrelated to hardware, and the simulation debugging development can be carried out on a PC.
2. A basic development tool VisualTFT of a Lua screen of the cooker is installed on the PC, and UI component callback and hardware operation callback functions related to product service logic are completed by using a Lua script language.
3. Compared with the existing frying machine with large interface development difficulty and complex logic, the Lua script is introduced into the interface development, the Lua script logic development and debugging and the UI component design are carried out on the PC by installing the Lua development tool on the PC, and finally the Lua script logic development and debugging and the UI component design are downloaded to a frying machine screen, so that the program development difficulty is greatly simplified and the program development efficiency is improved. And the service logic interface can be standardized and modularly designed, so that the user requirement for facilitating the rapid development of products is met, and the development difficulty is reduced.
As shown in fig. 2, when implemented, the method comprises the following steps:
1. and powering on to run the C language part program application of the cooker screen for creating a C language program environment.
2. And initializing the Lua script interpreter, namely initializing a Lua engine program written in the C language to provide a running environment for the bottom interface layer, the upper logic layer and the UI layer.
3. And initializing and registering the Lua and C interfaces to realize interface mapping between the Lua engine and the C program, and providing support for subsequent Lua callback singlechip hardware functions.
4. Loading the Lua script from the flash.
5. And judging whether the executed Lua script exists or not, and downloading the script if the executed Lua script exists.
6. If the executable Lua script exists in the flash, the script is transmitted to an interpreter, and the interpreter executes service logic according to the script; and the Lua engine calls the mapping interface initialized in the step 3 to realize the control of the hardware.
The above-mentioned embodiments only express the specific embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention.
Claims (5)
1. A development method of a cooking machine human-computer interface based on a Lua script is characterized by comprising the following steps:
dividing the functional module into an abstract interface layer of UI design, service logic and a C interface;
calling a standard packaged C language function library by the abstract interface layer of the Lua script according to the Lua script;
and the Lua script is packaged through a calling interface, and the service logic calls back the interface and analyzes and executes hardware operation through a Lua engine.
2. The development method of the human-computer interface of the cooking machine based on the Lua script, as claimed in claim 1, wherein the abstract interface layer comprises various calling interfaces related to hardware.
3. The development method of the Lua script-based cooking robot interface of claim 2, wherein the calling interface comprises UART, RTC, HTTP, TCP/UDP, GPIO and timer operation interface.
4. The development method of the cooking machine human-machine interface based on the Lua script, according to claim 1, wherein the functional module further comprises an embedded real-time operating system, a file system, a graphical interface and a corresponding development tool.
5. The development method of the cooking machine human-computer interface based on the Lua script, according to claim 1, wherein the UI design and the design and development of the business logic specifically comprise:
firstly, operating the C language part to provide an environment for the operation of Lua language application, and simultaneously separating a hardware control part from service logic through a Lua engine, so that a user service logic script developed by Lua is unrelated to hardware, and simulation debugging development can be carried out on a PC;
a basic development tool VisualTFT of a Lua screen of the cooker is installed on the PC, and UI component callback and hardware operation callback functions related to product service logic are completed by using a Lua script language.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011565904.0A CN112579087A (en) | 2020-12-25 | 2020-12-25 | Development method of cooking machine human-computer interface based on Lua script |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011565904.0A CN112579087A (en) | 2020-12-25 | 2020-12-25 | Development method of cooking machine human-computer interface based on Lua script |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112579087A true CN112579087A (en) | 2021-03-30 |
Family
ID=75140673
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011565904.0A Pending CN112579087A (en) | 2020-12-25 | 2020-12-25 | Development method of cooking machine human-computer interface based on Lua script |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112579087A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170163645A1 (en) * | 2003-06-05 | 2017-06-08 | Intertrust Technologies Corporation | Interoperable Systems and Methods for Peer-to-Peer Service Orchestration |
CN107229480A (en) * | 2017-06-19 | 2017-10-03 | 郑州云海信息技术有限公司 | A kind of desktop application construction method and device based on web technology |
CN207352604U (en) * | 2017-10-23 | 2018-05-11 | 南京大全电气研究院有限公司 | A kind of intelligent distribution transformer terminals automatization test system based on LUA scripts |
CN108279902A (en) * | 2018-02-08 | 2018-07-13 | 合肥盈云信息科技有限公司 | Share bottom frame generation, application process in multiple terminals based on Lua script technologies |
CN109358839A (en) * | 2017-12-29 | 2019-02-19 | 广州Tcl智能家居科技有限公司 | A kind of method and storage medium of embedded scm software development |
-
2020
- 2020-12-25 CN CN202011565904.0A patent/CN112579087A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170163645A1 (en) * | 2003-06-05 | 2017-06-08 | Intertrust Technologies Corporation | Interoperable Systems and Methods for Peer-to-Peer Service Orchestration |
CN107229480A (en) * | 2017-06-19 | 2017-10-03 | 郑州云海信息技术有限公司 | A kind of desktop application construction method and device based on web technology |
CN207352604U (en) * | 2017-10-23 | 2018-05-11 | 南京大全电气研究院有限公司 | A kind of intelligent distribution transformer terminals automatization test system based on LUA scripts |
CN109358839A (en) * | 2017-12-29 | 2019-02-19 | 广州Tcl智能家居科技有限公司 | A kind of method and storage medium of embedded scm software development |
CN108279902A (en) * | 2018-02-08 | 2018-07-13 | 合肥盈云信息科技有限公司 | Share bottom frame generation, application process in multiple terminals based on Lua script technologies |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8490070B2 (en) | Unified mobile platform | |
CN101630251A (en) | Graphical interfaces development method and system of cross-desktop and embedded system | |
CN100371893C (en) | Method for realizing embedded device user interface | |
WO2012155631A1 (en) | Method and apparatus for constructing cross-platform software running environment | |
JPH10177467A (en) | Multitask data processing system and its method | |
WO2005031566A3 (en) | System and method for extending capabilities and execution efficiency of script based applications | |
CN109358839B (en) | Method for developing embedded single-chip microcomputer software and storage medium | |
CN111309292A (en) | MATLAB/Simulink-based full-model executable program construction method | |
CN102200909A (en) | Mobile terminal uniform interface method and system | |
CN107832056B (en) | JNI-based JAVA function calling method in C + + | |
CN107133042A (en) | A kind of iOS exploitation modeling methods based on IFML | |
CN112579087A (en) | Development method of cooking machine human-computer interface based on Lua script | |
CN105260184B (en) | A kind of adjustment method and device for restoring image file | |
CN103186367A (en) | Realization method for dynamic template of support script in monitoring system | |
CN102999371A (en) | Lua script-based human-computer interface development method and system | |
CN108052326B (en) | Implementation method for supporting Arduino IDE development by Xilinx FPGA | |
CN106126213B (en) | A kind of Android exploitation modeling method based on IFML | |
CN111367579B (en) | Processor in-loop simulation method based on V-REP plug-in | |
CN110874215B (en) | Drive control method and system for electric appliance or electric equipment | |
CN112328225A (en) | Page operation method and operation system thereof | |
CN112685892A (en) | Airborne simulation model based on plug-in technology | |
CN108279881A (en) | Cross-platform realization framework based on deep learning predicted portions and method | |
CN114579091B (en) | Cross-operating system robot flow automation system and method | |
CN107861798B (en) | The system-level operations method and device of application | |
CN102185970A (en) | Method for establishing standard for handset video player component model object interface |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210330 |
|
RJ01 | Rejection of invention patent application after publication |