How to map easily the new interface from Simulink model elements to AUTOSAR component elements whenever adding/deleting bus ports in the existed model?

4 visualizzazioni (ultimi 30 giorni)
When I develop with the following general workflow in the actual development model, tens of hundreds of interface modifications are changed, and adding/deleting bus ports by hand every time is very inefficient and increases the possibility of human error.
1. Add a new Simulink Bus port in the existed model
2. Define Data Element regarding the newly added Bus port in the AUTOSAR Dictionary which graphically configures an AUTOSAR software component
3. Match the Element between ports in Code Mappings Editor which is a graphical interface for mapping AUTOSAR elements for code generation
4. Click the Validate button in the Code Mapping editor
Without following the above workflow, I get the following error when trying to validate the AUTOSAR component configuration after I added Bus ports additionally to the existed model.
Simulink Port 'Model/In_Bus_Element3' and Simulink Port 'Model/In_Bus_Element2' both define the Data Element/Operation/Event 'SigXYZ_2' of Interface '/pkg/Interface/XYZ' for AUTOSAR Port 'XYZ'. You must change one of these specifications or remove one of the Simulink ports. 
Therefore, we need a functionality that can automatically perform the process.

Risposta accettata

MathWorks Support Team
MathWorks Support Team il 9 Ago 2022
Modificato: MathWorks Support Team il 9 Ago 2022
To generate and map the new interface for bus ports, either call function autosar.api.create to update the model mapping or press Ctrl+B to generate model code (requires Embedded Coder). You can see the explanation in the following documentation.

Più risposte (0)

Categorie

Scopri di più su AUTOSAR Blockset in Help Center e File Exchange

Tag

Non è stata ancora inserito alcun tag.

Prodotti


Release

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by