Automobile UDS software automatic generation method and system, electronic equipment and medium
By automatically generating automotive UDS software, using Python scripts and ISOLAR interface functions to process configuration information in xlsx tables, and generate AUTOSAR standard configuration files, solving the problems of low development efficiency and repetitive work in the existing technology, and achieving simplified development Process and efficiency improvement.
Patent Information
- Application Number
- CN202410877285.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-02
- Publication Date
- 2024-11-29
AI Technical Summary
The existing automotive UDS software development workload is large, there are many repetitive work, and the diagnostic requirements of different models and components are complex and different, resulting in low development efficiency.
Generate xlsx forms by obtaining the configuration information of DCM and DEM filled in by customer needs, use Python scripts to read the table information to generate arxml file and C language code, and generate BSW code through ISOLAR interface function, and finally compile and generate automotive UDS software.
It greatly reduces the workload of developers, simplifies the development process, reduces duplicate work, improves development efficiency, and reduces the risk of manual configuration errors.
Smart Images

Figure CN119045792A_ABST
Abstract
Description
Background Art
[0002] Existing automotive UDS software development mostly configures arxml files through the graphical interface of foreign supplier tools such as Da Vinci or ISOLAR, and uses the code generated by their tools.
[0003] The automotive UDS diagnostic requirements for different models and components are becoming increasingly complex and very different, resulting in a large workload and a lot of repetitive work in automotive UDS software development. Summary of the invention
[0004] In order to overcome the problems of heavy workload and much repetitive work in the existing automobile UDS software development, the present invention provides an automobile UDS software automatic generation method, system, electronic equipment and medium.
[0005] In a first aspect, in order to solve the above technical problems, the present invention provides a method for automatically generating automobile UDS software, comprising:
[0006] Get the xlsx table corresponding to the DCM and DEM configuration information filled in according to customer requirements;
[0007] The Python script is used to read the DCM configuration information in the xlsx table to generate the DCM.arxml file and the C language code corresponding to the DTC variable, and the DEM configuration information in the xlsx table is read to generate the DEM.arxml file;
[0008] Read the DEM.arxml file and DCM.arxml file by calling the interface function reading function provided by ISOLAR to generate BSW code;
[0009] Compiling the BSW code and the C language code generates automotive UDS software.
[0010] In a second aspect, the present invention provides an automotive UDS software automatic generation system, comprising:
[0011] Configuration information acquisition module, used to obtain the configuration information of DCM and DEM and generate xlsx tables according to customer needs;
[0012] The arxml file determination module is used to read the configuration information of DCM in the xlsx table through a Python script to generate a DCM.arxml file and C language code, and to read the configuration information of DEM in the xlsx table to generate a DEM.arxml file;
[0013] BSW code generation module, used to read DEM.arxml file and DCM.arxml file by calling the interface function provided by ISOLAR to generate BSW code;
[0014] The automobile UDS software generation module is used to compile the BSW code and the C language code to generate the automobile UDS software.
[0015] In a third aspect, the present invention provides a computing device, including a memory, a processor, and a program stored in the memory and running on the processor, and when the processor executes the program, the steps of the above-mentioned method for automatically generating automobile UDS software are implemented.
[0016] In a fourth aspect, the present invention provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a terminal device, the terminal device executes the steps of the above-mentioned method for automatically generating automobile UDS software.
[0017] The beneficial effects of the present invention are as follows: by obtaining the xlsx table corresponding to the configuration information of the DCM and DEM filled in according to the customer's needs, the DCM configuration information and the DEM configuration information in the xlsx table can be read through the Python script, thereby generating the arxml file (DCM.arxml file and DEM.arxml file) and the C language code corresponding to the DTC variable, and finally reading the DEM.arxml file and the DCM.arxml file by calling the interface function provided by ISOLAR, generating the BSW code, and generating the automotive UDS software in combination with the C language code. The present application automatically generates the AUTOSAR standard configuration file arxml according to the xlsx table, greatly reducing the workload of developers, simplifying the development process, and reducing the repetitive work of developers. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0019] Figure 1 A schematic diagram of a flow chart of a method for automatically generating automotive UDS software according to an embodiment of the present invention;
[0020] Figure 2 It is a schematic diagram of the structure of the automobile UDS software automatic generation system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0021] The following examples are provided to further explain and supplement the present invention and do not constitute any limitation to the present invention.
[0022] The following describes the method, system, electronic device and medium for automatically generating automobile UDS software according to the embodiments of the present invention in conjunction with the accompanying drawings.
[0023] like Figure 1 As shown, the present invention provides a method for automatically generating automobile UDS software, comprising:
[0024] S1. Obtain the xlsx table corresponding to the DCM and DEM configuration information filled in according to customer requirements.
[0025] S2. Read the DCM configuration information in the xlsx table through the Python script to generate the DCM.arxml file and the C language code corresponding to the DTC variable, and read the DEM configuration information in the xlsx table to generate the DEM.arxml file.
[0026] S3. Read the DEM.arxml file and DCM.arxml file by calling the interface function provided by ISOLAR to generate BSW code.
[0027] S4. Compile the BSW code and the C language code to generate automotive UDS software.
[0028] In this embodiment, the xlsx table corresponding to the configuration information of DCM and DEM filled in according to customer needs is obtained, and the DCM configuration information and DEM configuration information in the xlsx table can be read through the Python script to generate the arxml file (DCM.arxml file and DEM.arxml file) and the C language code corresponding to the DTC variable. Finally, the DEM.arxml file and DCM.arxml file are read by calling the interface function provided by ISOLAR, and the BSW code is generated, and the automotive UDS software is generated in combination with the C language code. This application automatically generates the AUTOSAR standard configuration file arxml according to the xlsx table, which greatly reduces the workload of developers, simplifies the development process, and reduces the repetitive work of developers.
[0029] In this embodiment, DCM refers to a Diagnostic Communication Manager diagnostic communication management module based on AUTOSAR regulations.
[0030] In this embodiment, DEM refers to a Diagnostic Event Manager diagnostic event management module based on AUTOSAR regulations.
[0031] In this embodiment, DTC refers to a Diagnostic Trouble Code.
[0032] In this embodiment, the Python script is the introduced python openpyxl package, which reads the xlsx table storing the configuration information, and generates the DCM.arxml file and the DEM.arxml file according to the standard with reference to the AUTOSAR 4.2.2 standard document. For the DSD (diagnostic service scheduling module) in the DCM, it is generated as fixed content according to ISO14229-2.
[0033] In this embodiment, after reading the DCM configuration information and D EM configuration information in the xlsx table through the Python script, other fixed C language codes will be generated, such as anti-shake algorithm, initialization, fault enable condition check function and UDS main function.
[0034] In this embodiment, the AUTOSAR standard configuration file arxml is automatically generated according to the xlsx table, and the corresponding UDS module is generated, which greatly reduces the workload of developers, simplifies the development process, greatly reduces the repetitive work of developers, reduces the error probability during manual configuration, and increases development efficiency.
[0035] Optionally, the configuration information of the DCM includes a DTC code, an error reading interface name, an error value, an error check step, an error threshold, an error recovery step and a recovery threshold;
[0036] The Python script reads the DCM configuration information in the xlsx table to generate the DCM.arxml file, including:
[0037] Use Python script to read the DTC code in the xlsx table, error reading interface name, error value, error check step, error threshold, error recovery step and recovery threshold, and generate DCM configuration data;
[0038] The DCM configuration data is written into an arxml file to generate a DCM.arxml file.
[0039] In this embodiment, by storing the DCM configuration data to be configured in the xlsx table in advance, the configuration information of the DCM can be directly read by calling the Python script, and the relevant configuration can be automatically generated, which greatly reduces the workload of developers.
[0040] Optionally, the configuration information of the DCM further includes a freeze frame and extended data;
[0041] The Python script reads the DCM configuration information in the xlsx table and generates the DCM.arxml file, which also includes:
[0042] Read the freeze frame and extended data in the xlsx table through Python script to generate DTCAttribute;
[0043] The DTCAttribute is mapped into the DCM configuration data.
[0044] In this embodiment, DTCAttribute refers to the DTC attribute specified in Autosar, including storage mode, fault priority and other information.
[0045] In this embodiment, the freeze frame includes DID identification data (Data Identification) required for the freeze frame.
[0046] In this embodiment, the extended data includes data length, offset and amplification factor.
[0047] In this embodiment, a Python script is used to read the contents in the xlsx table to automatically generate DTCAttribute, and automatically map the DTCAttribute to the corresponding DTC configuration data, so as to generate a DCM.arxml file with corresponding contents, which greatly reduces the workload of developers.
[0048] Optionally, the DTC variables include an error flag, an error counter, an error calibration switch, an error calibration value, an error check step, an error recovery step, an error threshold, a recovery threshold and an error recoverable flag.
[0049] In this embodiment, it is also necessary to assign an initial value to the above-mentioned DTC variable.
[0050] In addition, after obtaining the above DTC variables, two error reading methods need to be generated through Python scripts. One is to read the error calibration value when the error calibration switch is effective, and the other is to read the error flag from other modules through the configured error reading function. All codes are concentrated in the error update function UpdateError, and finally called in the main function of the UDS (Unified Diagnostic Service) module.
[0051] Optionally, the configuration information of the DEM includes an aging threshold, a DTC storage timing, a freeze frame extended data trigger timing, a storage condition, an update time, routine information, and DID information;
[0052] The configuration information of DEM in the xlsx table is read through Python script. The DEM.arxml file includes:
[0053] The aging threshold, DTC storage timing, freeze frame extended data trigger timing, storage conditions, update time, routine information and DID information in the xlsx table are read through the Python script to generate DEM configuration data;
[0054] The DEM configuration data is written into an arxml file to generate a DEM.arxml file.
[0055] In this embodiment, the configuration routine information includes the number of input parameters and the number of output parameters.
[0056] In this embodiment, the DID information configured includes data length, data type, data arrangement method and data reading method.
[0057] In addition, a DID reading function interface can be generated according to the DID information configured in the DEM.arxml file, and its specific implementation needs to be filled in manually.
[0058] The routine function interface can be generated according to the routine information configured in the DEM.arxml file, and the specific implementation needs to be manually written according to the requirements.
[0059] like Figure 2 As shown, the present invention provides an automobile UDS software automatic generation system, comprising:
[0060] Configuration information acquisition module, used to obtain the xlsx table corresponding to the DCM and DEM configuration information filled in according to customer requirements;
[0061] The arxml file determination module is used to read the configuration information of DCM in the xlsx table through a Python script to generate a DCM.arxml file and C language code corresponding to the DTC variable, and to read the configuration information of DEM in the xlsx table to generate a DEM.arxml file;
[0062] BSW code generation module, used to read DEM.arxml file and DCM.arxml file by calling the interface function provided by ISOLAR to generate BSW code;
[0063] The automobile UDS software generation module is used to compile the BSW code and the C language code to generate the automobile UDS software.
[0064] The configuration information of the DCM includes DTC code, error reading interface name, error value, error check step, error threshold, error recovery step and recovery threshold;
[0065] The arxml file determines the module, which is specifically used for:
[0066] Use Python script to read the DTC code in the xlsx table, error reading interface name, error value, error check step, error threshold, error recovery step and recovery threshold, and generate DCM configuration data;
[0067] The DCM configuration data is written into an arxml file to generate a DCM.arxml file.
[0068] Optionally, the configuration information of the DCM further includes a freeze frame and extended data;
[0069] The arxml file determines the module and is also used to:
[0070] Read the freeze frame and extended data in the xlsx table through Python script to generate DTCAttribute;
[0071] The DTCAttribute is mapped into the DCM configuration data.
[0072] Optionally, the configuration information of the DEM includes an aging threshold, a DTC storage timing, a freeze frame extended data trigger timing, a storage condition, an update time, routine information, and DID information;
[0073] The arxml file determines the module, which is specifically used for:
[0074] The aging threshold, DTC storage timing, freeze frame extended data trigger timing, storage conditions, update time, routine information and DID information in the xlsx table are read through the Python script to generate DEM configuration data;
[0075] The DEM configuration data is written into an arxml file to generate a DEM.arxml file.
[0076] The embodiment of the present invention also provides a computing device, including a memory, a manager, and a program stored in the memory and running on the manager. When the manager executes the program, some or all steps of the above-mentioned method for automatically generating automobile UDS software are implemented.
[0077] Among them, the computing device can be a computer, and correspondingly, its program is computer software. The above-mentioned parameters and steps in the computing device of the present invention can refer to the parameters and steps in the embodiment of the automatic generation method of automobile UDS software in the above text, and will not be repeated here.
[0078] Those skilled in the art know that the present invention can be implemented as a system, method or computer program product. Therefore, the present disclosure can be specifically implemented in the following forms, namely: it can be complete hardware, it can be complete software (including firmware, resident software, microcode, etc.), or it can be a combination of hardware and software, generally referred to as "circuit", "module" or "system" herein. In addition, in some embodiments, the present invention can also be implemented in the form of a computer program product in one or more computer-readable media, and the computer-readable medium contains computer-readable program code. Computer-readable storage media can be, for example, but not limited to - electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any combination of the above.
[0079] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0080] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. The method for automatically generating automobile UDS software is characterized by: include: Get the xlsx table corresponding to the DCM and DEM configuration information filled in according to customer requirements; The Python script is used to read the DCM configuration information in the xlsx table to generate the DCM.arxml file and the C language code corresponding to the DTC variable, and the DEM configuration information in the xlsx table is read to generate the DEM.arxml file; By calling the interface function provided by ISOLAR to read the DEM.arxml file and DCM.arxml file, BSW code is generated; Compiling the BSW code and the C language code generates automotive UDS software.
2. The method according to claim 1, characterized in that The configuration information of the DCM includes DTC code, error reading interface name, error value, error check step, error threshold, error recovery step and recovery threshold; The Python script reads the DCM configuration information in the xlsx table to generate the DCM.arxml file, including: Use Python script to read the DTC code in the xlsx table, error reading interface name, error value, error check step, error threshold, error recovery step and recovery threshold, and generate DCM configuration data; The DCM configuration data is written into an arxml file to generate a DCM.arxml file.
3. The method according to claim 2, characterized in that The configuration information of the DCM also includes freeze frames and extended data; The Python script reads the DCM configuration information in the xlsx table and generates the DCM.arxml file, which also includes: Read the freeze frame and extended data in the xlsx table through Python script to generate DTCAttribute; The DTCAttribute is mapped into the DCM configuration data.
4. The method according to claim 3, characterized in that: The DTC variables include an error flag, an error counter, an error calibration switch, an error calibration value, an error check step length, an error recovery step length, an error threshold, a recovery threshold and an error recoverable flag.
5. The method according to claim 1, characterized in that The configuration information of the DEM includes aging threshold, DTC storage timing, freeze frame extended data triggering timing, storage conditions, update time, routine information and DID information; The configuration information of DEM in the xlsx table is read through Python script. The DEM.arxml file includes: The aging threshold, DTC storage timing, freeze frame extended data trigger timing, storage conditions, update time, routine information and DID information in the xlsx table are read through the Python script to generate DEM configuration data; The DEM configuration data is written into an arxml file to generate a DEM.arxml file.
6. The automotive UDS software automatic generation system is characterized by: include: Configuration information acquisition module, used to obtain the configuration information of DCM and DEM and generate xlsx tables according to customer needs; The arxml file determination module is used to read the configuration information of DCM in the xlsx table through a Python script to generate a DCM.arxml file and C language code corresponding to the DTC variable, and to read the configuration information of DEM in the xlsx table to generate a DEM.arxml file; BSW code generation module, used to read DEM.arxml file and DCM.arxml file by calling the interface function provided by ISOLAR to generate BSW code; The automobile UDS software generation module is used to compile the BSW code and the C language code to generate the automobile UDS software.
7. The system according to claim 6, characterized in that The configuration information of the DCM includes DTC code, error reading interface name, error value, error check step, error threshold, error recovery step and recovery threshold; The arxml file determines the module, which is specifically used for: Use Python script to read the DTC code in the xlsx table, error reading interface name, error value, error check step, error threshold, error recovery step and recovery threshold, and generate DCM configuration data; The DCM configuration data is written into an arxml file to generate a DCM.arxml file.
8. The method according to claim 7, characterized in that The configuration information of the DCM also includes freeze frames and extended data; The arxml file determines the module and is also used to: Read the freeze frame and extended data in the xlsx table through Python script to generate DTCAttribute; The DTCAttribute is mapped into the DCM configuration data.
9. A computing device comprising a memory, a processor, and a program stored in the memory and running on the processor, characterized in that: When the processor executes the program, the steps of the method for automatically generating automobile UDS software as described in any one of claims 1 to 5 are implemented.
10. A computing device comprising a memory, a processor, and a program stored in the memory and running on the processor, characterized in that: When the processor executes the program, the steps of the method for automatically generating automobile UDS software as described in any one of claims 1 to 5 are implemented.
Citation Information
Cited By
Automobile data file conversion method and system, storage medium and electronic equipment
CN120276717A
