CN103677835B - Software integration method and system - Google Patents

Software integration method and system Download PDF

Info

Publication number
CN103677835B
CN103677835B CN201310689788.7A CN201310689788A CN103677835B CN 103677835 B CN103677835 B CN 103677835B CN 201310689788 A CN201310689788 A CN 201310689788A CN 103677835 B CN103677835 B CN 103677835B
Authority
CN
China
Prior art keywords
module
code
software
file
function
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201310689788.7A
Other languages
Chinese (zh)
Other versions
CN103677835A (en
Inventor
应素云
陈昆盛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingwei Hirain Tech Co Ltd
Original Assignee
Beijing Jingwei Hirain Tech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingwei Hirain Tech Co Ltd filed Critical Beijing Jingwei Hirain Tech Co Ltd
Priority to CN201310689788.7A priority Critical patent/CN103677835B/en
Publication of CN103677835A publication Critical patent/CN103677835A/en
Application granted granted Critical
Publication of CN103677835B publication Critical patent/CN103677835B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention discloses a software integration method and system. The software integration method includes the steps that at least one pre-selected basic software function module is connected to the corresponding position of an application software model, and then a controller software model is generated; inputted functional configuration parameters are received, after code generation commands are received, configuration files, application software source codes and calling codes are generated, wherein the calling codes correspond to the basic software function modules and used for calling corresponding basic software codes, the calling codes of the basic software function modules are added to the corresponding positions of the application software source codes, and then application software primary codes are acquired; then, a compiler is called, and the application software primary codes, the basic software codes and the configuration files corresponding to basic software are added to the compiler; the compiler is controlled to compile the source codes in the compiler, and then object files are generated. According to the software integration method and system, automatic integration of software is achieved, the integration difficulty of the software is lowered, and workloads are reduced.

Description

Software integrating method and system
Technical field
The application is related to the integrated method of automotive engineering field controller software, more particularly to a kind of application software and base The integrated approach and system of plinth software.
Background technology
In automotive engineering field, controller software generally includes application software and basic software, and application software and basis Software is typically stand-alone development, therefore, in controller development process, need to carry out application software and basic software integrated Controller software could be formed, will application software code and basic software code it is integrated, to form control software code.
At present, application software often builds application software model realization by user in the Simulink components of MATLAB, The department pattern can be by Simulink Coder automatic code generatings, and the basic software such as bottom layer driving, communication protocol stack is logical The hand-written code for often providing for software vendor, therefore, in controller development process, user is needed by Simulink Coder The code of generation is carried out integrated, traditional Integrated Simulation with the hand-written code of basic software and is collected using manual mode by user Into specially:
The application software code that Simulink Coder are generated is copied under engineered paths;
By under the hand-written Code copying of basic software to the engineered paths, and find parameter corresponding with basic software and match somebody with somebody File is put, corresponding parameter is changed in parameter configuration files.
Compiler is opened, above-mentioned two parts code is added in compiler;
In application software code, finding needs the position for calling basic software, writes for calling basis in the position Software calls code;
Click starts compiling button and the code in compiler is compiled, and generates file destination.
As the code that MATLAB is generated has a very big redundancy, therefore which is readable poor, and basic software framework is increasingly in addition It is complicated so that the integrated difficulty of traditional-handwork is high, and workload is big.
The content of the invention
To solve above-mentioned technical problem, the embodiment of the present application provides a kind of software integrating method and system, to reduce software Integrated difficulty, reduces the workload of Integrated Simulation.
Technical scheme is as follows:
A kind of software integrating method, including:
At least one basic software function module being pre-selected is connected to into application software according to the link order for receiving The relevant position of model, generates controller software model;
The functional configuration parameter of receives input, functional parameter of the functional configuration parameter at least including basic software;
Receive code building instruction;
The configuration file corresponding with each basic software is generated according to the functional configuration parameter;
Generate the application software source code of the application software model;
It is corresponding with each basic software function module according to the generation of default control logic, for calling corresponding base Plinth software code calls code;
Determine that each calls code in the application according to the default application logic corresponding with controller software Position in software source code;
Code is called to add to the relevant position of the application software source code described each, the software that is applied is primary Code;
Compiler is called, it is by the application software elementary code, each basic software code and described with each basis The corresponding configuration file of software adds into the compiler;
Control the compiler to be compiled the code in the compiler, generate file destination;
Wherein, the source code product process of the basic software function module includes:
The source file of s-function modules is write under Simulink environment;
Source file is converted to the file that can be run under MATLAB environment;
Write module TLC file;
The relevant parameter of allocation models file;
The button for generating code is clicked in model file, generation model describes file;
File is described based on model, under Target Language Compiler instruments, by execution system TLC file With module TLC file, the source code of basic software module is generated.
Said method, it is preferred that the basic software function module includes interface function module and/or call back function mould Block.
Said method, it is preferred that when the basic software function module is call back function module, the functional configuration ginseng Number also includes:Call back function number and call back function title;
After code building instruction is received, also include before calling compiler:
Call back function module pair corresponding with the call back function number is generated, the call back function module is to including function Name module and function content module, the title of the function name module are determined according to the call back function title;
Determine the call back function model that user is built in each function content module;
Generate the source code of each call back function model;
Also include after compiler is called:
The source code of each call back function model is added into the compiler.
Said method, it is preferred that the application software source code of the generation application software model includes:
First code Core Generator is called to generate the application software source code of the application software model.
Said method, it is preferred that described relative with each basic software function module according to the generation of default control logic Answer, the code that calls for calling corresponding basic software code includes:
Call second code Core Generator generate call each basic software function module call code.
A kind of integrated software system, including:
Link block, for connecting at least one basic software function module being pre-selected according to the link order for receiving It is connected to the relevant position of application software model;The basic software function module is the basis that source code is determined by following flow process Software function module:The source file of s-function modules is write under Simulink environment;Source file is converted to can be The file run under MATLAB environment;Write module TLC file;The relevant parameter of allocation models file;At model file midpoint The button for generating code is hit, generation model describes file;File is described based on model, in Target Language Compiler Under instrument, by execution system TLC file and module TLC file, the source code of basic software module is generated;
First receiver module, for the functional configuration parameter of receives input, the functional configuration parameter at least includes basis The functional parameter of software;
Second receiver module, for receiving code building instruction;
Parameter configuration module, for generating the configuration text corresponding with each basic software according to the functional configuration parameter Part;
First generation module, for, after second receiver module receives code building instruction, generating described using soft The application software source code of part model;
Second generation module, for after second receiver module receives code building instruction, according to default control Logic generates corresponding with each basic software function module, calls generation for call corresponding basic software source code Code;
First determining module, for determining each tune according to the default application logic corresponding with controller software With position of the code in the application software source code;
Add module, for calling code to add to the relevant position of the application software source code described each, obtains To application software elementary code;
Calling module, for calling compiler, by the application software elementary code, each basic software source code, with And the configuration file corresponding with each basic software adds into the compiler;
Control module, is compiled to the code in the compiler for controlling the compiler, generates file destination.
Said system, it is preferred that the basic software function module includes interface function module and/or call back function mould Block.
Said system, it is preferred that when the basic software function module is call back function module, described first receives mould The functional configuration parameter that block is received also includes:Call back function number and call back function title;
The system also includes:
3rd generation module, for, after second receiver module receives code building instruction, generating and the readjustment The corresponding call back function module pair of function number, the call back function module to including function name module and function content module, The title of the function name module is determined according to the call back function title;
Second determining module, for determining call back function model that user is built in each function content module;
4th generation module, for generating the source code of each call back function model;
The calling module is additionally operable to, and the source code of each call back function model is added into the compiler.
Said system, it is preferred that first generation module generates the application by calling first code Core Generator The application software source code of software model.
Said system, it is preferred that second generation module calls each basis by calling second code Core Generator Software function module calls code.
The technical scheme provided from above the embodiment of the present application, a kind of software integrating method and be that the application is provided System, by the relevant position that be pre-selected at least one basic software function module is connected to application software model, generates Controller software model;And the functional configuration parameter of receives input, after code building instruction is received, configuration file is generated, should It is with the source code of software and corresponding with each basic software function module, for calling corresponding basic software code Call code, and determine that each calls code described according to the default application logic corresponding with controller software Position in application software source code;Call code to add to the relevant position of the application software source code each, obtain Application software elementary code;Then compiler will be called, by the application software elementary code, each basic software code, with And the configuration file corresponding with each basic software adds into the compiler;The compiler is controlled to the volume The code translated in device is compiled, and generates file destination.
It follows that in the embodiment of the present application, it is only necessary to which user builds controller software model configuration feature parameter, so The button for clicking on generation code afterwards is capable of achieving the integrated of software, searches without user and call in the code of application software The position of code, is also not required to user and fills in manually call code, it is not required that code is added compiler by user, realizes software Be automatically integrating, reduce Integrated Simulation difficulty, reduce workload.
Description of the drawings
For the technical scheme being illustrated more clearly that in the embodiment of the present application, below will be to embodiment or description of the prior art Needed for accompanying drawing to be used be briefly described, it should be apparent that, drawings in the following description be only the application described in Some embodiments, for those of ordinary skill in the art, on the premise of not paying creative work, can be with basis These accompanying drawings obtain other accompanying drawings.
The flow chart of the generation source code of the basic software function module that Fig. 1 is provided for the embodiment of the present application;
A kind of flow chart of software integrating method that Fig. 2 is provided for the embodiment of the present application;
The triggering CanWrite modules that Fig. 3 is arranged in state machine for the user that the embodiment of the present application is provided
The schematic diagram of control logic;
The flow chart of the source code of the generation call back function model that Fig. 4 is provided for the embodiment of the present application;
A kind of structural representation of integrated software system that Fig. 5 is provided for the embodiment of the present application;
The structural representation of another kind of integrated software system that Fig. 6 is provided for the embodiment of the present application.
For simplicity and clarity of illustration, the figures above shows the common form of structure, and in order to avoid unnecessary The fuzzy present invention, it is convenient to omit the description of known features and technology and details.In addition, unit in accompanying drawing it is unnecessary according to than Example is drawn.For example, can be relative to the size of some units in other unit enlarged drawings, so as to help be better understood from this Bright embodiment.Identical label in different accompanying drawings represents identical unit.
Term " first ", " second ", " the 3rd " " the 4th " in specification and claims and above-mentioned accompanying drawing etc. (if Exist) it is for distinguishing similar unit or process, without being used to describe specific order or precedence.It should be appreciated that this The data that sample is used can be exchanged in the appropriate case, so as to embodiments of the invention described herein for example can with except Here the order beyond those that is illustrating or otherwise describing is implemented.Additionally, term " comprising " and " having " and they appoint What deforms, it is intended that covering is non-exclusive to be included, to include process, method, system, product or the equipment of a series of units It is not necessarily limited to those units, and can be including clearly not listing or for these processes, method, product or equipment are solid Other units having.
Specific embodiment
In order that those skilled in the art more fully understand application scheme.Below in conjunction with the embodiment of the present application Accompanying drawing, is clearly and completely described to the technical scheme in the embodiment of the present application, it is clear that described embodiment is only Some embodiments of the present application, rather than the embodiment of whole.Based on the embodiment in the application, those of ordinary skill in the art The every other embodiment obtained under the premise of creative work is not made, should all belong to the scope of the application protection.
The main thought of the application is the work that the work of user's code-oriented is switched to module oriented approach, i.e. by user Build model to be automatically obtained Integrated Simulation.
In the embodiment that the application is provided, need user that the basic software module library for being supplied to user is installed in advance, wherein, The basic software module library can include three sub- module librarys, respectively interface function submodule storehouse, call back function submodule Storehouse and parameter configuration submodule storehouse;Behind installation foundation software module storehouse, there is provided also deposit automatically to the basic software code of user In the associated file in basic software module library described in Chu Zhiyu, when integrated software, compiler can read the basis automatically Software.
Comprising for the external interface function module using software transfer in the interface function submodule storehouse, work as application software When needing to call some functions of external interface function optimized integration software, user needs to call outside in application software model Add corresponding external interface function module in interface function position.
The call back function module pair of application software is supplied in the call back function submodule storehouse comprising basic software.One Call back function module is to comprising a function name module and a function content module.Wherein, the function of function content module is needed User is wanted by building model realization, then, when code is generated, application software will be formed call back function content is determined System.
For sake of convenience, the interface function submodule storehouse and call back function submodule storehouse may be collectively referred to as basic software letter Number module library, the interface function module and call back function module may be collectively referred to as basic software function module.
Graphic user interface comprising the parameter for receiving user's input in the parameter configuration submodule storehouse (Graphical User Interface, abbreviation gui interface) and parameter configuration module, wherein, the parameter configuration module is led to The configuration parameter for crossing gui interface receiving user's input realizes parameter configuration, and the parameter configuration module is invisible for user 's.
In the embodiment of the present application, all modules in the basic software module library are built upon s-function module bases On plinth, s-function modules are the modules of the customizable functionality that Simulink is provided.The module includes three partial contents:s- Function modular entities, s-function source file sfcn.c (the entitled sfcn of file of source file) and module TLC file sfcn.tlc。
The life of the source code of the module (for sake of convenience, hereinafter simply referred to as basic software module) in basic software module library Into flow process as shown in figure 1, may include steps of:
Step S101:The source file of s-function modules is write under Simulink environment.This document includes description mould The information such as the input of block, output and sampling time, and the configuration parameter value being input into can be obtained from gui interface.Wherein, the module Input and output information include module input port and output port number, and the type of input and output port.
For example, it is assumed that the entitled sfcn.c of the file of the source file write, it is assumed that function to be encapsulated is:CanWrite (" ends The value of mouth 1 ", " value of port 2 "), then, in source file sfcn.c, the s-function modules for needing definition packaged have Two input ports, the type of port 1 can be uint8, and the type of port 2 can be uint16.
If being encapsulated as the parameter configuration module of intervalometer, need to define one configuration of packaged s-function modules The parameter of timing, it is assumed that the entitled temp of this parameter (temp is supplied to tlc file uses), the content of temp is exactly to join Numerical value, parameter value are the numerical value that user is input into by gui interface.
Step S102:Source file is converted to the file that can be run under MATLAB environment.
It is, for example possible to use source file sfcn.c is converted to what is can run under MATLAB environment by mex orders Sfcn.mexw32 files, i.e. be input into mex sfcn.c in MATLAB command windows, then perform Conversion.
Step S103:Write module TLC file.
The module TLC file write in this step is identical with the filename of source file, is all sfcn, it is assumed that source file is Sfcn.c, then, the module TLC file write is then sfcn.tlc, certainly, the text of the module TLC file and source file Part name can also be alternative document name, be not specifically limited here, as long as module TLC file is identical with the filename of source file i.e. Can.The output content of the customizable s-function modules of the module TLC file, file etc. can be generated.
For example, as a example by also with CanWrite (" value of port 1 ", " value of port 2 ") function, the TLC files of the function Content is " CanWrite (" value of port 1 ", " value of port 2 ") ".What TLC files determined encapsulation is CanWrite (" ports 1 Value ", " value of port 2 ") this function.
If being encapsulated as the parameter configuration module of intervalometer, the content of TLC files then has two parts:1st, generation parameter configuration text Part, it is assumed that for Timer_Cfg.h;2nd, the content of this document is timing tim, it is assumed that tim=%<temp>.Wherein temp's Value (being assumed to be 100) is, when code is generated, to pass over from source file sfcn.c files, and the result for finally encapsulating is raw Into the parameter configuration files of entitled parameter configuration files Timer_Cfg.h, the content of this document is tim=100.
Step S104:The relevant parameter of allocation models file, can include selection system TLC file, select the core of hardware Sheet type, Optimized model etc..
The model file refers to * .mdl files, comprising application software module, basic software function module, that is, uses The file of model is built in family.The relevant parameter of the model file can be selected according to user's request.
Step S105:The button of " generation code " is clicked in model file, generation model describes file.
The user that the model describes data structure of the file comprising basic software function module, used gui interface is received is defeated The relevant parameter that enters, in the information such as relevant parameter of model file configuration.The model describes file and refers to * .rtw files.
Step S106:File is described based on model, under Target Language Compiler instruments, by performing system System TLC files and module TLC file, generate the source code of basic software module.
The source code of the basic software module of the generation calls code for generating during integrated software.
Specifically, the Target Language Compiler instruments first carry out system TLC file, then read described Model describes file model.rtw, then according to the information performing module TLC file for reading, and then generates basic software module Source code.
Refer to Fig. 2, a kind of flow chart of software integrating method that Fig. 2 is provided for the embodiment of the present application, including:
Step S201:At least one basic software function module being pre-selected is connected to according to the link order for receiving The relevant position of application software model, generates controller software model;
The application is the addition basic software function module on the basis of the application software model that user builds, wherein, institute It is that user is selected from preassembled basic software function module storehouse to state at least one basic software function module, the base Link position of the plinth software function module in the application software model is determined according to the link order of user's triggering.
That is, in the embodiment of the present application, user is in addition to building application software model, in addition it is also necessary in application software Basic software function module is built on model, therefore, whole controller software is all by user by building model realization.Because using Family is that system model is built in Simulink, therefore, during user builds model, Simulink is triggered according to user Link order basic software function module that user is selected be connected to the relevant position of application software model.
Step S202:The functional configuration parameter of receives input, work(of the functional configuration parameter at least including basic software Can parameter;
Wherein, the concrete execution step of step S201 and step S202 is not specifically limited, and can first carry out step S201 Execution step S202 again, it is also possible to first carry out step S202 execution step S201 again.
The functional configuration parameter is the gui interface input provided by parameter configuration module by user.
Step S203:Receive code building instruction;
The code building instruction is also to be triggered by user, that is to say, that after controller software model buildings are good, The code building instruction that Simulink is received is generated by the button that user clicks on " generation code ".
Step S204:The configuration file corresponding with each basic software is generated according to the functional configuration parameter;
Wherein, during the code storage of the basic software is the associated file in the basic software function module storehouse.
Step S205:Generate the application software source code of the application software model;
For the application software model in the controller model, the application software source generation of the application software model is generated Code.The Simulink Coder in Simulink can be specifically called to automatically generate.
Step S206:It is corresponding with each basic software function module according to the generation of default control logic, for adjusting Code is called with corresponding basic software code;
The default control logic is set according to the function logic of application software to be realized by user.Specifically , the control logic can be arranged in state machine, it is also possible to arranged in the switch.Specifically can be by user according to the actual requirements It is determined that being arranged in state machine, still arrange in the switch, or the two is used in combination.
Carry out by taking the trigger timing that basic software function module " CanWrite " module is set in state machine as an example below Explanation, it is assumed that the control logic of the triggering CanWrite modules that user is arranged in state machine is as shown in figure 3, control shown in Fig. 3 Logical expressions trigger CanWrite modules when timing time is more than 10, then, when code is called in generation, code building work Tool can generate code (i.e. CanWrite modules call code) automatically according to the control logic in shape body machine, the control logic Code is:
Initial value tim=0;
if(tim>10)
{CanWrite();}
else
{ tim=tim+1;}
It is concrete how the common knowledge that code belongs to this area to be generated according to control logic, repeat no more here.
Wherein, the execution sequence of step 205 and step 206 is not specifically limited, and can first carry out step 205 and perform step again Rapid S206, it is also possible to first carry out step S206, then execution step S205 again.
Step S207:Determine that each calls code to exist according to the default application logic corresponding with controller software Position in the application software source code;
In due to the embodiment of the present application, code is generated by building control software model, therefore, and build software model When need user similar according to the actual demand setting of the software application logic corresponding with software, described and controller The corresponding default application logic of software is also to be determined according to the actual demand of control software by user, by advance The application logic of setting, it may be determined that each basic software function module calls code in the application software source code In position, specifically how to determine the common knowledge for belonging to this area, repeat no more here.
Step S208:Call code to add to the relevant position of the application software source code described each, answered Use software elementary code;
Step S209:Compiler is called, it is by the application software elementary code, each basic software code and described The configuration file corresponding with each basic software adds into the compiler;
Call compiling implement body include:Compiler IDE is opened, compiler parameter etc. is set;Wherein, compiler is set Parameter can be by providing the user gui interface, and by the corresponding parameter of user input, the parameter can include:Compiler Installation path, the filename of compiler project file, the path of compiler project file, if need the parameters such as compiling/download.
In the embodiment of the present application, after the software elementary code that is applied, compiler is called automatically, using the compiler Third party's interface function (the COM correlation functions that e.g., CodeWarrior compilers are provided) of offer is primary by the application software Code, each basic software code, and the configuration file corresponding with each basic software add to the compiler In.
Step S210:Control the compiler to be compiled the code in the compiler, generate file destination.
After code addition is finished, compiler is set engineering is compiled automatically, generate file destination.The file destination Be it is integrated after software document.
After generating file destination, it is possible to file destination is downloaded to Target Board and is suffered.
In the embodiment of the present application, it is only necessary to which user builds controller software model configuration feature parameter, then clicks on life Button into code is capable of achieving the integrated of software, searches the position for calling code without user in the code of application software Put, it is not required that user fills in manually and calls code, it is not required that code is added compiler by user, realize the automatic of software It is integrated.That is, the work of user's code-oriented is switched to module oriented approach by the software integrating method that the embodiment of the present application is provided Work, function call is realized by the connection between module, it is simple, clear, solve traditional-handwork it is integrated in run into Caused by readable difference, the difficulty of craft integrated software is high, the big problem of workload.
Above-described embodiment, it is preferred that the basic software function module can include interface function module and/or readjustment letter Digital-to-analogue block.
Which the specific basic software function module selects, and the number of basic software function module according to have by User is determined according to its actual demand.
On the basis of embodiment illustrated in fig. 2, when the basic software function module is call back function module, received The functional configuration parameter of input can also include call back function number and call back function title;
The call back function number and call back function title are input into by GUI configuration interfaces by user, i.e. user's root According to the number of the call back function required for actual demand configuration.
Accordingly, code building instruction is being received, can also including generating call back function module before calling compiler The process of source code, the flow chart of the source code of the generation call back function module that the embodiment of the present application is provided is as shown in figure 4, can be with Including:
Step S401:Generate call back function module pair corresponding with the call back function number, the call back function module To including function name module and function content module;
The number of hypothesis call back function is n, then, n call back function module pair will be generated, wherein, the function name The title of module determines that according to the call back function title title of different call back function name modules all includes the readjustment Function name part, but the title of different call back function name modules is different.For example, it is assumed that call back function number is 2, letter is adjusted back It is several to be referred to as abc, then, the title of the function name module of a call back function module centering of generation can be abc1, generate Another call back function module centering function name module title can be abc2, it is of course also possible to order otherwise Name, the main call back function title comprising input simultaneously mutually can be distinguished, and be not specifically limited here.
Wherein, the delivery outlet of function name module is connected with the input port of the function content module, and the two is inseparable Use.
Step S402:Determine the call back function model that user is built in each function content module;
In the embodiment of the present application, user is needed to build the model of each call back function.
Step S403:Generate the source code of each call back function model.
For example, it is assumed that the curriculum offering of function name module is void App_CanWrite (void) by user, and in function The algorithm of A=B+1 has been built in content module.So, will appear as when generating code:
void App_CanWrite(void)
{
A=B+1;
}
Accordingly, also include after compiler is called:The source code of each call back function model is added to described In compiler.
In the embodiment of the present application, the function of the function content module of call back function module builds model realization by user, When code is generated, customization of the user to call back function content will be formed.Add call back function by way of building model Content rather than by code means add, the work of user plane type code is switched to into the work of module oriented approach further, is entered One step reduces Integrated Simulation difficulty height, reduces workload.
Above-described embodiment, it is preferred that the application software source code of the generation application software model can be by calling One Code Generator generates the application software code of the application software model, and the first code Core Generator can be Simulink Coder;
Above-described embodiment, it is preferred that the generation calls the code that calls of each basic software function module pass through Call second code Core Generator generate call each basic software function module call code.The second point Core Generator Can be Simulink Coder, or RTW Coder, preferably RTW Coder.
Corresponding with embodiment of the method, the embodiment of the present application also provides a kind of integrated software system, refer to Fig. 5, and Fig. 5 is A kind of structural representation of integrated software system that the embodiment of the present application is provided, the integrated software system can include:
Link block 501, the first receiver module 502, the second receiver module 503, parameter configuration module 504, first generates Module 505, the second generation module 506, the first determining module 507, add module 508, calling module 509 and control module 510; Wherein,
Link block 501 is used at least one basic software function module being pre-selected according to the link order for receiving It is connected to the relevant position of application software model;
First receiver module 502 is used for the functional configuration parameter of receives input, and the functional configuration parameter at least includes base The functional parameter of plinth software;
Second receiver module 503 is used to receive code building instruction;
Parameter configuration module 504 for second receiver module 503 receive code building instruction after, according to the work( Can the configuration parameter generation configuration file corresponding with each basic software;
First generation module 505 is for, after second receiver module receives code building instruction, generating the application The application software source code of software model;
Preferably, the first generation module 505 can generate the application software mould by calling first code Core Generator The application software source code of type.
Second generation module 506 for second receiver module receive code building instruction after, according to default control Logic processed generates corresponding with each basic software function module, calls generation for call corresponding basic software source code Code;
Preferably, the second generation module 506 can call each basis soft by calling second code Core Generator to generate Part source code calls code, wherein, each basic software source code correspondence one calls code.
First determining module 507 is for determining each according to the default application logic corresponding with controller software Call position of the code in the application software source code;
Add module 508 for calling code to add to the relevant position of the application software source code described each, Be applied software elementary code;
Calling module 509 is used to call compiler, by the application software elementary code, each basic software source code, And the configuration file corresponding with each basic software adds into the compiler;
Control module 510 is compiled to the code in the compiler for controlling the compiler, generates target text Part.
A kind of integrated software system that the embodiment of the present application is provided, it is only necessary to which user builds controller software model and configures Functional parameter, then click on generate code button i.e. be capable of achieving software it is integrated, without user application software generation The position for calling code is searched in code, it is not required that user fills in manually and calls code, it is not required that code is added and compiled by user Device is translated, being automatically integrating for software is realized.That is, the embodiment of the present application provide software integrating method, by user towards The work of code switchs to the work of module oriented approach, realizes function call by the connection between module, simple, clear, solves Caused by the readability difference run into during traditional-handwork is integrated, the difficulty of craft integrated software is high, workload big problem.
Above-described embodiment, it is preferred that the basic software function module includes interface function module and/or call back function mould Block.
When the basic software function module is call back function module, the functional configuration that first receiver module is received Parameter also includes call back function number and call back function title;Based on this, the embodiment of the present application provide another kind of Integrated Simulation The structural representation of system is as shown in fig. 6, can also include:
3rd generation module 601, for, after second receiver module 503 receives code building instruction, generating and institute The corresponding call back function module pair of call back function number is stated, the call back function module is to including function name module and function content Module, the title of the function name module are determined according to the call back function title;
Second determining module 602, for determining call back function model that user is built in each function content module;
4th generation module 603, for generating the source code of each call back function model;
Accordingly, the calling module 509 is additionally operable to add the source code of each call back function model to described In compiler.
Each embodiment in this specification is described by the way of progressive, identical similar portion between each embodiment Divide mutually referring to what each embodiment was stressed is the difference with other embodiment.The above is only this The specific embodiment of application, it is noted that for those skilled in the art, former without departing from the application On the premise of reason, some improvements and modifications can also be made, these improvements and modifications also should be regarded as the protection domain of the application.

Claims (10)

1. a kind of software integrating method, it is characterised in that include:
At least one basic software function module being pre-selected is connected to into application software model according to the link order for receiving Relevant position, generate controller software model;
The functional configuration parameter of receives input, functional parameter of the functional configuration parameter at least including basic software;
Receive code building instruction;
The configuration file corresponding with each basic software is generated according to the functional configuration parameter;
Generate the application software source code of the application software model;
It is corresponding with each basic software function module according to the generation of default control logic, for calling corresponding basis soft Part source code calls code;
Determine that each calls code in the application software according to the default application logic corresponding with controller software Position in source code;
Call code to add to the relevant position of the application software source code described each, be applied software primary generation Code;
Compiler is called, it is by the application software elementary code, each basic software source code and described soft with each basis The corresponding configuration file of part adds into the compiler;
Control the compiler to be compiled the code in the compiler, generate file destination;
Wherein, the source code product process of the basic software function module includes:
The source file of s-function modules is write under Simulink environment;
Source file is converted to the file that can be run under MATLAB environment;
Write module TLC file;
The relevant parameter of allocation models file, including select system TLC file;
The button for generating code is clicked in model file, generation model describes file;
File is described based on model, under Target Language Compiler instruments, by execution system TLC file and mould Block TLC files, generate the source code of basic software function module.
2. method according to claim 1, it is characterised in that the basic software function module includes interface function module And/or call back function module.
3. method according to claim 2, it is characterised in that when the basic software function module is call back function module When, the functional configuration parameter also includes:Call back function number and call back function title;
After code building instruction is received, also include before calling compiler:
Call back function module pair corresponding with the call back function number is generated, the call back function module is to including function famous model Block and function content module, the title of the function name module are determined according to the call back function title;
Determine the call back function model that user is built in each function content module;
Generate the source code of each call back function model;
Also include after compiler is called:
The source code of each call back function model is added into the compiler.
4. method according to claim 1, it is characterised in that the application software source code of the generation application software model Including:
First code Core Generator is called to generate the application software source code of the application software model.
5. method according to claim 1, it is characterised in that described to generate and each basis according to default control logic Software function module is corresponding, and the code that calls for calling corresponding basic software source code includes:
Call second code Core Generator generate call each basic software function module call code.
6. a kind of integrated software system, it is characterised in that include:
Link block, for being connected at least one basic software function module being pre-selected according to the link order for receiving The relevant position of application software model;The basic software function module is the basic software that source code is determined by following flow process Function module:The source file of s-function modules is write under Simulink environment;Source file is converted to can be The file run under MATLAB environment;Write module TLC file;The relevant parameter of allocation models file;At model file midpoint The button for generating code is hit, generation model describes file, including selects system TLC file;File is described based on model, Under TargetLanguage Compiler instruments, by execution system TLC file and module TLC file, basic software letter is generated The source code of digital-to-analogue block;
First receiver module, for the functional configuration parameter of receives input, the functional configuration parameter at least includes basic software Functional parameter;
Second receiver module, for receiving code building instruction;
Parameter configuration module, for generating the configuration file corresponding with each basic software according to the functional configuration parameter;
First generation module, for, after second receiver module receives code building instruction, generating the application software mould The application software source code of type;
Second generation module, for after second receiver module receives code building instruction, according to default control logic Generate corresponding with each basic software function module, code is called for call corresponding basic software source code;
First determining module, for determining that each calls generation according to the default application logic corresponding with controller software Position of the code in the application software source code;
Add module, for calling code to add to the relevant position of the application software source code described each, is answered Use software elementary code;
Calling module, for calling compiler, by the application software elementary code, each basic software source code, Yi Jisuo State the configuration file corresponding with each basic software to add into the compiler;
Control module, is compiled to the code in the compiler for controlling the compiler, generates file destination.
7. system according to claim 6, it is characterised in that the basic software function module includes interface function module And/or call back function module.
8. system according to claim 7, it is characterised in that when the basic software function module is call back function module When, the functional configuration parameter that first receiver module is received also includes:Call back function number and call back function title;
The system also includes:
3rd generation module, for, after second receiver module receives code building instruction, generating and the call back function The corresponding call back function module pair of number, the call back function module are to including function name module and function content module, described The title of function name module is determined according to the call back function title;
Second determining module, for determining call back function model that user is built in each function content module;
4th generation module, for generating the source code of each call back function model;
The calling module is additionally operable to, and the source code of each call back function model is added into the compiler.
9. system according to claim 6, it is characterised in that first generation module is generated by calling first code Instrument generates the application software source code of the application software model.
10. system according to claim 6, it is characterised in that second generation module is given birth to by calling second code Generate into instrument call each basic software function module call code.
CN201310689788.7A 2013-12-16 2013-12-16 Software integration method and system Active CN103677835B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310689788.7A CN103677835B (en) 2013-12-16 2013-12-16 Software integration method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310689788.7A CN103677835B (en) 2013-12-16 2013-12-16 Software integration method and system

Publications (2)

Publication Number Publication Date
CN103677835A CN103677835A (en) 2014-03-26
CN103677835B true CN103677835B (en) 2017-04-12

Family

ID=50315502

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310689788.7A Active CN103677835B (en) 2013-12-16 2013-12-16 Software integration method and system

Country Status (1)

Country Link
CN (1) CN103677835B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105808216A (en) * 2014-12-29 2016-07-27 联创汽车电子有限公司 Vehicle-mounted control software system policy code and underlying code integration method
CN106055351A (en) * 2016-05-20 2016-10-26 北京经纬恒润科技有限公司 Development method and apparatus of control system
US10606566B2 (en) * 2017-06-03 2020-03-31 Apple Inc. Integration of learning models into a software development system
US10310821B2 (en) 2017-06-03 2019-06-04 Apple Inc. Integration of learning models into a software development system
CN109981708A (en) * 2017-12-27 2019-07-05 浙江绍兴苏泊尔生活电器有限公司 Networked devices control method and device
CN108804091A (en) * 2018-05-25 2018-11-13 广州小天软件有限公司 A kind of software code generation method
CN111273953B (en) * 2018-11-19 2021-07-16 Oppo广东移动通信有限公司 Model processing method, device, terminal and storage medium
CN110045982A (en) * 2019-03-28 2019-07-23 宋子杰 A kind of embedded system configuration method based on source code polymerization
DE102020118563A1 (en) * 2019-07-17 2021-01-21 Steering Solutions Ip Holding Corporation MIDDLEWARE SYSTEM AND PROCEDURE
CN111399816A (en) * 2020-03-12 2020-07-10 华大半导体有限公司 Automobile ECU program file generation method and system, storage medium and terminal
CN113535220B (en) * 2020-04-15 2023-11-03 北京京东振世信息技术有限公司 Code packet management method and device
CN117331565B (en) * 2023-10-09 2024-05-28 镁佳(北京)科技有限公司 Software generation method, device, computer equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102087610A (en) * 2009-12-08 2011-06-08 联创汽车电子有限公司 Method for performing model simulation and code generation on custom hardware by using Simulink
CN102156643A (en) * 2011-04-25 2011-08-17 青岛海信传媒网络技术有限公司 Software integration method and system thereof
CN103365638B (en) * 2012-03-29 2016-08-31 北京九州华海科技有限公司 One-chip computer developing system based on ECUCoder and method
CN103135989B (en) * 2013-03-11 2016-02-10 北京经纬恒润科技有限公司 A kind of callback function code generation method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
RTW嵌入式代码自动生成机制与代码结构分析;齐振恒;《计算机测量与控制》;20100331;第639-642页 *

Also Published As

Publication number Publication date
CN103677835A (en) 2014-03-26

Similar Documents

Publication Publication Date Title
CN103677835B (en) Software integration method and system
Beckhoff et al. Go ahead: A partial reconfiguration framework
Vidal et al. A co-design approach for embedded system modeling and code generation with UML and MARTE
AU2017202110B2 (en) Runtime creation, assignment, deployment and updating of arbitrary radio waveform techniques for a radio waveform generation device
US20050177816A1 (en) Automatic generation of graphical program code for a graphical program based on the target platform of the graphical program
CN101667134B (en) Method for constructing compiling system and compiling system constructing device
CN104461503B (en) It is dynamically composed the method and system of software interface
US20110041106A1 (en) Integrated Circuit Modeling Method and Framework Tool
CN102830654B (en) Open type numerical control system based on Android platform and method for performing secondary development therein
JP2010102716A (en) Method for programming mask-programmable logic device and device programmed by the method
US7478349B2 (en) Automatically synchronizing timed circuits on I/O Devices
JP2009517764A (en) Merge timing constraints in hierarchical SOC design
CN108460199A (en) CNI modelings
CN101673198A (en) Method for verifying consistency of dynamic behavior in UML model and time-sequence contract
CN102866890B (en) System and method for generating Android embedded interface and program framework based on object correlation
CN102541566A (en) Method for generating interface frameworks of semiconductor software
US6816828B1 (en) Logic simulation method in which simulation is dynamically switchable between models
US20070234253A1 (en) Multiple mode approach to building static timing models for digital transistor circuits
US7523441B2 (en) Implementing a synchronous reactive system in a graphical program
CN104063231A (en) Test resource rapid access method based on HIT-TENA
Redell et al. The AIDA toolset for design and implementation analysis of distributed real-time control systems
CN103049602A (en) Method for transforming AADL (Architecture Analysis and Design Language) component to interface automata model based on model driven engineering
CN108958791A (en) A kind of basic software integrated approach and system
KR20210039714A (en) Method and apparatus for constructing test environment
CN113407214B (en) Reconfigurable multithreading parallel upper computer system based on can communication

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: 4 / F, building 1, No.14 Jiuxianqiao Road, Chaoyang District, Beijing 100020

Patentee after: Beijing Jingwei Hirain Technologies Co.,Inc.

Address before: 100101 Beijing city Chaoyang District Anxiang Beili 11 B block 8 layer

Patentee before: Beijing Jingwei HiRain Technologies Co.,Ltd.

CP03 Change of name, title or address