Get list of the names of the variables in Simulink AUTOSAR code mapping editor

3 visualizaciones (últimos 30 días)
Hi I'm trying to generate a list of the names for the "functions", "inports", "outports", "parameters" etc in the AUTOSAR code mapping editor, not sure what api command I could use. I am using Matlab 2021b.

Respuestas (1)

Simran
Simran el 14 de Feb. de 2025
Editada: Simran el 14 de Feb. de 2025
I see you want to generate a list of names for "functions", "inports", "outports", "parameters", etc., in the AUTOSAR code mapping editor using the MATLAB 2021b.
You can follow these steps to do so:
1.) Firstly, you need to get the AUTOSAR code mapping object from the model. Use the below function to access its properties:
model = 'your_model_name'; % Replace with your model name
open_system(model);
arProps = autosar.api.getAUTOSARProperties(model);
2.) Next, use the “find” method to get the list of functions, inports, outports and parameters:
functions = find(arProps, 'Functions');
inports = find(arProps, 'Inports');
outports = find(arProps, 'Outports');
parameters = find(arProps, 'Parameters');
3.) Lastly to verify that the commands are correct, and you’ve retrieved the desired information, you can display your lists by running the following script:
disp('Functions:');
disp(functions);
disp('Inports:');
disp(inports);
disp('Outports:');
disp(outports);
disp('Parameters:');
disp(parameters);
Then you can go to the “Apps” tab in “Simulink” and open “AUTOSAR Component Designer”. You can then click on "Code Interface" to view your code mapping.
You can refer the following documentation links for more details:
On AUTOSAR blockset -
On AUTOSAR api -

Categorías

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

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