Autosar project configuration and implementation method based on xml file
Patent Information
- Application Number
- CN202311822887.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-27
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2043-12-27
AI Technical Summary
在AUTOSAR生态系统中,虽然目前有一些AUTOSAR工具同时支持手动配置和图形化配置两种方式,但是这些工具之间配置文件不同,AUTOSAR项目不具备普适性和快速移植性,并且处理模型的效率较低,导致软件人员在使用不同工具时存在重复性工作多、开发效率慢的问题,亟需一种统一的、高效的AUTOSAR项目配置和实现方法,以促进AUTOSAR更好的标准化和工具间的协同发展,提升AUTOSAR电子电气架构的设计和实现效率
[0014]1、本发明设计了一种通用的XML文件内容结构以存储AUTOSAR项目配置信息。该XML文件考虑了AUTOSAR项目手动配置信息和手动配置信息与可视化建模配置信息之间的映射关系,层次清晰,可读性强,能够促进AUTOSAR更好的标准化和工具间的协同发展,基于本发明创建和配置的AUTOSAR项目具有普适性和快速移植性。
Smart Images

Figure CN117785269B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer software technology and relates to a method for configuring and implementing AUTOSAR projects, specifically a method for configuring and implementing AUTOSAR projects based on XML files. Background Technology
[0002] As automobiles evolve towards intelligence and new energy, modern automotive electronic systems are becoming increasingly complex, leading to a growing demand for software reusability. Against this backdrop, the AUTOSAR standard offers a new approach to addressing this challenge. AUTOSAR is a standardized architecture for automotive electronic system development, aiming to promote reusability, scalability, and interoperability of automotive electronic systems by establishing a common automotive software platform. Through the AUTOSAR standard, major automakers have achieved the goals of "unified standards," "distributed implementation," and "centralized configuration," effectively reducing development costs for both automakers and suppliers. AUTOSAR fosters innovation and development across the entire automotive industry.
[0003] XML (Extensible Markup Language) is a markup language used to mark up the structure of electronic document data. It is a general-purpose, human-readable text format that is self-descriptive and allows users to define their own tags. The main goal of XML is to provide a unified way to describe and exchange structured data without relying on any specific hardware or software platform. Due to its advantages such as structured data, customizable tags, ease of parsing, and readability, XML files are frequently used as configuration files and storage files for various software applications.
[0004] There are two main methods for configuring AUTOSAR models: manual configuration and visual model configuration. Some AUTOSAR tools offer manual configuration interfaces, allowing users to directly edit or input configuration information. This method typically requires users to have a deep understanding of the AUTOSAR standard and be able to accurately input relevant parameters. Other AUTOSAR tools provide graphical modeling tools, allowing users to configure the AUTOSAR system by dragging and dropping components and connecting elements. These tools usually offer a more intuitive interface and reduce the need for manual input. While some AUTOSAR tools in the AUTOSAR ecosystem currently support both manual and graphical configuration methods, their configuration files differ, resulting in a lack of universality and rapid portability for AUTOSAR projects. Furthermore, their model processing efficiency is low, leading to repetitive work and slow development efficiency for software engineers using different tools. Therefore, a unified and efficient method for configuring and implementing AUTOSAR projects is urgently needed to promote better standardization of AUTOSAR and collaborative development among tools, thereby improving the design and implementation efficiency of AUTOSAR electrical and electronic architectures. Summary of the Invention
[0005] To address the aforementioned technical problems, this invention provides a method for configuring and implementing AUTOSAR projects based on XML files, specifically for AUTOSAR software tools. This invention stores AUTOSAR project configuration information in a custom XML file, designing the content structure of this XML file. It supports both manual and visual modeling configuration methods for AUTOSAR models, enabling efficient and accurate expression of AUTOSAR project configuration information within the custom XML. Furthermore, this invention provides a method for reading and modifying this XML file. Compared to traditional XML file processing methods, this invention offers greater versatility, higher efficiency, and a more intuitive and concrete logic for processing XML files. The AUTOSAR tool using this invention can efficiently and accurately store, express, and process AUTOSAR project configuration information, solving the problems of universality and rapid portability of AUTOSAR models.
[0006] The objective of this invention is achieved through the following technical solution:
[0007] An AUTOSAR project configuration and implementation method based on XML files includes the following steps:
[0008] Step S1: Design a custom XML file structure to store the configuration information of the AUTOSAR project. This structure supports both manual and visual modeling configuration methods for the AUTOSAR model. The custom XML file contains two sibling tags.<autosar-dictionary>and
[0009] <code-mappings>The former is responsible for storing the manually configured content of the AUTOSAR model, while the latter is responsible for storing the mapping relationship between the manually configured content of the AUTOSAR model and the visual modeling configuration content.
[0010] Step S2: Represent the XML file structure in the program source code: In the program source code that implements the AUTOSAR tool, each tag in the XML file is encapsulated as a class. The aggregation relationship between classes represents the hierarchical relationship between parent and child tags. The string member variables in the class represent the attribute values and tag values in the tag, and record the multiplicity of the tag.
[0011] Step S3: Read and display the content of the XML file: The content of the XML file is read into the software's runtime memory, providing two display interfaces: AUTOSAR Dictionary and AUTOSAR Mappings. The AUTOSAR Dictionary interface is responsible for displaying the manually configured content of the AUTOSAR model, i.e., the content in the XML file. <autosar-dictionary>The content under the tag, the AUTOSAR Mappings interface, is responsible for displaying the mapping relationship between the manually configured content of the AUTOSAR model and the visual modeling configuration content, i.e., the XML file. <code-mappings>Content under the tag;
[0012] Step S4: The user modifies the AUTOSAR project configuration information, and the AUTOSAR tool writes the results back to the AUTOSAR configuration file for persistent storage. Specifically, modifications made in the AUTOSAR Dictionary interface are written back to an XML file. <autosar-dictionary>Under the tag, modifications made to the AUTOSAR Mappings interface are written back to the XML file. <code-mappings>Under the tag.
[0013] Compared with the prior art, the present invention has the following advantages:
[0014] 1. This invention designs a universal XML file content structure to store AUTOSAR project configuration information. This XML file considers the manual configuration information of AUTOSAR projects and the mapping relationship between manual configuration information and visual modeling configuration information. It has a clear hierarchy, high readability, and can promote better standardization of AUTOSAR and collaborative development among tools. AUTOSAR projects created and configured based on this invention have universality and rapid portability.
[0015] 2. This invention uses object-oriented principles to process tags at all levels in XML files, which more naturally reflects the hierarchical relationships and logical structure of data, and improves the readability and maintainability of the code in the implementation of AUTOSAR tools.
[0016] 3. This invention combines manual configuration and visual modeling configuration methods in the model configuration process. Visual modeling tools are used to create the initial system framework and component connections, followed by manual configuration for more detailed adjustments and handling of special requirements. This invention integrates the advantages of both configuration methods, enabling the handling of complex AUTOSAR modeling configuration tasks, improving the efficiency and quality of automotive electronic architecture design. Storing configuration information in a universal XML file promotes better standardization of AUTOSAR and collaborative development among tools, demonstrating broad application prospects. Attached Figure Description
[0017] Figure 1 This is a flowchart illustrating the AUTOSAR project configuration and implementation method based on XML files according to the present invention.
[0018] Figure 2 The following diagrams define the XML file structure for storing AUTOSAR project configuration information as designed in this invention: (a) XSD schema definition diagram corresponding to the XML file structure designed in this invention; (b) Example diagram of the XML file structure designed in this invention; and (c) Design diagram of XML tag content for configuring Functions mapping information.
[0019] Figure 3 This is a flowchart illustrating the process of representing a certain tag in XML using program source code, as described in this invention.
[0020] Figure 4 This is a pseudocode diagram illustrating the process of loading the content of an XML file into the runtime memory of the software, based on the representation of the XML file content in the source code.
[0021] Figure 5 An AUTOSAR Dictionary interface diagram to support manual configuration of AUTOSAR models;
[0022] Figure 6 A screenshot of the AUTOSAR Mappings interface under the Functions tab, which supports AUTOSAR project configuration information mapping.
[0023] Figure 7 The interface diagram of AUTOSARMappings, which supports the mapping of configuration information for AUTOSAR projects, is shown under the Inports tab. Detailed Implementation
[0024] The technical solution of the present invention will be further described below with reference to the accompanying drawings, but it is not limited thereto. Any modifications or equivalent substitutions to the technical solution of the present invention that do not depart from the spirit and scope of the technical solution of the present invention should be covered within the protection scope of the present invention.
[0025] This invention provides a method for configuring and implementing AUTOSAR projects based on XML files. First, an XML file structure is designed to store AUTOSAR project configuration information, supporting both manual and visual modeling configuration methods. Then, the XML file structure is represented in the program source code, encapsulating each tag into a class and recording the hierarchical relationships and attribute values between tags. Next, the content of the XML file is read and displayed, loading the content into memory and providing two interfaces: AUTOSAR Dictionary and AUTOSAR Mappings. Finally, when the user modifies the AUTOSAR project configuration information, the AUTOSAR tool writes the results back to the XML file, achieving persistent storage. Figure 1 As shown, the specific process includes the following:
[0026] Step S1: Design a custom XML file structure to store the configuration information of the AUTOSAR project, supporting both manual configuration and visual modeling configuration of the AUTOSAR model.
[0027] In this step, the custom XML file mainly needs to contain two sibling tags. <autosar-dictionary>and <code-mappings>The former is responsible for storing the manually configured content of the AUTOSAR model, while the latter is responsible for storing the mapping relationship between the manually configured content of the AUTOSAR model and the visualization modeling configuration content.
[0028] Figure 2 The diagram shows a custom XML file structure design. (a) is the XSD schema definition diagram corresponding to the XML file structure designed in this invention. XSD (XML Schema Definition) is a language used to define the structure and data model of XML documents. XSD defines the elements allowed in an XML document, the order of elements, the data types of elements, and the attributes of elements, providing a standardized method for describing the structure, elements, and attributes of XML documents. (b) is an example diagram of the XML file structure designed in this invention, which conforms to the file format specified by XSD in (a). In the custom XML file:
[0029] (1) Tag <autosar>The root tag of the XML file represents the custom AUTOSAR project configuration information storage file of this invention, which contains... <autosar-dictionary>and <code-mappings>Two child tags.
[0030] (2) Label <autosar-dictionary>This section represents the content of the manually configured AUTOSAR model. Manual configuration allows users to directly edit or input configuration information, accurately inputting relevant parameters and providing high flexibility. It is suitable for users with in-depth knowledge of the AUTOSAR standard. For projects that wish to deeply customize the AUTOSAR configuration, manual configuration offers greater control. Furthermore, tags... <autosar-dictionary>Includes child tags <atomiccomponents> 、 <interfaces> 、 <methods>and <xml-options>, among which the tags <atomiccomponents>This represents the configuration information of atomic component models in the AUTOSAR model, including component name, component type, exported ARXML file name, AUTOSAR component port, runnable entities, and configuration information for variables and parameters between runnable entities; Tags <interfaces>This represents the configuration information of port interfaces in the AUTOSAR model, including S-RInterfaces (sender-receiver port interfaces), MS Interfaces (mode conversion interfaces), C-SInterfaces (client-server interfaces), NV Interfaces (non-volatile data interfaces), and Trigger-Interfaces (trigger interfaces); Tags <methods>This indicates configuration information related to calculation and addressing methods in AUTOSAR, including two configuration items: model calculation method and addressing method; Tags <xml-options>This section displays configuration information related to exporting the model as an ARXML file, including the export mode and path settings for each module. <autosar-dictionary>Each AUTOSAR project configuration item in the included information has an ID attribute, which serves as its unique identifier.
[0031] (3) Tags <code-mappings>This section is responsible for representing the mapping relationship between manually configured AUTOSAR models and visual modeling configurations. It includes configuration information for the Functions subsystem, Inports (input ports), Outports (output ports), Parameters, Data Stores, Signals States, Data Transfers, and Function Calls. Taking the Functions mapping configuration as an example... Figure 2 As shown in (c), its label <function-prototype>Records the configuration mapping information for a specific Function, where the ID attribute represents a unique identifier for that tag; <autosar-dictionary>Each configuration item within the tag has a unique ID. RUNNABLE-ENTITY-REF-ID represents a reference to the ID of a specific configuration item in the AUTOSAR manual configuration. <function-prototype>There are child tags under the tag. <source> , <source> This represents the path identifier of a configuration item in the AUTOSAR model visualization modeling configuration. It is determined by the RUNNABLE-ENTITY-REF-ID attribute value and... <source> The label values enable the mapping and binding between manual configuration and visual modeling configuration of the AUTOSAR model.
[0032] Step S2: Represent the XML file structure in the program source code: In the source code implementing the AUTOSAR tool, each tag in the XML file is encapsulated as a class. The aggregation relationship between classes represents the hierarchical relationship between parent and child tags. String member variables in the class represent the attribute values and tag values of the tags, recording the multiplicity of tags. The processing flow is as follows: Figure 3 As shown, the specific steps are as follows:
[0033] Step S201: For each tag in the XML file, define the corresponding class structure in the program source code, and design the class corresponding to the root node of the XML file as a singleton class. For example, for the tag in the XML file... <autosar>The root node label defines a class named AUTOSAR in the CPP program source code and defines the class as a singleton.
[0034] In this step, the Singleton pattern is a creational design pattern whose main purpose is to ensure that a class has only one instance and to provide a global access point to that instance. This pattern is typically used in scenarios where a globally shared access point is needed, such as managing configuration information, database connections, and logging.
[0035] Step S202: Based on the hierarchical relationship between tags in the XML file, process the aggregation relationship between classes in the program source code. All aggregated member variables within a class are pointer types. Specifically: in handling multiplicity, if the multiplicity of a sub-tag is 1, the corresponding multiplicity of the member variable in the program source code is 1; if the multiplicity of a sub-tag is greater than 1, the type of the member variable in the source code is a container type such as a vector, indicating that there are multiple member variables. For example, XML file tags... <autosar>It has two child tags <autosar-dictionary>and <code-mappings>If the multiplicity of this sub-tag is 1, then the corresponding AUTOSAR class in the CPP program source code has member variables of type AUTOSARDictionary* and CodeMappings*.
[0036] In this step, the aggregation relationship, in object-oriented programming, is a model representing the relationship between classes, where one class contains objects of another class. This relationship represents a "whole-part" relationship, where one class (the whole) contains objects of another class (the part). Aggregation is a weak relationship; the whole and the part have independent lifecycles, and the creation and destruction of one object does not affect the other object.
[0037] Step S203: Based on the attributes and tag values of the tags in the XML file, define string type member variables in the corresponding class of the program source code. In the XML file, tag elements can have attributes, which contain supplementary information about the element. Attributes appear in key-value pairs, consisting of an attribute name and an attribute value, and the attribute value must be enclosed in parentheses. In the custom XML configuration file designed in this invention, some tags have attributes named ID and NAME, representing the unique identifier and name of the XML tag element representing AUTOSAR configuration information, respectively. For example, the tag in this invention... <runnable-entity>If a tag has ID and NAME attributes, then the RunnableEntity class in the corresponding CPP program source code will have two string member variables named NAME and ID; if a tag has no child tags but has a tag value, for example... <period> 1< / period> If the tag value is 1, then the tag value is encapsulated as a string member variable in the class corresponding to the tag.
[0038] Step S204: Set corresponding setter and getter methods for all member variables of the class in the program source code. Setter and getter methods are a common way to access and modify private member variables of a class, used to set and retrieve the values of the member variables respectively. These methods allow you to add access control logic to the methods, ensuring that access to and modification of member variables is controlled and safe.
[0039] Step S3: Read and display the content of the XML file: The content of the XML file is read into the software's runtime memory, providing two display interfaces: AUTOSAR Dictionary and AUTOSAR Mappings. The AUTOSAR Dictionary interface is responsible for displaying the manually configured content of the AUTOSAR model, i.e., the content in the XML file. <autosar-dictionary>The content under the tag, the AUTOSAR Mappings interface, is responsible for displaying the mapping relationship between the manually configured content of the AUTOSAR model and the visual modeling configuration content, i.e., the XML file. <code-mappings>The content under the tag. The specific steps are as follows:
[0040] Step S301: Load the content of the XML file into the runtime memory corresponding to the program source code, use the algorithm based on XML tag node initialization of class member variables to load the attribute values and tag values of each tag in the XML file into the member variables of the class object corresponding to the source code program, and recursively process each sub-tag.
[0041] In this step, the `loadFromXMLElement(XMLElement* xMLElement)` method is implemented in the program source code within the classes corresponding to each tag in the XML file. This method automatically and structurally loads the tag values from the XML file into computer memory and initializes the member variables of the classes corresponding to the tags. The pseudocode for the algorithm of initializing class member variables based on XML tag nodes is as follows: Figure 4 As shown, its input is the tag node `xMLElement` in XML, and the output is empty. During the algorithm execution, it uses the information contained in the tag nodes in the XML file to initialize the values of each member variable in the class. The process is as follows: For each attribute of the node `xMLElement`, call the corresponding set method, with the parameter being the attribute value, and update the value of the member variable in the class; if the `xMLElement` node has no child nodes, call the corresponding set method, with the parameter being the text value contained in the node, and update the value of the member variable in the class; for child nodes of the `xMLElement` node with multiplicity of 1, create a new class object of the corresponding type of the child node, assign the new object to the member variable of the current class, and recursively call the algorithm for initializing class member variables based on XML tag nodes in the new object; for child nodes of the `xMLElement` node with multiplicity greater than 1, create a corresponding vector container type variable, then for each child node with multiplicity greater than 1, create a new class object of the corresponding type of the child node, add the object to the vector container, recursively call the algorithm for initializing class member variables based on XML tag nodes in the new object, and finally assign the vector container type variable to the member variable of the current class.
[0042] Step S302: Display the interface of the AUTOSAR Dictionary. For example... Figure 5 As shown, the AUTOSARDictionary displays the content manually configured by the user for the AUTOSAR model, and its information comes from the XML configuration file. <autosar-dictionary>The content under the tag includes atomic software components, port interfaces, addressing methods and computation methods, and ARXML file configuration items.
[0043] In this step, the content of the atomic software component section in the AUTOSAR Dictionary interface comes directly from the XML file. <atomiccomponents>Under the tag, configurations include component name, component type, AUTOSAR component port, runnable entity, variables and parameters between runnable entities; the port interface section of the AUTOSAR Dictionary interface is directly derived from the XML file. <interfaces>Under the tag; the information regarding addressing and calculation methods in the AUTOSAR Dictionary interface comes from an XML file. <methods>Under the tag; the ARXML file configuration item information in the AUTOSARDictionary interface comes from the XML file. <xml-options>Under the tag.
[0044] Step S303: Display the AUTOSAR Mappings interface. AUTOSAR Mappings displays the mapping between manual AUTOSAR model configuration and visual modeling configuration information. The information comes directly from the XML configuration file. <code-mappings>The various sub-tags under the main tag.
[0045] like Figure 6 The image shows the AUTOSAR Mappings interface, including configuration options for Functions, Inports, Outports, Parameters, Data Stores, Signals / States, DataTransfers, and Function Callers. This information is directly derived from the XML configuration file. <code-mappings>The various sub-tabs under the main AUTOSAR Mappings tab are responsible for setting the mapping relationship between manual AUTOSAR model configuration information and visual modeling configuration information. It's worth noting that the visual modeling configuration in AUTOSAR Mappings can come from various visual modeling language models, such as Modelica, Simulink, and UML.
[0046] Step S4: The user modifies the AUTOSAR project configuration information, and the AUTOSAR tool writes the result back to an XML file for persistent storage. Preferably, in the source code implementation, the display and modification of the AUTOSAR project configuration information adopts the observer design pattern. The classes corresponding to each tag in the XML file are the observed, and the AUTOSAR configuration interface (AUTOSARDictionary and AUTOSAR Mappings) are the observers. When the values in the classes corresponding to each tag in the XML file change, the observers are notified that the AUTOSAR configuration interface will automatically update. The specific steps are as follows:
[0047] Step S401: The user modifies the AUTOSAR Dictionary interface, and the modified content in the interface is automatically updated in the XML file during source code runtime. <autosar-dictionary>In the class object corresponding to the tag. For example, if the name attribute of a RunnableEntity is modified, the value of the name member variable in the class object corresponding to RunnableEntity in the CPP code will be updated.
[0048] Step S402: The user modifies the AUTOSAR Mappings interface, and the modified content in the interface is automatically updated to the XML file during source code runtime. <code-mappings>In the class object corresponding to the tag. Optionally, for the configuration of certain mapping items, it's not only necessary to... <code-mappings>Updating the information of the corresponding class object under the tag also requires updating the associated ones. <autosar-dictionary>The corresponding class object under the tag is updated. For example... Figure 7 The image shows the configuration page for the Inports tag in AUTOSARMappings. Source indicates the path source of the AUTOSAR model visualization modeling configuration information; Port indicates the path source of the AUTOSAR model manual configuration information. Setting these parameters modifies the XML file. <inport-prototype>The value of the RECEIVE-PORT-REF-ID attribute under the tag is important because this attribute represents a unique reference to a manually configured item in the AUTOSAR model within the XML file. <autosar-dictionary>There exists a descendant tag within the tag, whose ID attribute value is the same as... <inport-prototype>The RECEIVE-PORT-REF-ID attribute values under the tag are equal; Element represents the data element allowed to pass through the required port, and after the user sets it, the XML file is updated. <autosar-dictionary>Descendant tags <receiverport-prototype>The configuration information included.
[0049] Step S403: Write the runtime information of the source code corresponding to the XML file in the computer back to the XML configuration file to achieve persistent storage. < / methods> < / interfaces> < / atomiccomponents> < / autosar> < / autosar> < / methods> < / interfaces> < / atomiccomponents> < / methods> < / interfaces> < / atomiccomponents> < / autosar>
Claims
1. A method for configuring and implementing AUTOSAR projects based on XML files, characterized in that... The method includes the following steps: Step S1: Design a custom XML file structure to store the configuration information of the AUTOSAR project. This structure supports both manual and visual modeling configuration methods for the AUTOSAR model. The custom XML file contains two sibling tags. <autosar-dictionary>and <code-mappings> The former is responsible for storing the manually configured content of the AUTOSAR model, while the latter is responsible for storing the mapping relationship between the manually configured content of the AUTOSAR model and the visual modeling configuration content. Step S2: Represent the XML file structure in the program source code: In the program source code that implements the AUTOSAR tool, each tag in the XML file is encapsulated as a class. The aggregation relationship between classes represents the hierarchical relationship between parent and child tags. The string member variables in the class represent the attribute values and tag values in the tag, and record the multiplicity of the tag. Step S3: Read and display the content of the XML file: Read the content of the XML file into the software runtime memory, and provide two display interfaces: AUTOSAR Dictionary and AUTOSAR Mappings. The AUTOSAR Dictionary interface is responsible for displaying the manually configured content of the AUTOSAR model, and the AUTOSAR Mappings interface is responsible for displaying the mapping relationship between the manually configured content of the AUTOSAR model and the visual modeling configuration content. The specific steps are as follows: Step S301: Load the content of the XML file into the runtime memory corresponding to the program source code. Utilize the algorithm for initializing class member variables based on XML tag nodes to load the attribute values and tag values of each tag in the XML file into the member variables of the class object corresponding to the source code program, and recursively process each child tag. Specifically, the input to the algorithm is the tag node xMLElement in the XML, and the output is empty. During algorithm execution, the information contained in the tag nodes in the XML file is used to initialize the values of each member variable in the class. The specific process is as follows: For each attribute of the xMLElement node, call the corresponding set method, with the attribute value as the parameter, and update the value of the member variable in the class; if the xMLElement node has no child nodes... Then, the corresponding set method is called, with the text value contained in the node as the parameter, and the value of the member variable in the class is updated; for the child nodes of the xMLElement node with multiplicity of 1, a new class object of the corresponding type of the child node is created, and the new object is assigned to the member variable of the current class, and the algorithm for initializing class member variables based on XML tag nodes in the new object is recursively called; for the child nodes of the xMLElement node with multiplicity greater than 1, a corresponding vector container type variable is created, and then for each child node with multiplicity greater than 1, a new class object of the corresponding type of the child node is created, and the object is added to the vector container, and the algorithm for initializing class member variables based on XML tag nodes in the new object is recursively called, and finally the vector container type variable is assigned to the member variable of the current class; Step S302: Display the AUTOSAR Dictionary interface. The AUTOSAR Dictionary displays the content manually configured by the user for the AUTOSAR model, and its information comes from the XML configuration file. <autosar-dictionary> Content under the tag; Step S303: Display the AUTOSAR Mappings interface. AUTOSAR Mappings displays the mapping between manual AUTOSAR model configuration and visual modeling configuration information. The information comes directly from the XML configuration file. <code-mappings> The various sub-tags under the main tag; Step S4: The user modifies the AUTOSAR project configuration information, and the AUTOSAR tool writes the results to the AUTOSAR configuration file for persistent storage. Specifically, modifications made in the AUTOSAR Dictionary interface are written back to the XML file. <autosar-dictionary>Under the tag, modifications made to the AUTOSAR Mappings interface are written back to the XML file. <code-mappings> Under the tag.
2. The AUTOSAR project configuration and implementation method based on XML files according to claim 1, characterized in that... In step S1, the label <autosar-dictionary>Includes child tags <atomiccomponents> 、 <interfaces> 、 <methods>and <xml-options>, among which the tags <atomiccomponents>This indicates the configuration information of the atomic component models in the AUTOSAR model; tags <interfaces>This indicates the configuration information of the port interface in the AUTOSAR model; Tags <methods>This indicates configuration information related to the calculation and addressing methods in AUTOSAR; Tags <xml-options> This indicates configuration information related to exporting ARXML files from the model. < / methods> < / interfaces> < / atomiccomponents> < / methods> < / interfaces> < / atomiccomponents> 3. The AUTOSAR project configuration and implementation method based on XML files according to claim 2, characterized in that... The configuration information of the atomic component model includes the component name, component type, exported ARXML file name, AUTOSAR component port, runnable entity, and configuration of variables and parameters between runnable entities; the port interface configuration information includes the configuration information of S-RInterfaces, MS Interfaces, CS Interfaces, NV Interfaces and Trigger-Interfaces; the configuration information related to the calculation method and addressing method includes two configuration contents: model calculation method and addressing method; the configuration information related to the model export ARXML file includes the mode of exporting ARXML file and the path settings of each module.
4. The AUTOSAR project configuration and implementation method based on XML files according to claim 1, characterized in that... In step S1, the label <code-mappings> This includes configuration information for the Functions subsystem, Inports input ports, Outports output ports, Parameters parameters, Data-Stores data storage, Signals-States signal states, Data-Transfers data transfer, and Function-Callers function calls.< / code-mappings> 5. The AUTOSAR project configuration and implementation method based on XML files according to claim 1, characterized in that... The specific steps of step S2 are as follows: Step S201: For each tag in the XML file, define the corresponding class structure in the program source code, and design the class corresponding to the root node of the XML file as a singleton class; Step S202: Based on the hierarchical relationship between tags in the XML file, process the aggregation relationship between classes in the program source code. The aggregated member variables in the class are all pointer types. In the process of handling multiplicity, if the multiplicity of a child tag is 1, then the multiplicity of the corresponding member variable in the program source code is 1; if the multiplicity of a child tag is greater than 1, then the type of the member variable in the source code is a vector container type, indicating that there are multiple member variables. Step S203: Based on the attributes and tag values of the tags in the XML file, define string type member variables in the class corresponding to the program source code; Step S204: Set the corresponding set and get methods for all member variables of the class in the program source code.
6. The AUTOSAR project configuration and implementation method based on XML files according to claim 1, characterized in that... The specific steps of step S4 are as follows: Step S401: The user modifies the AUTOSAR Dictionary interface, and the modified content in the interface is automatically updated in the XML file during source code runtime. <autosar-dictionary> In the class object corresponding to the tag;< / autosar-dictionary> Step S402: The user modifies the AUTOSAR Mappings interface, and the modified content in the interface is automatically updated to the XML file during source code runtime. <code-mappings> In the class object corresponding to the tag;< / code-mappings> Step S403: Write the runtime information of the source code corresponding to the XML file in the computer back to the XML configuration file to achieve persistent storage.
Citation Information
Patent Citations
Method for establishing data flow integration model by using UML and XML mapping
CN105988786A
ARXML file generation method and device, equipment and storage medium
CN114691132A