CN105912334A - Internal behavior object code generation method of AUTOSAR software assembly - Google Patents
Internal behavior object code generation method of AUTOSAR software assembly Download PDFInfo
- Publication number
- CN105912334A CN105912334A CN201610221094.4A CN201610221094A CN105912334A CN 105912334 A CN105912334 A CN 105912334A CN 201610221094 A CN201610221094 A CN 201610221094A CN 105912334 A CN105912334 A CN 105912334A
- Authority
- CN
- China
- Prior art keywords
- code
- internal act
- internal
- parameter
- object identification
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
Abstract
The present invention discloses an internal behavior object code generation method of an AUTOSAR software assembly. The internal behavior object code generation method comprises determining required parameters according to requirements, and designing a configuration interface; designing a code template by utilization of a template-based code generation technology; and generating internal behavior object codes according to the corresponding configuration parameters, and performing persistent preservation on the parameters. Compared with an existing code generation method based on a Matlab/Simulink assembly, the internal behavior object code generation method has the advantages that software is not required to depend on the Matlab/Simulink assembly, and user learning and using costs are reduced; an internal behavior object parameter configuration tool can be customized, and requirements of different users can be satisfied; and the users can couple original codes and generated codes for use, and reusability of the codes is enhanced.
Description
Technical field
The invention belongs to technical field of automotive electronic software development, be specifically related to the inside of a kind of AUTOSAR component software
Object of action code generating method.
Background technology
AUTOSAR (AUTomotive Open System ARchitecture) is an automotive electronics software standard, should
Standard defines the development approach of a set of automotive electronics software, and the automotive electronics software utilizing the method to develop has good moving
Planting property, can be applicable to different vehicle platform.Use AUTOSAR exploitation include component software modeling, system configuration, ECU extraction,
The processes such as ECU configuration, code building.The effect of component software modeling is to provide the function of system architecture, allows user's fast construction
The software prototype of one automobile electronic system, including to component software, port, interface, data type, internal act, realization
Modeling, these are an elementary composition complete automotive electronics software system abstract.MATLAB is a kind of widely used system
Design tool, in vehicle electric field, MATLAB/Simulink instrument can be used to design in single atom component software
Portion's logical algorithm, and generate realize code, the system that vehicle electric field is much left over all takes MATLAB/Simulink to carry out
Design.
Methodology regulation software system development design process is divided into system configuration phase and ECU to configure two benches, is wherein
The purpose of system configuration phase is to utilize the basic module of AUTOSAR to be modeled the real needs of software system, and the most at last
These Demand mappings are on concrete ECU (Electronic Control Unit).At system configuration phase, software system is built
During mould, it is necessary first to utilize the component software that AUTOSAR provides by system description out, built-in system is then utilized to model work
Tool, it is achieved the function of each component software.
The most a lot of automotive electronics development set IDEs based on AUTOSAR standard implementation utilize Matlab/
Simulink assembly carries out component software internal act (Internal Behavior) modeling, i.e. these instruments need to rely on
Matlab/Simulink instrument.Because Matlab software function is complicated, version is numerous, just give making of these IDEs
With bringing inconvenience.
Summary of the invention
In order to release the PowerBuilder dependence to Matlab/Simulink, the invention provides one
The internal act object identification code of AUTOSAR component software generates method, utilizes the method can be internal real at IDE
The inside modeling of existing component software.
The internal act object identification code of a kind of AUTOSAR component software generates method, comprises the steps:
(1) according to the functional requirement of component software, the parameter generated needed for internal act object identification code, and then design are determined
Realize the configuration interface of internal act;
(2) design manually write the Code Template of internal act assembly, thus by internal act object identification code templating;
(3) from described configuration interface, object oriented and the relevant parameter of internal act are read, according to described code
The XML configuration file that template generation is corresponding, and carry out persistence operation, in order to software tool can obtain after restarting again
These configuration parameters;
(4) internal act used according to Code Template imports respective function entity, i.e. in chained library file interface
In choose the function library of required importing or existing .c or .h source file, in order to follow-up code successful com;
(5) Code Template is made to build with the object oriented in configuration interface and relevant parameter according to described XML configuration file
Vertical mapping relations, choose the component software of correspondence or the engineering at component software place line code of going forward side by side to generate, finally in place work
Generate under the corresponding catalogue of journey and .c or the .h source code file corresponding to described Code Template filename.
In described step (1), the parameter name needed for the title of internal act object and internal act object meets
The requirement of AUTOSAR standard.
The entitled .vm of file suffixes of described Code Template.
Described Code Template calls the function interface read-write ginseng of regulation in RTE (Run-Time Environment) standard
Number.
Described RTE is the core of ECU framework in AUTOSAR system, and it achieves communication interface, it is provided that leading to of inter-module
Telecommunications services, therefore all communications of inter-module all complete under RTE control.
Described Code Template provides only reading and the write operation of AUTOSAR component software port parameter, not to port
Parameter carries out the operation of other complexity.
To port parameter be carried out the process of other complexity, then can revise the generation after internal act object generates voluntarily
Code, or logical process code chain is received in the code ultimately generated from static link library by chained library file interface.
The object oriented utilizing Velocity technology to read internal act from configuration interface in described step (3) and phase
Related parameter.
The present invention utilizes code Generation based on template, design internal act object identification code to generate template, then tie
Close the parameter of user configured internal act object, finally automatically generate the code of internal act object.Compared with prior art,
The invention have the advantages that (1) AUTOSAR development environment is not necessarily dependent on Matlab/Simulink instrument to generate inside
The code of object of action;(2) the inventive method generate internal act object code time, its configuration parameter is customizable;(3)
User can use original logical code, it is not necessary to redesigns the logic function code of internal act object completely.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet that internal act object identification code of the present invention generates method.
Fig. 2 is the schematic diagram that in the specific embodiment of the invention, internal act object needs configuration parameter.
Detailed description of the invention
In order to more specifically describe the present invention, below in conjunction with the accompanying drawings and detailed description of the invention is to technical scheme
It is described in detail.
For solving dependence to Matlab/Simulink instrument, as it is shown in figure 1, the present invention to propose a kind of AUTOSAR soft
The internal act object identification code of part assembly generates method, specifically comprises the following steps that
(1) according to the functional requirement of component software, determine and generate the parameter that internal act object identification code needs, and then design
Realize internal act configuration interface;Wherein internal act object oriented and desired parameters title meet the requirement of AUTOSAR standard.
(2) design manually write the Code Template file of internal act assembly of the entitled .vm of suffix, by internal act pair
As Code Template.Wherein, Code Template needs to call the function interface read-write parameter specified in the RTE standard of AUTOSAR;Generation
Code mask provides only reading and the write operation of AUTOSAR component software Port parameter, and parameter does not carries out the behaviour of other complexity
Make.If it is intended to these parameters to be carried out more complicated process, after the present invention supports that amendment internal act object generates voluntarily
Code, or from static link library, logical process code chain is received final code by Link Runnable File interface
In.
(3) Velocity technology is utilized to read title and the relevant parameter of internal act from configuration interface, according in S20
Template file generate corresponding XML configuration file, carry out persistence operation, in order to software tool restarts, it is possible to again
Load these configuration parameters.
(4) according to the internal act arrived used in the object identification code generated in step (2) so far it is a function pair
Onomatopoeia is bright, imports function entity, in Link Runnable File configuration interface, need to choose required importing function library or
Existing .c and .h source file, in order in the compiling success of follow-up code.
(5), after each step completes more than, component software or the engineering at component software place of correspondence need to be chosen, carry out generation
Code generates, and finally generates .c and the .h source code file corresponding to template filename under the corresponding catalogue of engineering.
Following example, SmartSAR Studio automotive electronics based on the research and development of ESE engineering center of Zhejiang University are integrated to be opened
Hair ring border, completes design and the realization of internal act object identification code Core Generator.SmartSAR Studio is by four tool group
Become, i.e. Software Architecture Design instrument, system configuration utility, ECU configuration tool, RTE Core Generator.At Software Architecture Design instrument
The middle generation having needed internal act object identification code, therefore the implementation case is mainly on the basis of Software Architecture Design instrument
On, to implement internal act object identification code and generate method, its concrete implementation process is as follows:
S1: determine the parameter of the configuration that internal act object needs.In the implementation case, the parameter of configuration is needed to have:
Runnable Entity object, RteEvent object, the Component information of internal act object reference, according to component software
Functional requirement, determine generate internal act object identification code need parameter, configure at internal act configuration interface, as figure
Shown in 2;Wherein internal act object oriented and desired parameters title meet the requirement of AUTOSAR standard.
S2: make internal act object identification code according to demand and generate template file.In the implementation case, manually write and make
Determine six Code Template files, and use Velocity technology to resolve;The Code Template of design is shown in Table 1.Present embodiment exists
During design Velocity Code Template, the simplest port (Port) information obtaining each component software (Component),
And carry out simply reading in, and be written out to .c and the .h source code file generated from interface.
Table 1
The title of S3: in the implementation case, it is provided that the parameter in S20 Code Template includes: Runnable Entity,
The data type that the number of Runnable Entity, the title of PPort and number, the title of RPort and number, port send
Deng.
After completing the aforementioned steps, it is only necessary in component software view, trigger the configuration of internal act object, complete
After parameter configuration, preserve and trigger code generation operation, the code building of internal act object can be completed.
The above-mentioned description to embodiment is to be understood that for ease of those skilled in the art and apply this
Bright.Above-described embodiment obviously easily can be made various amendment by person skilled in the art, and described herein
General Principle is applied in other embodiments without through performing creative labour.Therefore, the invention is not restricted to above-described embodiment,
Those skilled in the art should be in the protection of the present invention according to the announcement of the present invention, the improvement made for the present invention and amendment
Within the scope of.
Claims (7)
1. the internal act object identification code of AUTOSAR component software generates a method, comprises the steps:
(1) according to the functional requirement of component software, determine the parameter generated needed for internal act object identification code, and then design realizes
The configuration interface of internal act;
(2) design manually write the Code Template of internal act assembly, thus by internal act object identification code templating;
(3) from described configuration interface, object oriented and the relevant parameter of internal act are read, according to described Code Template
Generate corresponding XML configuration file, and carry out persistence operation, in order to software tool can obtain these after restarting again
Configuration parameter;
(4) internal act used according to Code Template imports respective function entity, i.e. selects in chained library file interface
The function library imported needed in or existing .c or .h source file, in order to follow-up code successful com;
(5) make Code Template set up with the object oriented in configuration interface and relevant parameter according to described XML configuration file to reflect
Penetrate relation, choose the component software of correspondence or the engineering at component software place line code of going forward side by side to generate, finally in place engineering
Generate and .c or the .h source code file corresponding to described Code Template filename under corresponding catalogue.
Internal act object identification code the most according to claim 1 generates method, it is characterised in that: in described step (1)
Parameter name needed for the title of internal act object and internal act object meets the requirement of AUTOSAR standard.
Internal act object identification code the most according to claim 1 generates method, it is characterised in that: the literary composition of described Code Template
The entitled .vm of part suffix.
Internal act object identification code the most according to claim 1 generates method, it is characterised in that: described Code Template is adjusted
By the function interface read-write parameter of regulation in RTE standard;Described RTE is the core of ECU framework in AUTOSAR system, in fact
Having showed communication interface, it is provided that the communication service of inter-module, therefore all communications of inter-module all complete under RTE control.
Internal act object identification code the most according to claim 1 generates method, it is characterised in that: described Code Template is only
Reading and the write operation of AUTOSAR component software port parameter are provided, port parameter is not carried out the operation of other complexity.
Internal act object identification code the most according to claim 5 generates method, it is characterised in that: to port parameter is entered
Row other complexity process, then can revise voluntarily internal act object generate after code, or by chained library file interface from
Logical process code chain is received in the code ultimately generated by static link library.
Internal act object identification code the most according to claim 1 generates method, it is characterised in that: in described step (3)
Velocity technology is utilized to read object oriented and the relevant parameter of internal act from configuration interface.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610221094.4A CN105912334A (en) | 2016-04-08 | 2016-04-08 | Internal behavior object code generation method of AUTOSAR software assembly |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610221094.4A CN105912334A (en) | 2016-04-08 | 2016-04-08 | Internal behavior object code generation method of AUTOSAR software assembly |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105912334A true CN105912334A (en) | 2016-08-31 |
Family
ID=56745049
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610221094.4A Pending CN105912334A (en) | 2016-04-08 | 2016-04-08 | Internal behavior object code generation method of AUTOSAR software assembly |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105912334A (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106874052A (en) * | 2017-02-24 | 2017-06-20 | 北京中电普华信息技术有限公司 | The dispositions method and device of a kind of application program |
CN108304194A (en) * | 2017-09-01 | 2018-07-20 | 潍柴动力股份有限公司 | A kind of generation method of program, device and electronic equipment |
CN109871289A (en) * | 2019-02-01 | 2019-06-11 | 北京顺丰同城科技有限公司 | A kind of remote procedure call service creation method and device |
CN110442329A (en) * | 2019-06-26 | 2019-11-12 | 平安科技(深圳)有限公司 | Generation method, device, storage medium and the computer equipment of code segment |
CN114691234A (en) * | 2022-03-18 | 2022-07-01 | 佛山仙湖实验室 | Program configuration method, system, device and medium based on AUTOSAR |
CN115826938A (en) * | 2022-01-29 | 2023-03-21 | 宁德时代新能源科技股份有限公司 | Method and device for generating and using real-time operating system, electronic equipment and medium |
CN116431119A (en) * | 2023-06-12 | 2023-07-14 | 上海鉴智其迹科技有限公司 | Software component port creation method and device, electronic equipment and storage medium |
WO2023225785A1 (en) * | 2022-05-23 | 2023-11-30 | 华为技术有限公司 | Automobile open system architecture model construction method and apparatus |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102214099A (en) * | 2011-06-16 | 2011-10-12 | 浙江大学 | Automatic run-time environment (RTE) code generating method for automobile system architecture (AUTOSAR) |
CN104035754A (en) * | 2013-03-05 | 2014-09-10 | 北大方正集团有限公司 | XML (Extensible Markup Language)-based custom code generation method and generator |
-
2016
- 2016-04-08 CN CN201610221094.4A patent/CN105912334A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102214099A (en) * | 2011-06-16 | 2011-10-12 | 浙江大学 | Automatic run-time environment (RTE) code generating method for automobile system architecture (AUTOSAR) |
CN104035754A (en) * | 2013-03-05 | 2014-09-10 | 北大方正集团有限公司 | XML (Extensible Markup Language)-based custom code generation method and generator |
Non-Patent Citations (1)
Title |
---|
陈坤: "面向智能车辆的基础软件平台设计与实现", 《中国优秀硕士学位论文全文数据库工程科技Ⅱ辑》 * |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106874052B (en) * | 2017-02-24 | 2020-06-26 | 北京中电普华信息技术有限公司 | Deployment method and device of application program |
CN106874052A (en) * | 2017-02-24 | 2017-06-20 | 北京中电普华信息技术有限公司 | The dispositions method and device of a kind of application program |
CN108304194A (en) * | 2017-09-01 | 2018-07-20 | 潍柴动力股份有限公司 | A kind of generation method of program, device and electronic equipment |
CN108304194B (en) * | 2017-09-01 | 2021-08-20 | 潍柴动力股份有限公司 | Program generation method and device and electronic equipment |
CN109871289A (en) * | 2019-02-01 | 2019-06-11 | 北京顺丰同城科技有限公司 | A kind of remote procedure call service creation method and device |
CN110442329A (en) * | 2019-06-26 | 2019-11-12 | 平安科技(深圳)有限公司 | Generation method, device, storage medium and the computer equipment of code segment |
CN115826938B (en) * | 2022-01-29 | 2023-11-17 | 宁德时代新能源科技股份有限公司 | Method and device for generating and using real-time operating system, electronic equipment and medium |
CN115826938A (en) * | 2022-01-29 | 2023-03-21 | 宁德时代新能源科技股份有限公司 | Method and device for generating and using real-time operating system, electronic equipment and medium |
CN114691234A (en) * | 2022-03-18 | 2022-07-01 | 佛山仙湖实验室 | Program configuration method, system, device and medium based on AUTOSAR |
CN114691234B (en) * | 2022-03-18 | 2023-11-21 | 佛山仙湖实验室 | AUTOSAR-based program configuration method, system, equipment and medium |
WO2023225785A1 (en) * | 2022-05-23 | 2023-11-30 | 华为技术有限公司 | Automobile open system architecture model construction method and apparatus |
CN116431119B (en) * | 2023-06-12 | 2023-08-29 | 上海鉴智其迹科技有限公司 | Software component port creation method and device, electronic equipment and storage medium |
CN116431119A (en) * | 2023-06-12 | 2023-07-14 | 上海鉴智其迹科技有限公司 | Software component port creation method and device, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105912334A (en) | Internal behavior object code generation method of AUTOSAR software assembly | |
Gray et al. | Domain-Specific Modeling. | |
US8296699B1 (en) | Method and system for supporting both analog and digital signal traffic on a single hierarchical connection for mixed-signal verification | |
Muller-Glaser et al. | Multiparadigm modeling in embedded systems design | |
Villar et al. | Python as a hardware description language: A case study | |
CN106951575B (en) | Multi-disciplinary virtual test simulation method based on COSIM | |
CN102012673A (en) | Design method of complex reaction type system controller | |
CN104573287A (en) | Digital simulation framework design method based on interface binding unified model | |
CN111290954B (en) | FPGA component visual test framework and method based on UVM | |
Bell | Code generation from object models | |
CN105260177A (en) | SiPESC platform based Python extension module development method | |
CN110941422B (en) | Code automatic generation method, code generator and readable storage medium | |
do Nascimento et al. | Modes: Embedded systems design methodology and tools based on mde | |
CN106970787A (en) | A kind of automobile controller rapid prototyping implementation method | |
CN111399829A (en) | Waveform modeling method and terminal based on model driving | |
Ferrari et al. | Desyreml: a sysml profile for heterogeneous embedded systems | |
CN104156209A (en) | Cross-platform application interface modeling method and device | |
Belanović et al. | A consistent design methodology for wireless embedded systems | |
CN113687814A (en) | Automation realization method of model framework and interface file based on AUTOSAR (automotive open system architecture) | |
Mbarek et al. | Using model driven engineering to reliably accelerate early low power intent exploration for a system-on-chip design | |
CN109597611A (en) | Front end data flow control Components Development system, method, equipment and storage medium | |
CN102880469A (en) | Method for realizing mapping from ExclusiveArea to OSResource in AUTOSAR | |
Geng et al. | Embedded C code generation platform for electric vehicle controller | |
Gerstlauer et al. | System-on-chip specification style guide | |
Gleirscher et al. | Incremental integration of heterogeneous systems views |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20160831 |
|
RJ01 | Rejection of invention patent application after publication |