CN113220357A - Multifunctional software configuration method and system - Google Patents
Multifunctional software configuration method and system Download PDFInfo
- Publication number
- CN113220357A CN113220357A CN202110408156.3A CN202110408156A CN113220357A CN 113220357 A CN113220357 A CN 113220357A CN 202110408156 A CN202110408156 A CN 202110408156A CN 113220357 A CN113220357 A CN 113220357A
- Authority
- CN
- China
- Prior art keywords
- parameter
- value
- calibrated
- calibration
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 25
- 230000006870 function Effects 0.000 claims abstract description 79
- 238000004590 computer program Methods 0.000 claims description 10
- 238000013461 design Methods 0.000 abstract description 7
- 238000012423 maintenance Methods 0.000 abstract description 3
- 238000007726 management method Methods 0.000 description 3
- 238000011161 development Methods 0.000 description 2
- 230000003044 adaptive effect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000013486 operation strategy Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Images
Classifications
-
- 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/44505—Configuring for program initiating, e.g. using registry, configuration files
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The invention provides a software configuration method and a system adapting to multiple functions, wherein the method comprises the following steps: defining whether parameters can be calibrated and parameters with function fixed values in a header file, and adding a precompiled code in a parameter calibration function; when the parameter which can be calibrated is the first calibrated value, the calibrated parameter corresponding to the preset function is read, the calibrated parameter is assigned to the calibrated value, and when the parameter which can be calibrated is the second calibrated value, the function fixed value parameter is assigned to the calibrated value; and compiling and executing the pre-compiled code. The scheme can meet the configuration requirements of diversified products, realize the calibration of different functional parameters and reduce the cost of design, maintenance and management of different functions of software.
Description
Technical Field
The invention relates to the field of software design, in particular to a multifunctional software configuration method and system.
Background
Commercial car function on the current market is various, and different operation strategies may exist to same function, and the configuration of combination can realize various functions. When corresponding software needs to be designed for a specific configured vehicle type, the workload of software development, testing and management of different functions is large, and the software function design cost of different vehicle types can be improved.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and a system for configuring software with multiple functions, so as to solve the problem of high design cost of software configuration functions of different existing vehicle types.
In a first aspect of the embodiments of the present invention, a method for configuring software that is adaptive to multiple functions is provided, including:
defining whether parameters can be calibrated and parameters with function fixed values in a header file, and adding a precompiled code in a parameter calibration function;
when the parameter which can be calibrated is the first calibrated value, the calibrated parameter corresponding to the preset function is read, the calibrated parameter is assigned to the calibrated value, and when the parameter which can be calibrated is the second calibrated value, the function fixed value parameter is assigned to the calibrated value;
and compiling and executing the pre-compiled code.
In a second aspect of embodiments of the present invention, there is provided a software configuration system for accommodating multiple functions, including:
the definition module is used for defining whether parameters and function fixed value parameters can be calibrated in a header file and adding precompiled codes in a parameter calibration function;
when the parameter which can be calibrated is the first calibrated value, the calibrated parameter corresponding to the preset function is read, the calibrated parameter is assigned to the calibrated value, and when the parameter which can be calibrated is the second calibrated value, the function fixed value parameter is assigned to the calibrated value;
and the compiling execution module is used for compiling and executing the pre-compiled code.
In a third aspect of the embodiments of the present invention, there is provided an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the steps of the method according to the first aspect of the embodiments of the present invention.
In a fourth aspect of the embodiments of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the method provided in the first aspect of the embodiments of the present invention.
In the embodiment of the invention, assignment of the calibration values is given according to the type of the parameter which can be calibrated or not in the header file, so that configuration of different functional parameters is realized, opening and closing design of different software functions is facilitated, workload of development and design of different functions can be reduced, development of excessive software versions is avoided, cost of design, maintenance and management of different functions is reduced, and product quality is guaranteed.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings described below are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a flowchart illustrating a method for configuring software to accommodate multiple functions according to an embodiment of the present invention;
fig. 2 is another schematic structural diagram of a software configuration method for accommodating multiple functions according to an embodiment of the present invention.
Detailed Description
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the embodiments described below are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons skilled in the art without any inventive work shall fall within the protection scope of the present invention, and the principle and features of the present invention shall be described below with reference to the accompanying drawings.
The terms "comprises" and "comprising," when used in this specification and claims, and in the accompanying drawings and figures, are intended to cover non-exclusive inclusions, such that a process, method or system, or apparatus that comprises a list of steps or elements is not limited to the listed steps or elements. In addition, "first" and "second" are used to distinguish different objects, and are not used to describe a specific order.
It can be understood that the function configurable software realizes the turning on or off of the related functions by modifying the offline calibration values of the products or adding/deleting codes, so as to meet the requirements of the finished vehicles with different configurations, and the finished vehicles at present have the requirement that a certain function can be calibrated in a certain configuration to be a fixed value in a certain configured vehicle type, so that the existing design method for turning on/off the related functions by the offline calibration parameter values cannot meet the existing requirements of the finished vehicle configuration.
Referring to fig. 1, fig. 1 is a schematic flowchart of a software configuration method for multiple functions according to an embodiment of the present invention, including:
s101, defining whether parameters can be calibrated and parameters with function fixed values in a header file, and adding a precompiled code in a parameter calibration function;
the header file is a carrier file containing function and data interface declaration, and can store parameter declaration in the program. The parameter types are defined in the header file, so that the reuse of global variables can be prevented, the parameters can be conveniently and directly called in the function, and parameter values can be obtained or assigned.
And defining a parameter calibration method in the parameter calibration function, namely assigning values to the calibration values according to the type of the parameters which can be calibrated or not.
Specifically, when the calibratable parameter is a first calibration value, the calibration parameter corresponding to the predetermined function is read, the calibration parameter is assigned to the calibration value, and when the calibratable parameter is a second calibration value, the function fixed value parameter is assigned to the calibration value;
wherein the calibration value is a specific parameter written into the ECU when the product is calibrated off-line through a UDS (unified Diagnostic services) service.
And S102, compiling and executing the pre-compiled code.
And compiling and executing the pre-compiled code to realize the function of the parameter calibration function.
Illustratively, as shown in fig. 2, it is previously indicated whether the calibratable parameter is xfunc ccanbecal, the function fixed value parameter is xfunc ctiontype, and the calibration value is CalibrationForXFunction. Wherein, the parameter XFUCCANBECAL whether can be calibrated indicates whether the function supports calibratable, 0 indicates that the function does not support, and 1 indicates that the function supports; the function fixed value parameter XFANTCTIONYPE indicates that the function can not be modified in a certain configuration and is a fixed value, and the fixed value x is a given parameter in actual requirements; the calibration value CalibrationForXFunction is a parameter written to the ECU by the UDS service at the time of product offline calibration.
H defines if parameter XFUNCCANBECCAL and function fixed value parameter XFUCTINTYPE values such as # define XFUCCCANBECCAL 1, # define XFUCTINTYPE 1, and adds corresponding precompiled code in the parameter calibration function;
when the calibratable parameter XFUCCANBECAL is 1 or not, reading a calibration parameter corresponding to the function, and assigning the calibration parameter to a calibration value CalibrationForXFancy;
when the parameter XFOUNCCANBECAL which can be calibrated is 0, the parameter XFOUNCTIONYPE with the function fixed value is assigned to the calibration value CalibrationForXFinction;
and compiling and executing the code to realize the calibration of the configuration parameters.
By the method provided by the embodiment, the precompiled parameter values can be modified in the header file so as to meet various vehicle configuration requirements, corresponding functions can be opened according to calibration or specific requirements, software versions can be reduced, software development, maintenance and management costs are reduced, and product quality is guaranteed.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
There is also provided in another embodiment of the present invention a software configuration system for accommodating multiple functions, including:
the definition module is used for defining whether parameters and function fixed value parameters can be calibrated in a header file and adding precompiled codes in a parameter calibration function;
when the parameter which can be calibrated is the first calibrated value, the calibrated parameter corresponding to the preset function is read, the calibrated parameter is assigned to the calibrated value, and when the parameter which can be calibrated is the second calibrated value, the function fixed value parameter is assigned to the calibrated value;
and the calibration value is a specific parameter written into the ECU when the product is offline for calibration through the UDS service.
Specifically, when the value of the calibratable parameter is 1, reading a calibration parameter corresponding to a predetermined function, and assigning the calibration parameter to a calibration value; and when the value of the calibratable parameter is 0, assigning the function fixed value parameter to the calibration value.
And the compiling execution module is used for compiling and executing the pre-compiled code.
It is understood that, in one embodiment, the electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the computer program executes steps S101 to S102 in the first embodiment, and the processor implements software multifunction parameter auto-calibration configuration when executing the computer program.
Those skilled in the art will appreciate that all or part of the steps in the method according to the above embodiments may be implemented by hardware that is related to instructions of a program, and the program may be stored in a computer-readable storage medium, such as ROM/RAM.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Claims (8)
1. A method for configuring software to accommodate multiple functions, comprising:
defining whether parameters can be calibrated and parameters with function fixed values in a header file, and adding a precompiled code in a parameter calibration function;
when the parameter which can be calibrated is the first calibrated value, the calibrated parameter corresponding to the preset function is read, the calibrated parameter is assigned to the calibrated value, and when the parameter which can be calibrated is the second calibrated value, the function fixed value parameter is assigned to the calibrated value;
and compiling and executing the pre-compiled code.
2. The method according to claim 1, characterized in that said calibration values are specific parameters written to the ECU when the product is calibrated off-line by the UDS service.
3. The method according to claim 1, wherein, when the calibratable parameter is the first calibration value, the calibration parameter corresponding to the predetermined function is read, the calibration parameter is assigned to the calibration value, and when the calibratable parameter is the second calibration value, the function fixed value parameter is assigned to the calibration value specifically:
when the value of the calibratable parameter is 1, reading a calibration parameter corresponding to a preset function, and assigning the calibration parameter to a calibration value;
and when the value of the calibratable parameter is 0, assigning the function fixed value parameter to the calibration value.
4. A software configuration system for accommodating multiple functions, comprising:
the definition module is used for defining whether parameters and function fixed value parameters can be calibrated in a header file and adding precompiled codes in a parameter calibration function;
when the parameter which can be calibrated is the first calibrated value, the calibrated parameter corresponding to the preset function is read, the calibrated parameter is assigned to the calibrated value, and when the parameter which can be calibrated is the second calibrated value, the function fixed value parameter is assigned to the calibrated value;
and the compiling execution module is used for compiling and executing the pre-compiled code.
5. The system of claim 4, wherein the calibration value is a specific parameter written to the ECU when the product is calibrated off-line by the UDS service.
6. The system according to claim 4, wherein, when the calibratable parameter is the first calibration value, the calibration parameter corresponding to the predetermined function is read, the calibration parameter is assigned to the calibration value, and when the calibratable parameter is the second calibration value, the function fixed value parameter is assigned to the calibration value specifically:
when the value of the calibratable parameter is 1, reading a calibration parameter corresponding to a preset function, and assigning the calibration parameter to a calibration value;
and when the value of the calibratable parameter is 0, assigning the function fixed value parameter to the calibration value.
7. An electronic device comprising a processor, a memory and a computer program stored in the memory and running on the processor, characterized in that the processor implements the steps of the multifunctional adapted software configuration method according to any one of claims 1 to 3 when executing the computer program.
8. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, carries out the steps of the method for configuring software for accommodating multiple functionalities of any one of claims 1 to 3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110408156.3A CN113220357A (en) | 2021-04-15 | 2021-04-15 | Multifunctional software configuration method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110408156.3A CN113220357A (en) | 2021-04-15 | 2021-04-15 | Multifunctional software configuration method and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113220357A true CN113220357A (en) | 2021-08-06 |
Family
ID=77087762
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110408156.3A Pending CN113220357A (en) | 2021-04-15 | 2021-04-15 | Multifunctional software configuration method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113220357A (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102495736A (en) * | 2011-12-19 | 2012-06-13 | 曙光信息产业(北京)有限公司 | Method and system for identifying software code svn version in executable file |
CN105335137A (en) * | 2014-07-23 | 2016-02-17 | 国际商业机器公司 | Method and device used for processing source file |
CN109765875A (en) * | 2018-11-30 | 2019-05-17 | 联合汽车电子有限公司 | Whole vehicle functions module automatic calibration system and method |
-
2021
- 2021-04-15 CN CN202110408156.3A patent/CN113220357A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102495736A (en) * | 2011-12-19 | 2012-06-13 | 曙光信息产业(北京)有限公司 | Method and system for identifying software code svn version in executable file |
CN105335137A (en) * | 2014-07-23 | 2016-02-17 | 国际商业机器公司 | Method and device used for processing source file |
CN109765875A (en) * | 2018-11-30 | 2019-05-17 | 联合汽车电子有限公司 | Whole vehicle functions module automatic calibration system and method |
Non-Patent Citations (1)
Title |
---|
MUGUA250: "预定义知识", 《HTTPS://WWW.CNBLOGS.COM/LANGQI250/P/2517656.HTML》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110888354A (en) | Method and device for realizing automatic identification of access equipment, computer equipment and medium | |
CN110502530A (en) | Database functions call method, system, computer equipment and storage medium | |
US20200278891A1 (en) | Dynamic Load Balancing In Network Centric Process Control Systems | |
CN115167831A (en) | Software integration method and device based on AUTOSAR and use method | |
CN114356367A (en) | Intelligent firmware batch upgrading method, system and medium for terminal equipment | |
CN113220357A (en) | Multifunctional software configuration method and system | |
CN114293877A (en) | Control system and method for vehicle-mounted skylight | |
CN105653354A (en) | Batch processing method and device | |
CN108595192A (en) | A kind of installation method and terminal device of application program | |
CN115755867A (en) | Vehicle diagnosis method and related device | |
US11796975B2 (en) | Network centric process control | |
CN111740972B (en) | Method, device, equipment and storage medium for updating communication protocol stack information | |
CN114185572A (en) | Data flashing method, device, equipment and storage medium | |
CN110333870B (en) | Simulink model variable distribution processing method, device and equipment | |
CN111611025A (en) | Equipment access method and device | |
CN116325703A (en) | Data format processing method and device | |
CN110618826A (en) | Method and device for updating application program and terminal equipment | |
CN111045740A (en) | MCU software parameter calibration method and system based on USBCAN | |
CN112732332B (en) | Software package management method and device suitable for koji management system and electronic equipment | |
CN115914429B (en) | Communication protocol adaptation method, device, electronic equipment, vehicle and storage medium | |
CN116578524B (en) | Multi-core controller, control method, vehicle control system and readable storage medium | |
CN113127397B (en) | Method and device for processing equipment hierarchical structure, electronic equipment and storage medium | |
CN107562463B (en) | Subprogram normalized definition and calling method of Ada programming language | |
CN117827853A (en) | Method and device for updating communication database information in AUTOSAR architecture software | |
CN112787862A (en) | Vehicle data flashing method and device based on gateway and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210806 |
|
RJ01 | Rejection of invention patent application after publication |