For display control program and the control method thereof of electric power acquisition terminal
Technical field
The present invention relates to electric power acquisition field of terminal technology, is specifically a kind of display control program for electric power acquisition terminal and control method thereof.
Background technology
The rationality of the liquid crystal function menu display layout of electric power acquisition terminal is an important guarantee of acquisition terminal technical design, and is form that is fixing, sequencing layout for conventional terminal liquid crystal display interface.The existing display control program for electric power acquisition terminal comprises a principal function and multiple one-level subfunction, multiple secondary subfunction, multiple three grades of subfunctions.Its control method is when first entering principal function after electric power acquisition starting up of terminal, at this moment principal function there is multiple catalogue, after in elected, catalogue also confirms, namely the one-level subfunction corresponding with this catalogue is called, multiple catalogue is had in one-level subfunction, catalogue in elected also, after confirming, namely calls the secondary subfunction corresponding with this catalogue, by that analogy.Above-mentioned display control program and display packing thereof have the following disadvantages: 1, because this system is made up of multiple function, therefore it takies the space of electric power acquisition terminal very much.2, because the Function Extension of electric power acquisition terminal and function are equipped with change all than comparatively fast, and increase at every turn and change and all need to increase subfunction or corresponding function is modified, and the amendment of well-known program or increase and decrease are very complicated, it is pulled one hair and move the whole body, and therefore causes the non-constant of the extendability of existing display control program and control method thereof and maintenance workload is large.
Summary of the invention
The technical problem to be solved in the present invention is, provides a kind of little, favorable expandability and the little display control program for electric power acquisition terminal of maintenance workload and control method thereof of taking up room.
Technical scheme of the present invention is, provides a kind of display control program for electric power acquisition terminal, comprises
One principal function, this principal function is put in program memory; This master routine is used for the distributing of Component Gallery, the calling and the operation in control container pond of data;
One Component Gallery, this Component Gallery is placed in program storage; This Component Gallery forms infrastructure component storehouse by main window assembly, menu component, code component etc., and each assembly forms by multiple key response function;
One database, this database is placed in external memory storage; The all corresponding one group of ID of any one assembly in described infrastructure component storehouse;
One control container pond, this control container pond is placed in internal memory; This control container pond is made up of the multiple bytes of storage space of a continuous print.
Based on a display control method for claim 1 display control program, comprise the following steps:
(1), power on;
(2), principal function by Component Gallery initialization, the initialization of control container pond;
(3), principal function is taken out one group of ID corresponding to main window assembly and puts into control container pond, and showing main window by the first ID read in this group ID in database;
(4), a time period A is set;
(5), timing is started;
(6) if having push button signalling to input in time period A, then step (7) is performed; If do not have push button signalling to input in time period A, then perform step (8);
(7), principal function distributes the event of user's input in main window assembly, by read to should button response function and this group ID in control container pond is operated or transfers other assemblies in Component Gallery, read corresponding data and show corresponding interface, then time period A zero setting is also returned and is performed step (5) by principal function;
(8) if do not have push button signalling to input in time period A, then time period A zero setting is also returned and is performed step (5) by principal function.
Described multiple key response functions comprise key response function, lower key response function, left button response function, right button response function, cancel key response function, acknowledgement key response function, timing key response function and display key response function.
Described control container pond comprises 10 storage spaces, each storage space includes 40 bytes.
After adopting above system and method, the present invention compared with prior art, has the following advantages:
The present invention only has a Component Gallery, a control container pond and a database.Its control method is after first entering Component Gallery after electric power acquisition starting up of terminal, and at this moment Component Gallery reads corresponding this group ID in a database of main window assembly, reads corresponding data and is presented on screen.And when lower key asembly is pressed in the operation of technician's needs, respond the function of key asembly should be descended, to the enterprising line operate in basis of one group of ID of main interface assembly, or increase or subtract, or enter or move back, obtain other ID of new this group ID of sensing, then this ID is put into second storage space in control container pond, at this moment this function reads this ID and shows.1, because this system is made up of a Component Gallery, a control container pond and a database, therefore its space taking electric power acquisition terminal is very little.2, because the Function Extension of electric power acquisition terminal and function are equipped with change all than comparatively fast, and increase at every turn and change the information all needing to increase and only need in corresponding database, therefore make the present invention for the display control program of electric power acquisition terminal and the extendability of control method is very good and maintenance workload is less.
Embodiment
Below in conjunction with specific embodiment, the invention will be further described.
A kind of display control program for electric power acquisition terminal of the present invention, comprises
One principal function, this principal function is put in program memory; This master routine is used for the distributing of Component Gallery, the calling and the operation in control container pond of data; Those skilled in the art compile out corresponding data to realize the effect of principal function by the effect of principal function.
One Component Gallery, this Component Gallery is placed in program storage; This Component Gallery forms infrastructure component storehouse by main window assembly, menu component, code component etc., and each assembly forms by multiple key response function; In the present embodiment, Component Gallery informs assembly, main window assembly, password authentification assembly by coboundary assembly, lower limb assembly, unavailable component, menu component, confirmation dialog box assembly, information display component, setting, the aobvious assembly of wheel, data arrange assembly, can editing component, digital input module, character input module, time input module, page edit list assembly, IP input module, Password Input assembly, drop-down list assembly, progress bar assembly, period input module form.In these components, each assembly includes multiple key response function, but the quantity of button respective function that each assembly comprises is all not identical with type.It is pointed out that the Compilation Method of button respective function has various ways, the function that each compiling person compiles out is all not identical, and that is this key response function belongs to those of ordinary skill in the art does not all need to obtain through performing creative labour.
One database, this database is placed in external memory storage, as DATA FLASH, NANDFLASH etc.; ; The all corresponding one group of ID of any one assembly in described infrastructure component storehouse;
One control container pond, this control container pond is placed in internal memory; This control container pond is made up of the multiple bytes of storage space of a continuous print; Usually first ID is put into first storage space in control container pond, then second ID is put into second storage space in control container pond, by that analogy.
Based on a display control method for claim 1 display control program, comprise the following steps:
(1), power on;
(2), principal function by Component Gallery initialization, the initialization of control container pond;
(3), principal function is taken out one group of ID corresponding to main window assembly and puts into control container pond, and showing main window by the first ID read in this group ID in database;
(4), a time period A is set;
(5), timing is started;
(6) if having push button signalling to input in time period A, then step (7) is performed; If do not have push button signalling to input in time period A, then perform step (8);
(7), principal function distributes the event of user's input in main window assembly, by read to should button response function and this group ID in control container pond is operated or transfers other assemblies in Component Gallery, read corresponding data and show corresponding interface, then time period A zero setting is also returned and is performed step (5) by principal function;
(8) if do not have push button signalling to input in time period A, then time period A zero setting is also returned and is performed step (5) by principal function.
Give an example, if when main window shows, when pressing lower key, to the basis enterprising line operate of lower key response function to the first ID of main window assembly that should descend key, namely second ID to one group of ID corresponding to main window assembly is read, and put it in space container pond, at this moment this function reads this ID and shows.Then, operating personnel press cancel key again, then second ID is subtracted one, then become first ID, and now, directly deleted by the ID of second in control container pond, then function reads this ID and shows main interface.
When pressing cryptographic key, to the cryptographic key response function of cryptographic key reading Password Input assembly in database, and read to the first ID of Password Input assembly, namely press key by acquisition in database menu relationship between superior and subordinate table obtain No. ID, the assembly of activation and put it in space container pond, at this moment this function reads this ID and shows.
Described multiple key response functions comprise key response function, lower key response function, left button response function, right button response function, cancel key response function, acknowledgement key response function, timing key response function and display key response function.
Described control container pond comprises 10 storage spaces, each storage space includes 40 bytes, and these 40 byte packet contain ID, method and private data.
Below only just most preferred embodiment of the present invention is described, but can not be interpreted as it is limitations on claims.The present invention is not limited only to above embodiment, and its concrete structure allows to change.In every case the various change done in the protection domain of independent claims of the present invention is all in protection scope of the present invention.