Published: January 25, 2022 |
Sven Siemon, Technical Author, R&D Governance & Competence Partners, dSPACE GmbH
The desire for automation has been driving people for thousands of years. Even in ancient Greece and Egypt, people were already working on ideas to automate recurring tasks and thus achieve greater efficiency. Automation was initially limited to machines and production for a long time, but the spread of personal computers and the Internet brought automation to the office floor as well. In the meantime, automation has become an important process for increasing efficiency, easing the burden on employees, positively influencing the desired result, and saving time for creativity and innovation. At dSPACE, we always try to work closely with our customers to identify processes that can be automated and offer targeted solutions for them. Therefore, we have developed a rule-based merge for dSPACE AUTOSAR Compare that automatically copies elements from one file to another. With rule-based merging, the time-consuming and error-prone work of copying individual AUTOSAR elements and properties is a thing of the past.
The element-based merging approach of dSPACE AUTOSAR Compare provides our customers with an easy and intuitive way to copy selected AUTOSAR elements, sub-elements, and properties. With rule-based merging, this feature is catapulted to the next level, allowing the complete merge process to be automated in a rule-based way that can be entirely controlled from the Command Prompt window.
Figure 1: Different package structure of your project and the supplier.
You have commissioned a supplier to fill the internal behavior of a software component with content. However, the supplier uses a different package structure than you do in your project. To copy the internal behavior into your software component, you can use the rule-based merge of dSPACE AUTOSAR Compare. For this, you need to create a corresponding rule configuration file.
Figure 2: Structure of a rule configuration file.
The rule configuration file specifies the rules for the automated merge process. You can use the MergeFromTargetLink.xrs demo file as a template in the RuleSets subfolder of your dSPACE AUTOSAR Compare installation path. The associated schema file RuleSet_1-0-0.xsd is located in the Schemas subfolder.
Figure 3: Global query to determine your project file.
First, you must determine which of the files is your project file. As your project contains packages that are not in the supplier's file, you can use a query that looks for an element with type ARPackage and name SwComponentTypes.
Figure 4: Match rule to search for elements.
Second, you must find the software components whose internal behavior is to be copied. Since the supplier uses a different package structure, a match must be established. For this, we create a MatchRule that searches for elements of the type ApplicationSwComponentType and matches them based on their ShortName property.
Figure 5: Matching in the dSPACE AUTOSAR Compare UI.
In an iterative process, you can test your rule configuration file in the UI by using the Match With context menu command. In figure 7, a gray copy is shown next to the desired element and you can see both software components and their internal behaviors.
Figure 6: Work item to copy the internal behavior.
Finally, you must copy the internal behavior of the supplier’s file to your project file. For this, you can use a WorkItem that uses the global query and the matching rule to search for the relevant elements.
Figure 7: Result of the rule-based merge.
You can perform a rule-based merge in the UI to verify that the supplier’s internal behavior is correctly copied to your software component.
If everything is copied correctly, you can use dSPACEAutosarCompare.Console.exe to perform the rule-based merge process without displaying the UI in fully automated scenarios. Refer to the user documentation for more information on the command line interface of dSPACE AUTOSAR Compare.
Increasing efficiency, easing the burden on employees, positively impacting the desired outcome and focusing on creativity and innovation are core drivers of the desire for further automation. At dSPACE, we believe that the more powerful technologies become, the more efficiency and cost savings they can bring to companies. For this reason, we always try to further develop our products in close cooperation with our customers to overturn held beliefs of «we will never automate that». Please do not hesitate to contact us to discuss your needs and wishes for our solutions.
Drive innovation forward. Always on the pulse of technology development.
Subscribe to our expert knowledge. Learn from our successful project examples. Keep up to date on simulation and validation. Subscribe to/manage dSPACE direct and aerospace & defense now.