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

3 visualizaciones (últimos 30 días)
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.

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 9 de Ag. de 2022
Editada: MathWorks Support Team el 9 de Ag. de 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.

Más respuestas (0)

Categorías

Más información sobre AUTOSAR Blockset en Help Center y File Exchange.

Etiquetas

Aún no se han introducido etiquetas.

Productos


Versión

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by