Disclosure of Invention
The invention aims to solve the defects in the prior art, and provides a method for facilitating the maintenance of a GUI (graphical user interface) by an intelligent instrument, which comprises the following steps of;
S1: packaging a unified interface in a GUI library, realizing the butt joint between different GUI libraries through the interface, and developing a display page library through a graphic drawing library and a display control fixed in the GUI library, wherein the GUI library also comprises library data synchronization, operation information and library virtual data;
S2: developing a device GUI package for the instrument through the GUI library, developing a display page of the device GUI package through a display control of the device GUI library and the display page library, and developing virtual display and information according to a cross-platform graphic library to realize that a GUI package of a platform runs in the platform;
S3: the equipment GUI package is accessed through the platform GUI package, so that the same operation effect of the platform and the instrument is realized, and the maintenance of the instrument through a communication medium is further realized.
Preferably, in step S1, the interface further includes:
The interface comprises operation information, a display interface, a data synchronization interface and a virtual interface, wherein the interface strips a page display library of the GUI library from hardware, the operation information is used for receiving external information, namely interaction between the page display library and external operation is realized, the display interface is used for realizing interaction between the GUI library and different platforms, the synchronization between the page display library and the display interface is realized by library virtual data and library data synchronization, and the page definition library is an actual page of an instrument.
Preferably, in step S2, the device GUI package further includes:
Before the instrument is not finished, the development work of the GUI package of the equipment is carried out in advance, the GUI package is operated in the cross-platform graphic library to carry out function demonstration and verification, the operation environment of the cross-platform graphic library is developed aiming at the GUI library, and the GUI package of the equipment is developed according to the operation environment, so that the GUI package of the equipment is operated into the instrument.
Preferably, the displaying the page further includes:
and acquiring the data content of the display page through the interface, and importing the data content into a device data synchronization module of the device GU I package through the interface to realize data synchronization among different device GUI packages.
Preferably, the device data synchronization module further includes:
the device data synchronization module provides data addresses and data types, wherein the data types comprise real-time update data, read-only data and read-write data, after design data of the display page are designed according to a synchronization mode, the display page directly utilizes the design data to display and edit, and the device data synchronization module synchronizes the design data to a part for actually using and storing the data so as to realize the access of the display page to the data content.
Preferably, in step S2, the platform GUI package runs in a platform, further comprising:
the platform GUI package is operated in a platform in a closed package mode, after the platform GUI package is connected to a display unit of the platform in a butt joint mode, the platform GUI package outputs the display page to the display unit, and corresponding display units are updated according to operation commands and data.
Preferably, in step S2, the cross-platform graphics library further includes:
The cross-platform graphic library is used for developing a virtual display interface to present the platform GUI package, converting a keyboard input command into a message processing interface conforming to the platform GUI package by utilizing a keyboard input mode, and presenting and operating the platform GU I package at a terminal running the cross-platform graphic library after a thread is added in the cross-platform graphic library to run the platform GU I package.
Preferably, in step S3, the accessing the device GUI package through the platform GUI package achieves the same operation effect of the platform and the meter, and further includes:
And the display page is in butt joint with the instrument, namely the device GUI package is in butt joint with the internal data of the instrument or package virtual data is used as the data support of the display page, the virtual display interface is in butt joint with the instrument, and the data synchronization of the platform and the instrument is realized through the platform data synchronization module of the platform GU I package and the device data synchronization module.
A computer device comprising a memory and a processor, the memory having stored therein computer readable instructions that, when executed by the processor, cause the processor to perform the steps of a method of facilitating smart meter maintenance GUI in an embodiment.
A storage medium storing computer readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of a method for facilitating smart meter maintenance, gui, as described in one embodiment.
Compared with the prior art, the invention has the beneficial effects that:
1) According to the invention, through the improved GUI component, namely the GUI library, and the GUI component has the functions of the data virtual module and the data synchronous module, the human-computer interface development and the instrument function development can be independent, the human-computer interface development can be carried out and used as the discussion or the evaluation of the function demonstration under the condition that the instrument actual hardware does not have, after the actual hardware platform has, the developed GUI component can be applied to the instrument without additional development, the primary development is realized, and the purposes of instrument operation and maintenance are achieved.
2) According to the invention, the GUI component is operated under a cross-platform architecture to maintain the instrument, the operation logic is synchronous with the instrument, the development and learning cost is introduced, and the method has good convenience for small-scale or single-meter maintenance.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application. It will be apparent that the described embodiments are some, but not all, embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
As used herein, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless expressly stated otherwise, as understood by those skilled in the art. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
Technical terms designed by the embodiment of the invention are defined as follows:
GUI: a graphical user interface (GRAPHICAL USER INTERFACE, abbreviated as GUI, also called graphical user interface) refers to a computer-operated user interface that is displayed in a graphical manner, and here represents a user-operated display interface used in instruments.
Intelligent instrument: the intelligent instrument takes a microcomputer (single chip microcomputer) as a main body, combines computer technology and detection technology organically to form a new generation of intelligent instrument, wherein the intelligent instrument is an instrument with a display screen and keys, can operate a GUI interface and has certain interaction capability.
And (3) a PC computer: the personal computer is a multipurpose computer with a general operation function, and a desktop computer, a notebook computer, a small notebook computer, a tablet computer, an ultrabook and the like belong to the personal computer, and mainly refer to the personal computer with convenience.
HART: the open communication protocol for the addressable remote sensor high speed channel was developed in 1985 by ROSEMOUNT in the united states as a communication protocol for use between a field intelligent meter and control room equipment.
WxWi dgets: wxWi dgets is an open source, cross-platform, c++ framework library (framework) that may provide GU I (graphical user interface) and other tools.
Example 1
Referring to fig. 1, a method for facilitating maintenance of a GUI by a smart meter according to the present embodiment includes the following steps;
s1: packaging unified interface in GU I library, realizing butt joint between different GUI libraries through the interface, developing display page library through fixed graphic drawing library and display control in GUI library, wherein GUI library also comprises library data synchronization, operation message and library virtual data, specifically, in this embodiment, the interface is the access interface of GU I library, the standardized encapsulation can connect the GUI library with a unit conforming to the interface design, the GU I library design in the embodiment uses the C language design, the GUI library can be operated in an embedded system and runt ime environment supporting C language operation, the external operation GUI library is in butt joint with the GU I library through an interface mode except for fixed content, the page definition library, data synchronization, operation information and virtual data, and different devices can customize the parts;
S2: the method comprises the steps that a device GUI package for an instrument is developed through a GU I library, a display page of the GU I package is developed through a display control and a display page library of the GU I library of the device, and the platform GUI package is operated in a platform according to cross-platform graphic library development virtual display and information, specifically, in the embodiment, the GU I package based on C development can be operated in the instrument and can be operated in the instrument by utilizing a wxWidgets cross-platform graphic library, only the cross-platform graphic library is required to be used for developing virtual display and information once, development work of additional development is not required, the GUI package can be operated in different platforms, the instrument and the instrument can be operated in the development process, the GUI package is required to be developed by utilizing the GUI library, the prior instrument and instrument access maintenance is usually carried out through a communication protocol, additional access software development work is carried out at an access end, the embodiment only needs to conduct one development of the GUI package, additional development is not required, and in addition, if product upgrading occurs on the prior instrument, corresponding maintenance tools also need to conduct secondary development to achieve maintenance on the product after the upgrade, the product maintenance is carried out, the purpose of the product maintenance is achieved, the GUI package is not required to be repeatedly developed in the product upgrading process, and the platform maintenance process is achieved, and the purpose is achieved;
S3: the platform GUI package is used for accessing the equipment GUI package, so that the same operation effect of the platform and the instrument is realized, and the maintenance of the instrument through a communication medium is further realized.
Further, in the development process of the existing product, corresponding development is needed to be carried out after corresponding current hardware is completed, and in the early evaluation, the development period is long, the problem that the later implementation and the design effect are different is solved, the embodiment can carry out design development according to the design draft under the support of a cross-platform display library on the premise that target hardware does not exist, and carry out operation demonstration evaluation on different platforms, and after the target hardware is completed, the product can be directly used on the target hardware without modification, so that the development period is shortened, the final effect can be demonstrated in the evaluation demonstration stage, and the deviation is prevented.
Furthermore, when the existing product is maintained, corresponding functional software is often redeveloped by utilizing a communication protocol and the like, repeated learning is needed when a user uses the product, and the re-learning of the instrument and the maintenance instrument is aimed at, in the embodiment, as the same GUI package operates in different platforms, the operation effect is completely the same, the user does not need to repeatedly learn, the use difficulty is reduced, and the error probability is reduced
Preferably, in step S1, the interface further includes:
The interface includes operation information, display interface, data synchronization interface, interface including virtual interface, the interface peels off the page display library of GU I library from hardware, wherein the operation information is used for receiving the external message, namely realize the interaction of page display library and external operation, the display interface is used for realizing the interaction of GUI library in different platforms, the synchronization between page display library and display interface is realized by library virtual data and library data synchronization, the page definition library is the actual page of the instrument, in this embodiment, the instrument interface development and GU I component development are independently separated by the encapsulation interface, the above interface parts can be customized by different devices, the operation information accepts the external message, the interaction of page display library to external operation can be realized according to the customization of GUI library operation platform, the interaction with GUI library in different platforms can be realized, the virtual data and data synchronization module is used for the synchronization between the display interface and different interface libraries, the page definition library is the actual page required by the specific instrument.
Preferably, in step S2, the device GUI package further includes:
Before the instrument is not finished, development work of the equipment GUI package is performed in advance, the equipment GUI package is operated in the cross-platform graphic library to perform function demonstration and verification, an operation environment of the cross-platform graphic library is developed for the GUI library, the equipment GUI package is developed according to the operation environment to realize that the equipment GUI package is operated into the instrument, and in particular, in the embodiment, the GUI package can be operated in the instrument in a closed package mode.
Preferably, displaying the page further comprises:
The data content of the display page is acquired through the interface, the data content is imported into the equipment data synchronization module of the equipment GUI package through the interface to realize the data synchronization among different equipment GU I packages, specifically, in the embodiment, the display page needs data support, all data is transferred through the standardized packaged interface, the GUI package used for the instrument can be used for butting data or virtual data in the instrument, can be used for supporting the requirement of the instrument on a display page, can be used for importing designed data content into the equipment data synchronization module in an interface mode, and can realize data synchronization among different GUI packages.
Preferably, the device data synchronization module further comprises:
the device data synchronization module prescribes data addresses and data types, including real-time update data, read-only data and read-write data, and after design data of a display page is designed according to a synchronization mode, the display page directly utilizes the design data to display and edit, and the device data synchronization module synchronizes the design data to a part for actually using and storing the data so as to realize access of the display page to data contents.
Preferably, in step S2, the platform GUI package runs in a platform, further comprising:
The platform GUI package is operated in a platform in a closed package mode, after the platform GU I package is connected to a display unit of the platform in a butt joint mode, the platform GUI package outputs a display page to the display unit, corresponding display units are updated according to operation commands and data, data synchronization is supported by the inside of the platform GUI package, synchronous operation can be achieved by the aid of the platform GUI packages operated by different platforms, and display units of different platforms can be updated in real time.
Preferably, in step S2, the cross-platform graphics library further includes:
The cross-platform graphic library wxWidges is used for developing a virtual display interface to present a platform GU I package, and converting a keyboard input command into a message processing interface conforming to the platform GUI package by utilizing a keyboard input mode, and presenting and operating the platform GU I package at a terminal running the cross-platform graphic library after adding a thread running the platform GUI package in the cross-platform graphic library.
Preferably, in step S3, the device GUI package is accessed through the platform GUI package, so that the platform and the meter operate with the same effect, and further includes:
And the display page is in butt joint with the instrument, namely the device GUI package is in butt joint with the internal data of the instrument or virtual data of the package is used as the data support of the display page, the virtual display interface is in butt joint with the instrument, and the data synchronization of the platform and the instrument is realized through the platform data synchronization module and the device data synchronization module of the platform GUI package.
The GUI package running effect of different platforms is the same as the running effect of the instrument and meter, no additional learning and development cost exists, the development work of the GUI package can be carried out in advance before the hardware platform of the instrument and meter is not completed, the GUI package can be run in a cross-platform mode to carry out function demonstration and verification, a cross-platform running environment is developed aiming at a GUI library, for example, the wxWi dgets graphic library is used as a display unit in wi ndows environment, the GUI package is run in a C language running environment, and the GUI package specially developed for the instrument and meter can be run in wi ndows environment. After the GUI package passes the function demonstration and verification, the display page and data development required by the GUI package are realized in the GUI package, no additional development is needed, the GUI package is operated to the instrument and the meter after the hardware platform of the instrument and the meter is completed, the page data are in butt joint with the instrument and the meter, the page data are directly operated on the meter with the same effect, and the development period of the meter is greatly shortened besides the improvement of the effective rate of the function demonstration and verification in advance.
The GUI package is used for realizing the access of different platforms to the instruments and meters, the GU I package of the instruments and meters can be developed according to actual needs, the same functions as the instruments and meters can be carried out at the access end by means of the data synchronization function of the GUI package, and the mode has higher flexibility relative to a communication protocol.
The GUI component (GUI library) suitable for the intelligent instrument is developed, so that the GUI component is small in occupied resource and low in performance requirement, is suitable for most of single-chip microcomputer platforms at present, and can be widely used for the intelligent instrument. By utilizing the specific GUI component, the human-computer interface level of the intelligent instrument can be improved, the development difficulty of the intelligent instrument in the interaction aspect is reduced, the development time is shortened, and the intelligent instrument can be used only by developing the interface and synchronous data required by the intelligent instrument on the GUI component.
According to the embodiment, through the GUI component written in the high-level language C, the cross-platform graphic library such as wxWidgets is utilized, the GUI component can run on different platforms, the instruments can be accessed on different platforms through a certain communication medium on the premise that development cost and learning cost do not need to be increased, the functions of the GUI component are not different from those of the instruments, the maintenance cost of the instruments can be greatly reduced, and the convenience of the instruments is improved. In some occasions, development time is short in the development process of the intelligent instrument, in order to shorten the time, a scheme needs to be determined at the early stage of instrument development, in the embodiment, the characteristics of a GUI component are utilized, when instrument hardware development is not completed yet, development of an instrument man-machine interface can be independently carried out, virtual data and a screen are established by utilizing wxWidgets to cross-platform graphic libraries, the developed GUI graphic interface can be operated, the operation content can be used for scheme communication and review, and because the operation effect is consistent with that on the instrument, the effect is visual, after related hardware is completed, a developed graphic package can be embedded into functional software for instrument development without carrying out development work again, so that development workload is reduced, and integral development time of the instrument is shortened.
Example 2
In this embodiment, a computer device is provided, including a memory and a processor, where the memory stores computer readable instructions that, when executed by the processor, cause the processor to perform the steps of a method in embodiment 1 for facilitating maintenance of a GU I by a smart meter.
In this embodiment, a storage medium storing computer readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of a method of facilitating smart meter maintenance GUI of the first embodiment is presented.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be implemented by a program to instruct related hardware, the program may be stored in a computer readable storage medium, and the storage medium may include: read Only Memory (ROM), random access Memory (RAM, randomAccess Memory), magnetic disk or optical disk, and the like.
The technical features of the above-described embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above-described embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description of the present specification.
The above description is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above examples, and all technical solutions belonging to the concept of the present invention belong to the protection scope of the present invention. It should be noted that modifications and adaptations to the present invention may occur to one skilled in the art without departing from the principles of the present invention and are intended to be within the scope of the present invention.