CN104199984B - The method and apparatus that a kind of dynamic for realizing function library is quoted - Google Patents
The method and apparatus that a kind of dynamic for realizing function library is quoted Download PDFInfo
- Publication number
- CN104199984B CN104199984B CN201410503255.XA CN201410503255A CN104199984B CN 104199984 B CN104199984 B CN 104199984B CN 201410503255 A CN201410503255 A CN 201410503255A CN 104199984 B CN104199984 B CN 104199984B
- Authority
- CN
- China
- Prior art keywords
- subfunction
- storehouse
- function
- caller
- subfunction storehouse
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2291—User-Defined Types; Storage management thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/21—Design, administration or maintenance of databases
- G06F16/217—Database tuning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
- G06F16/2379—Updates performed during online database operations; commit processing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/25—Integrating or interfacing systems involving database management systems
- G06F16/254—Extract, transform and load [ETL] procedures, e.g. ETL data flows in data warehouses
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44521—Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Stored Programmes (AREA)
Abstract
This application provides the method and apparatus that a kind of dynamic for realizing function library is quoted, this method includes:Function library is divided at least two subfunction storehouses according to default division rule;At least two subfunctions storehouse and caller are compiled, to generate the adduction relationship between each caller and its each subfunction storehouse quoted respectively.In the embodiment of the present application, the content for compiling and downloading is needed when can reduce Project Configuration to a certain extent, so as to improve configuration efficiency, also accelerates engineering construction process to a certain extent.Also, the function internal logic in function library will not be had an impact when changing to caller, it is not necessary to calling routine recompilation to download, Project Configuration upgrading efficiency of the practice can be so effectively improved in function library escalation process.
Description
Technical field
The application is related to technical field of industrial control, the method and dress that more particularly to a kind of dynamic for realizing function library is quoted
Put.
Background technology
In industrial control system, systemic-function storehouse is completed the functional block and function structure of specific function by some conventional
Into.Such as:It is conventional with functional block or functional block and non-functional piece, the also conventional pid function block of industrial control system, point
Hit control function block etc..Each functional module that function library provides is to form the basis of control logic, uses the function of being provided in storehouse
Facilitate engineering staff's rapidly organizational controls logic.Function library is the basis that engineering staff rapidly and efficiently completes configuration task, real
The dynamic expansion of existing function library and reference, the influence to existing configuration caused by function library change can be reduced to greatest extent,
And the developer of function library can be easy to constantly to develop and adjust function library.
Wherein, function library refers to the set of function, and signified function is:It is relatively independent with caller, realize that some are complete
The code logic block of whole specific function, including functional block, function etc..And caller refer in calling function storehouse some or certain
A little concrete functions go to realize the logical program of particular demands function, including user program, custom feature block, SQL
Deng.
In the prior art, the reference of function library is realized in:Institute of the prior art is functional to concentrate on one
It is in the controller the region of memory of a piece of fixation of function library division, all functional blocks and function are compiled in advance in storehouse in function library
Translate generation absolute entry address., it is necessary to which all information of function library are downloaded when triggering caller first time recited function storehouse
To controller, and solidify in the controller.During function in later caller calling function storehouse, directly it is using absolute address
Can.
The content of the invention
But inventor has found that all system functional blocks and function in the prior art concentrate on one in research process
In individual storehouse, user can not operate to systemic-function storehouse, and in the case where configuration has only used a system functional block or function
It is also required to download whole systemic-function storehouse information.And control system upgrading is when needing to increase new system functional block or function,
It is also required to remodify whole system functional block library and its configuration file, it is necessary to offline when applying to existing live configuration upgrading
Download causes scene parking to influence industrial production.
Technical problems to be solved in this application are to provide a kind of method that dynamic for realizing function library is quoted, to as far as possible
Prior art configuration software at recited function storehouse is avoided to need to download whole systemic-function storehouse information configurations caused by
The problem of less efficient.
Present invention also provides the device that a kind of dynamic for realizing function library is quoted, to ensure the above method in practice
Realization and application.
In order to solve the above problems, this application discloses a kind of method that dynamic for realizing function library is quoted, this method bag
Include:
Function library is divided at least two subfunction storehouses according to default division rule;The subfunction storehouse is to realize one
Or the code logic block of multiple standalone features, including:A internal interface table, a external interface table and a piece of function code
Area;The list item of the internal interface table preserves the external calling interface information of the function in other cited subfunction storehouses, institute
The list item for stating external interface table is the external calling interface information of the function in book function library, and the function code area is used to protect
Deposit subfunction place functional code logic entity;The function library includes:Subfunction storehouse concordance list and subfunction storehouse, it is described
Subfunction storehouse concordance list is used to preserve all effectively mark in subfunction storehouse and addresses in current function library;
Increase, change or delete subfunction storehouse index entry newly in the concordance list of subfunction storehouse, and increase newly, change or delete
Subfunction storehouse corresponding with subfunction storehouse index entry;
At least two subfunctions storehouse and caller are compiled, drawn with generating each caller respectively with it
Adduction relationship between each subfunction storehouse.
Optionally, it is described that at least two subfunctions storehouse and caller are compiled, to generate each tune respectively
With the adduction relationship between program and its each subfunction storehouse quoted, including:
The subfunction storehouse listed in the index entry of the subfunction storehouse is compiled, relocates each subfunction storehouse
The external calling interface information of the function of each list item record in internal interface table and external interface table;
Caller is compiled, to generate the work(in each subfunction storehouse that each caller and its quote respectively
Adduction relationship between energy.
Optionally, the subfunction storehouse listed in the index entry to the subfunction storehouse is compiled, and is relocated described every
The external calling interface information of the function of each list item record in the internal interface table and external interface table of individual sub- function library, bag
Include:
The external interface list item in the subfunction storehouse that the caller calls is determined, so as to described in caller acquisition
The external calling interface information of function in subfunction storehouse, and believed by the external calling interface of the function in the subfunction storehouse
Breath accesses the function in the subfunction storehouse;
The internal interface list item in the subfunction storehouse that the caller calls is determined, is drawn so that subfunction storehouse obtains
The external calling interface information of function in other subfunction storehouses, and pass through pair of the function in other described subfunction storehouses
It is outer to call interface message to access the function in other subfunction storehouses.
Optionally, in addition to:
In response to the request of user's triggering, corresponding caller is triggered according to sub- work(corresponding to corresponding relation reference
Can storehouse.
Present invention also provides the device that a kind of dynamic for realizing function library is quoted, including:
Division module, for function library to be divided into at least two subfunction storehouses according to default division rule;The sub- work(
Energy storehouse is the code logic block for realizing one or more standalone features, including:A internal interface table, a external interface table and
A piece of function code area;The list item of the internal interface table preserves the external calling of the function in other cited subfunction storehouses
Interface message, the list item of the external interface table are the external calling interface information of the function in book function library, the function
Code area is used to preserve subfunction place functional code logic entity;The function library includes:Subfunction storehouse concordance list and
Subfunction storehouse, subfunction storehouse concordance list are used to preserve all effectively mark in subfunction storehouse and addresses in current function library;
Index entry module is updated, for increasing, changing or deleting subfunction storehouse index entry newly in the concordance list of subfunction storehouse;
Subfunction library module is updated, for increasing, changing or deleting sub- work(corresponding with subfunction storehouse index entry newly
Can storehouse;
Collector, for being compiled to the caller at least two subfunctions storehouse and the reference subfunction storehouse
Translate, to generate the adduction relationship between each caller and its each subfunction storehouse quoted respectively.
Optionally, the collector, including:
Subfunction storehouse collector, for being compiled to the subfunction storehouse listed in the index entry of the subfunction storehouse, weight
Position the external calling of the function of each list item record in the internal interface table and external interface table in each subfunction storehouse
Interface message;
Caller collector, for being compiled to caller, drawn with generating each caller respectively with it
The adduction relationship between function in each subfunction storehouse.
Optionally, subfunction storehouse collector includes:
First determination sub-module, the external interface list item in the subfunction storehouse called for determining the caller,
So that caller obtains the external calling interface information of the function in the subfunction storehouse, and by the subfunction storehouse
Function in subfunction storehouse described in the external calling interface message reference of function;
Second determination sub-module, internal interface table in the subfunction storehouse quoted for determining the caller
List item, the external calling interface information of the function in other cited subfunction storehouses is obtained so as to subfunction storehouse, and passes through institute
State the function in other subfunction storehouses of the external calling interface message reference of the function in other subfunction storehouses.
Optionally, in addition to:
Trigger module, for the request triggered in response to user, corresponding caller is triggered according to the corresponding relation
Subfunction storehouse corresponding to reference.
Compared with prior art, the application includes advantages below:
In the embodiment of the present application, by the way that function library to be divided into different subfunction storehouses, it is if being controlled in actual industrial
A sub- function library is only needed to use in system, then configuration software just only needs to compile and the information of one sub- function library of download is
Can, if any system functional block and function need not be used, avoid the need for compiling and download the information in any systemic-function storehouse.Cause
This, the embodiment of the present application reduces compiling and downloads content to a certain extent, so as to improve configuration efficiency, also in certain journey
Engineering construction process is accelerated on degree.Also, the function internal logic in function library will not produce when changing to caller
Influence, it is not necessary to calling routine recompilation to download, it is real that configuration upgrading can be so effectively improved in function library escalation process
Apply efficiency.
Further, when the code logic of subfunction storehouse neutron function changes, internal interface table and external interface
Table need not all be changed, and user program is to the calling of function in sub- function library also without change.
Further, because the extension in the application to function library and reference are in units of subfunction storehouse, on the one hand cause
Call subfunction storehouse and called subfunction storehouse relatively independent, the change in called subfunction storehouse is to calling subfunction storehouse not produce
Influence, on the other hand make it that caller and called subfunction storehouse are relatively independent, and increase and change subfunction storehouse to not
The caller being related to does not have any influence.This also causes the extension of function library and part to change very convenient, safety and practicality.
Further, during control system use, if the subfunction storehouse that increase is new, it is not necessary to existing subfunction storehouse
Do any change, it is only necessary to new subfunction storehouse is provided and can be achieved.If existing scene operation configuration is not required in escalation process
Increase the use to new subfunction storehouse, then the system upgrade situation for increasing subfunction storehouse would not be to the stable journey in scene
Sort run and production control produce any disturbance.Also, what's new, adjustment function code, deletion do not make in subfunction storehouse
The function of using will not have an impact to existing caller, so as to the side that ensure that the extension of function library and locally change
Just, safety and practicality.
Certainly, any product for implementing the application it is not absolutely required to reach all the above advantage simultaneously.
Brief description of the drawings
In order to illustrate more clearly of the technical scheme in the embodiment of the present application, make required in being described below to embodiment
Accompanying drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the present application, for
For those of ordinary skill in the art, without having to pay creative labor, it can also be obtained according to these accompanying drawings
His accompanying drawing.
Fig. 1 is the basic structure schematic diagram of the application neutron function library;
Fig. 2 is the flow chart that the embodiment of the method that the dynamic of function library is quoted is realized in the application;
Fig. 3 is the schematic diagram that subfunction storehouse index relative is established in the application;
Fig. 4 is to realize that caller quotes the inside work(in subfunction storehouse by the external interface in subfunction storehouse in the application
The schematic diagram of energy;
Fig. 5 is the schematic diagram for realizing funcall between subfunction storehouse in the application by internal interface table;
Fig. 6 is the structural representation for the device embodiment that the dynamic for realizing function library of the application is quoted.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present application, the technical scheme in the embodiment of the present application is carried out clear, complete
Site preparation describes, it is clear that described embodiment is only some embodiments of the present application, rather than whole embodiments.It is based on
Embodiment in the application, those of ordinary skill in the art are obtained every other under the premise of creative work is not made
Embodiment, belong to the scope of the application protection.
In the embodiment of the present application, it is necessary to which function library is divided into at least two subfunctions according to default division rule in advance
Storehouse, such as function library is divided with reference to industry control industry primary demand and user's specific demand etc., i.e., function library is divided into
Some independent subfunction storehouses, and the exploitation of function library and management are in units of subfunction storehouse.Wherein, subfunction storehouse specifically can be with
Including:A internal interface table, a external interface table and a piece of function code area.The internal interface list item of internal interface table is protected
The external calling interface information of cited external function is deposited, the external interface list item of the external interface table is built-in function
External calling interface information, the function code area are used to preserve subfunction place functional code logic entity.
It is the basic composition schematic diagram of the application neutron function library with reference to shown in figure 1.Wherein, each original subfunction storehouse
Including at least a internal interface table, a external interface table and a piece of function code area.In internal interface table, each inside connects
Oral thermometer item registers the external calling interface information of cited external function.When generating original subfunction storehouse by each internal work(
All external functions cited in energy are registered in the internal interface table, and establish built-in function and these internal interface list items
Adduction relationship, so that built-in function passes through these internal interface list item dereference external functions.In external interface table, each
External calling interface of the external interface list item as built-in function, is associated with built-in function one by one.Caller can only pass through
These external interface list items are called to access built-in function.Function code area:Current subfunction place functional code is deposited to patrol
Collect entity.
Wherein, the internal interface table in subfunction storehouse can directly deposit other word banks or the system that current subfunction storehouse is called
The external calling interface address of the function of offer.External interface table, which then houses, jumps to institute's functional in current subfunction storehouse
The jump instruction of code entry address.In original subfunction storehouse, the external calling interface of external function in internal interface table
Location is address blank, and the entry address deposited in external interface table is relative address of the function in book function library.
It is a kind of flow chart of the embodiment of the method for dynamic reference for realizing function library of the application with reference to shown in figure 2, this
Embodiment can specifically include:
Step 201:Function library is divided at least two subfunction storehouses according to default division rule.
Function library is divided at least two subfunction storehouses according to default division rule first, specifically may be referred to Fig. 1 institutes
Show.The subfunction storehouse is the code logic block for realizing one or more standalone features, and the subfunction storehouse can for example include:It is a
Internal interface table, a external interface table and a piece of function code area;The list item of the internal interface table preserves cited its
The external calling interface information of function in his subfunction storehouse, the list item of the external interface table are the function in book function library
External calling interface information, the function code area be used for preserve subfunction place functional code logic entity.
In the embodiment of the present application, function library can include:Subfunction storehouse concordance list and subfunction storehouse, the subfunction storehouse rope
Draw table and be used to preserve all effectively mark in subfunction storehouse and addresses in current function library, so can by subfunction storehouse concordance list
To realize record and the management to sub- function library.
Step 202:Increase, change or delete subfunction storehouse index entry newly in the concordance list of subfunction storehouse, and increase newly, change
Or delete subfunction storehouse corresponding with subfunction storehouse index entry.
It is the schematic diagram that subfunction storehouse index relative is established in the application with reference to shown in figure 3.For newly-increased subfunction
Storehouse, first, corresponding index entry is distributed in function library concordance list, the subfunction storehouse for only having manipulative indexing item in concordance list
It is only effectively, and allows cited in called program.Then, original subfunction storehouse is added to storage subfunction base area
Clear area.For the subfunction storehouse of renewal, such as Fig. 3, first, corresponding index entry is updated in function library concordance list, then,
By the original subfunction storehouse renewal after renewal to the relevant position of subfunction base area.And for deleting subfunction storehouse, then need
Corresponding index entry, while the corresponding subfunction storehouse for deleting storage in subfunction base area are deleted in function library concordance list.
In the embodiment of the present application, for addition subfunction storehouse, a subfunction is applied in function library concordance list
After storehouse index entry and space-consuming, the storehouse information in the subfunction storehouse is registered in the index entry of subfunction storehouse, subfunction can be included
Library name, ID, in the occupancy address of subfunction base area and length etc..After applying successfully, the correspondence in subfunction base area
Add the original subfunction storehouse in position.And for renewal subfunction storehouse, in function library concordance list corresponding to inquiry
Index entry, and update the storehouse information in the subfunction storehouse.If the length in the subfunction storehouse, need to apply taking sky again
Between, and index entry corresponding to renewal.If the length in the subfunction storehouse shortens, keep the base address in the subfunction storehouse constant,
And its space-consuming is reduced, update index entry corresponding to the subfunction storehouse.
Step 203:The subfunction storehouse listed in the index entry of the subfunction storehouse is compiled, relocated described per height
The external calling interface information of the function of each list item record in the internal interface table and external interface table of function library.
After each addition, renewal or deleting subfunction storehouse, by the external calling interface of cited function truly
Location is stored in the internal interface table, so as to establish the adduction relationship of built-in function and external function.Also, in external interface table
In also the external calling interface of these functions is relocated.That is, list item in the internal interface table in subfunction storehouse is relocated
The external calling interface information of the function of each list item record in content and external interface table.In the implementation process of this step,
Specific compilation process can include:
Step A1:The external interface list item in the subfunction storehouse that the caller calls is determined, so as to caller
The external calling interface information of the function in the subfunction storehouse is obtained, and by the function in the subfunction storehouse to transfering to other localities
The function in the subfunction storehouse is accessed with interface message.
In original subfunction storehouse, external interface table registers the entrance jump instruction of built-in function.With reference to shown in figure 4,
To realize that caller quotes the schematic diagram of built-in function by the external interface in subfunction storehouse in the application.Assuming that function A1 exists
Entrance relative address in the A of subfunction storehouse is 0x1000, at this moment external interface list item W1 content for " JUMP TO 0x1000 ",
Represent to jump at relative address 0x1000.
Specifically when relocating external interface table, according to absolute base of the current subfunction storehouse in subfunction base area
Location, the entrance relative address in each external interface list item is changed to absolute address.Referring again to shown in Fig. 4, it is assumed that external interface table
Item W1 content is " JUMP TO 0x1000 ", subfunction storehouse A absolute base address are 0x10000, then W1 content is changed to
“JUMP TO 0x11000”。
It should be noted that caller is when subfunction storehouse is quoted, if because the renewal of subfunction storehouse causes work(
It can be changed in the position in external interface table, then need to update the adduction relationship of all called programs, caller leads to
Corresponding function can be called by crossing access external interface list item, and the reference that otherwise need not change caller and subfunction storehouse is closed
System.Referring again to shown in Fig. 4, if caller needs to call A1, external interface list item W1 only need to be accessed, so as to jump to indirectly
Function A1 absolute entry address, so as to realize the reference to A1.If because the renewal in subfunction storehouse causes function in outside
Position in interface table changes, then needs to update the adduction relationship of all related callers, but is not required to the non-shadow of modification
Loud caller.Assuming that modification renewal occurs for subfunction storehouse A, function A1 external interface list item moves on to W2 from W1, then called
Program should access external interface list item W2 to quote A1.
Step A2:The list item of the internal interface table in the subfunction storehouse cited in the caller is determined, so as to son
Function library obtains the external calling interface information of the function in other cited subfunction storehouses, and passes through other described subfunctions
The function in other subfunction storehouses of the external calling interface message reference of function in storehouse.
In subfunction storehouse, the external calling interface that obtains the function in other subfunction storehouses by accessing internal interface table
Location, so as to dereference external function.With reference to shown in figure 5, be the application in by internal interface realize subfunction storehouse between adjust
Schematic diagram.Need to access external function B1 in subfunction storehouse A function A1, B1 is registered in internal interface list item N1
In, function 1 calls B1 indirectly by accessing N1.The adduction relationship with B1 is not yet established in original subfunction storehouse, N1 value is
It is empty.
, can be successively according to the outside registered in the internal interface table in subfunction storehouse specifically when relocating internal interface table
Function, the true address of the external call interface of external function corresponding to searching from current subfunction base area, and fill in
Into internal interface table.Referring again to shown in Fig. 5, it is assumed that external function B1 actual calling interface address is 0x20100, then interior
Portion interface entry N1 content is changed to 0x20100.
It is understood that in the case where external interface list item changes corresponding to current subfunction, in the application
, it is necessary to which the external interface list item after change is defined as into caller quotes current subfunction storehouse to realize current son in embodiment
The calling interface of function.
Step 204:Caller is compiled, to generate each subfunction that each caller and its are quoted respectively
The adduction relationship between function in storehouse.
Caller is compiled again after being finished to the compiling of sub- function library, drawn so as to generate each caller with it
The adduction relationship between function in each subfunction storehouse.
It can be seen that in the embodiment of the present application, by the way that function library to be divided into different subfunction storehouses, so as to by subfunction storehouse
The object quoted as caller, if only needing to use a sub- function library in industrial control system, then configuration software
Just only need compiling and download the information of a sub- function library, if any system functional block and function need not be used, just
It need not compile and download the information in any systemic-function storehouse.Therefore, the embodiment of the present application reduces compiling to a certain extent
With download content, so as to improve configuration efficiency, engineering construction process is also accelerated to a certain extent.Also, in function library
In function internal logic modification when caller will not be had an impact, it is not necessary to call routine recompilation download, this
Sample can also improve Project Configuration efficiency.
Further, because the extension in the application to function library and reference are in units of subfunction storehouse, on the one hand cause
Call subfunction storehouse and called subfunction storehouse relatively independent, the change in called subfunction storehouse is to calling subfunction storehouse not produce
Influence, on the other hand make it that caller and called subfunction storehouse are relatively independent, and increase and change subfunction storehouse to not
The caller being related to does not have any influence.This also causes the extension of function library and part to change very convenient, safety and practicality.
It can be seen that in the embodiment of the present application, during control system use, if the subfunction storehouse that increase is new, it is not necessary to
Any change is done to existing subfunction storehouse, it is only necessary to new subfunction storehouse is provided and can be achieved.If existing scene operation configuration exists
The use to new subfunction storehouse need not be increased in escalation process, then the system upgrade situation for increasing subfunction storehouse would not be right
The stable program operation in scene and production control produce any disturbance.Also, what's new, adjustment function in subfunction storehouse
The function that code, deletion are not used will not have an impact to existing caller, so as to ensure that the extension of function library
Convenience, safety and the practicality locally changed.
With the development of computer technology, the communication technology and control technology, traditional industrial control field just experiencings one
The unprecedented change in field, starts to develop to networking direction.In industrial control system, controller can be by performing calculating
Machine program realizes the use to all parts in industrial control system or setting.
If user triggers some request in actual applications, for example, being closed by performing corresponding caller
Valve etc..When user's trigger request, controller determines call corresponding with current request firstly the need of foundation current request
Program.Such as when user asks to close valve, it is determined that go out the caller of the corresponding function of realizing and close valve, triggering is closed
The caller of valve closing door is according to the function in subfunction storehouse corresponding to the corresponding relation calling determined.In practical application
In, function caller as corresponding to performing the controller in industrial control system of each request is realized, and caller institute
Function in the subfunction storehouse of reference is provided by each subfunction storehouse.
For foregoing embodiment of the method, in order to be briefly described, therefore it is all expressed as to a series of combination of actions, still
Those skilled in the art should know that the application is not limited by described sequence of movement, because according to the application, it is some
Step can use other orders or carry out simultaneously.Secondly, those skilled in the art should also know, described in the specification
Embodiment belong to preferred embodiment, necessary to involved action and module not necessarily the application.
It is corresponding with the method that a kind of embodiment of the method based on function library response user's request of above-mentioned the application is provided,
Referring to Fig. 6, present invention also provides a kind of dynamic of function library to quote device embodiment, and in the present embodiment, the device can be with
Including:
Division module 601, for function library to be divided into at least two subfunction storehouses according to default division rule;The son
Function library is to realize the code logic block of one or more standalone features, including:A internal interface table, a external interface table
With a piece of function code area;The list item of the internal interface table preserve the function in other cited subfunction storehouses to transfering to other localities
With interface message, the list item of the external interface table is the external calling interface information of the function in book function library, the work(
Energy code area is used to preserve subfunction place functional code logic entity;The function library includes:Subfunction storehouse concordance list
With subfunction storehouse, subfunction storehouse concordance list is used to preserve the mark and ground in all effectively subfunction storehouses in current function library
Location;
Index entry module 602 is updated, for increasing, changing or deleting subfunction storehouse index newly in the concordance list of subfunction storehouse
.
Subfunction library module 603 is updated, for increasing, changing or deleting son corresponding with subfunction storehouse index entry newly
Function library.
Collector 604, for being compiled at least two subfunctions storehouse, to generate each caller respectively
Adduction relationship between each subfunction storehouse quoted with it.Wherein, the collector 604, can specifically include:
Subfunction storehouse collector, for being compiled to the subfunction storehouse listed in the index entry of the subfunction storehouse, weight
Position the external calling of the function of each list item record in the internal interface table and external interface table in each subfunction storehouse
Interface message;
Caller collector, for being compiled to caller, drawn with generating each caller respectively with it
The adduction relationship between function in each subfunction storehouse.
Wherein, subfunction storehouse collector specifically includes:
First determination sub-module, the external interface list item in the subfunction storehouse called for determining the caller,
So that caller obtains the external calling interface information of the function in the subfunction storehouse, and by the subfunction storehouse
Function in subfunction storehouse described in the external calling interface message reference of function;And second determination sub-module, for determining
State the list item of internal interface table when caller accesses the function in the subfunction storehouse, so as to subfunction storehouse obtain it is cited
The external calling interface information of function in other subfunction storehouses, and by the function in other described subfunction storehouses to transfering to other localities
The function in other subfunction storehouses is accessed with interface message.
Optionally, in various embodiments, the device can also include:
Trigger module, for the request triggered in response to user, corresponding caller is triggered according to the corresponding relation
Subfunction storehouse corresponding to reference.
It can be seen that in the embodiment of the present application, during control system use, if the subfunction storehouse that increase is new, it is not necessary to
Any change is done to existing subfunction storehouse, it is only necessary to new subfunction storehouse is provided and can be achieved.If existing scene operation configuration exists
The use to new subfunction storehouse need not be increased in escalation process, then the system upgrade situation for increasing subfunction storehouse would not be right
The stable program operation in scene and production control produce any disturbance.Also, what's new, adjustment function in subfunction storehouse
The function that code, deletion are not used will not have an impact to existing caller, so as to ensure that the extension of function library
Convenience, safety and the practicality locally changed.
It should be noted that each embodiment in this specification is described by the way of progressive, each embodiment weight
Point explanation is all difference with other embodiment, between each embodiment identical similar part mutually referring to.
For device class embodiment, because it is substantially similar to embodiment of the method, so description is fairly simple, related part is joined
See the part explanation of embodiment of the method.
Finally, it is to be noted that, herein, such as first and second or the like relational terms be used merely to by
One entity or operation make a distinction with another entity or operation, and not necessarily require or imply these entities or operation
Between any this actual relation or order be present.Moreover, term " comprising ", "comprising" or its any other variant meaning
Covering including for nonexcludability, so that process, method, article or equipment including a series of elements not only include that
A little key elements, but also the other element including being not expressly set out, or also include for this process, method, article or
The intrinsic key element of equipment.In the absence of more restrictions, the key element limited by sentence "including a ...", is not arranged
Except other identical element in the process including the key element, method, article or equipment being also present.
The method and apparatus quoted above to the dynamic for realizing function library provided herein are described in detail, this
Apply specific case in text to be set forth the principle and embodiment of the application, the explanation of above example is only intended to
Help understands the present processes and its core concept;Meanwhile for those of ordinary skill in the art, the think of according to the application
Think, in specific embodiments and applications there will be changes, in summary, this specification content should not be construed as pair
The limitation of the application.
Claims (6)
1. a kind of method that dynamic for realizing function library is quoted, it is characterised in that this method includes:
Function library is divided at least two independent subfunction storehouses according to default division rule;The subfunction storehouse is to realize one
The code logic block of individual or multiple standalone features, including:A internal interface table, a external interface table and a piece of function code
Area;The list item of the internal interface table preserves the external calling interface information of the function in other cited subfunction storehouses, institute
The list item for stating external interface table is the external calling interface information of the function in book function library, and the function code area is used to protect
Deposit subfunction place functional code logic entity;The function library includes:Subfunction storehouse concordance list and subfunction storehouse, it is described
Subfunction storehouse concordance list is used to preserve all effectively mark in subfunction storehouse and addresses in current function library;
Increased newly in the concordance list of subfunction storehouse, change or delete subfunction storehouse index entry, and increased newly, change or delete and institute
State subfunction storehouse corresponding to the index entry of subfunction storehouse;
At least two subfunctions storehouse and caller are compiled, quoted with to generate each caller and its respectively
Adduction relationship between each subfunction storehouse;It is described that at least two subfunctions storehouse and caller are compiled, to divide
The adduction relationship between each caller and its each subfunction storehouse quoted is not generated, including:To subfunction storehouse rope
Draw the subfunction storehouse listed in item to be compiled, in the internal interface table and external interface table that relocate each subfunction storehouse
Each list item record function external calling interface information;Caller is compiled, to generate each calling respectively
The adduction relationship between function in program and its each subfunction storehouse quoted.
2. according to the method for claim 1, it is characterised in that the sub- work(listed in the index entry to the subfunction storehouse
Energy storehouse is compiled, and relocates what each list item in the internal interface table and external interface table in each subfunction storehouse recorded
The external calling interface information of function, including:
The external interface list item in the subfunction storehouse that the caller calls is determined, so that caller obtains the sub- work(
The external calling interface information of function in energy storehouse, and the external calling interface information for passing through the function in the subfunction storehouse is visited
Ask the function in the subfunction storehouse;
Determine the internal interface list item in the subfunction storehouse that the caller calls, so as to subfunction storehouse obtain it is cited
The external calling interface information of function in other subfunction storehouses, and by the function in other described subfunction storehouses to transfering to other localities
The function in other subfunction storehouses is accessed with interface message.
3. according to the method described in any one of claim 1~2, it is characterised in that also include:
In response to the request of user's triggering, corresponding caller is triggered according to subfunction corresponding to adduction relationship reference
Storehouse.
A kind of 4. device that dynamic for realizing function library is quoted, it is characterised in that including:
Division module, for function library to be divided into at least two independent subfunction storehouses according to default division rule;The son
Function library is to realize the code logic block of one or more standalone features, including:A internal interface table, a external interface table
With a piece of function code area;The list item of the internal interface table preserve the function in other cited subfunction storehouses to transfering to other localities
With interface message, the list item of the external interface table is the external calling interface information of the function in book function library, the work(
Energy code area is used to preserve subfunction place functional code logic entity;The function library includes:Subfunction storehouse concordance list
With subfunction storehouse, subfunction storehouse concordance list is used to preserve the mark and ground in all effectively subfunction storehouses in current function library
Location;
Index entry module is updated, for increasing, changing or deleting subfunction storehouse index entry newly in the concordance list of subfunction storehouse;
Subfunction library module is updated, for increasing, changing or deleting subfunction storehouse corresponding with subfunction storehouse index entry newly;
Collector, for being compiled to the caller at least two subfunctions storehouse and the reference subfunction storehouse,
To generate the adduction relationship between each caller and its each subfunction storehouse quoted respectively;The collector, including:
Subfunction storehouse collector, for being compiled to the subfunction storehouse listed in the index entry of the subfunction storehouse, described in reorientation
The external calling interface information of the function of each list item record in the internal interface table and external interface table in each subfunction storehouse;
Caller collector, for being compiled to caller, with generate respectively each caller and its quote it is each
The adduction relationship between function in subfunction storehouse.
5. device according to claim 4, it is characterised in that subfunction storehouse collector includes:
First determination sub-module, the external interface list item in the subfunction storehouse called for determining the caller, so as to
Caller obtains the external calling interface information of the function in the subfunction storehouse, and passes through the function in the subfunction storehouse
External calling interface message reference described in function in subfunction storehouse;
Second determination sub-module, the table of the internal interface table in the subfunction storehouse for determining the caller reference
, so as to the external calling interface information of the function in other cited subfunction storehouses of subfunction storehouse acquisition, and by described
The function in other subfunction storehouses of the external calling interface message reference of function in other subfunction storehouses.
6. according to the device described in any one of claim 4~5, it is characterised in that also include:
Trigger module, for the request triggered in response to user, trigger corresponding caller and quoted according to the adduction relationship
Corresponding subfunction storehouse.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410503255.XA CN104199984B (en) | 2014-09-26 | 2014-09-26 | The method and apparatus that a kind of dynamic for realizing function library is quoted |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410503255.XA CN104199984B (en) | 2014-09-26 | 2014-09-26 | The method and apparatus that a kind of dynamic for realizing function library is quoted |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104199984A CN104199984A (en) | 2014-12-10 |
CN104199984B true CN104199984B (en) | 2018-01-12 |
Family
ID=52085277
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410503255.XA Active CN104199984B (en) | 2014-09-26 | 2014-09-26 | The method and apparatus that a kind of dynamic for realizing function library is quoted |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104199984B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106959848A (en) * | 2017-02-21 | 2017-07-18 | 成都景中教育软件有限公司 | A kind of open interface implementation method based on dynamic geometry |
CN113608495B (en) * | 2021-08-08 | 2022-09-30 | 上海领霄科技有限公司 | Programmable logic control implementation method |
CN116136770B (en) * | 2023-04-20 | 2023-06-23 | 烟台东方威思顿电气有限公司 | Singlechip program upgrading method based on module |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101620536A (en) * | 2009-08-17 | 2010-01-06 | 用友软件股份有限公司 | Method and device for invoking performance function |
CN101662760A (en) * | 2009-07-31 | 2010-03-03 | 中兴通讯股份有限公司 | Method and system for backing up terminal data |
CN102023843A (en) * | 2010-11-24 | 2011-04-20 | 北京握奇数据系统有限公司 | Function calling method and device as well as smart card |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
SE470545B (en) * | 1992-11-26 | 1994-07-25 | Ellemtel Utvecklings Ab | Modular system of sub-functions |
US7908603B2 (en) * | 2004-01-29 | 2011-03-15 | Klingman Edwin E | Intelligent memory with multitask controller and memory partitions storing task state information for processing tasks interfaced from host processor |
CN103019663B (en) * | 2011-09-26 | 2017-03-15 | 中兴通讯股份有限公司 | The method and system of intermodule function interface in a kind of acquisition program |
-
2014
- 2014-09-26 CN CN201410503255.XA patent/CN104199984B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101662760A (en) * | 2009-07-31 | 2010-03-03 | 中兴通讯股份有限公司 | Method and system for backing up terminal data |
CN101620536A (en) * | 2009-08-17 | 2010-01-06 | 用友软件股份有限公司 | Method and device for invoking performance function |
CN102023843A (en) * | 2010-11-24 | 2011-04-20 | 北京握奇数据系统有限公司 | Function calling method and device as well as smart card |
Also Published As
Publication number | Publication date |
---|---|
CN104199984A (en) | 2014-12-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101318313B1 (en) | Method for dynamically linking program on embedded platform and a computer readable storage medium recording an embedded platform | |
US11023443B2 (en) | Collaborative planning for accelerating analytic queries | |
CN107533518A (en) | Distributed index for fault tolerant object memory construction | |
CN103631601A (en) | Code generation method and code generation device | |
CN104199984B (en) | The method and apparatus that a kind of dynamic for realizing function library is quoted | |
CN103809975B (en) | The implementation method of intelligent cloud list | |
JP6345873B2 (en) | Method and apparatus for building a demand metamodel for high-speed trains | |
CN109408699B (en) | Method for realizing rapid retrieval of tree nodes by synchronous cache zTree | |
CN103942281A (en) | Method and device for operating object persistently stored | |
CN103838572A (en) | System and method for packing Android SDK | |
CN101329686A (en) | System for implementing network search caching and search method | |
Claßen et al. | Platas—integrating planning and the action language Golog | |
CN109299172A (en) | It is a kind of based on Spring Boot varying environment data source cut-in method and device | |
CN104598550A (en) | Network video index updating method and device | |
CN104809231A (en) | Mass web data mining method based on Hadoop | |
CN103984554B (en) | The generation method and device of Software for Design document | |
CN103678577A (en) | Method and device for updating data | |
CN101419544A (en) | Program code automatic generator of computer | |
US9778918B2 (en) | Native access plan source code generation | |
CN102004800A (en) | Data query method and device of PDM (Product Data Management) system | |
CN103077273A (en) | Interactive design system and method constructed on network electronic map for on-line route selection of engineering | |
CN104615668A (en) | Game manager instruction management platform | |
CN202771416U (en) | Visual three-dimensional (3D) programming device | |
CN105550263A (en) | Assignment method and device in object-relational mapping | |
CN103677747A (en) | Display control software track information processing method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |