How to import MATLAB generated ARXML file.

10 visualizaciones (últimos 30 días)
Varun Singh
Varun Singh el 14 de Mayo de 2024
Editada: Jinal el 15 de Mayo de 2024
Hello,
I have created a SIMULINK model using AUTOSAR architecture blockset and generated ARXML code from it.
I need to import same model using import commands but it is throughing errors. Is it possible to do so?
If yes what is the correct process and commands required.
Regards,
Varun Singh

Respuestas (1)

Jinal
Jinal el 15 de Mayo de 2024
Editada: Jinal el 15 de Mayo de 2024
Hi Varun,
You can use the "arxml.importer" functions to import AUTOSAR software components, compositions or packages from the generated ARXML file into Simulink.
First, you can parse the ARXML code by passing the ARXML filename to "arxml.importer" function. Then, using the functions provided by the returned object, you can import an AUTOSAR component or composition into Simulink.
A sample code for creating an "arxml.importer" object and then using it to import an AUTOSAR software component is given below:
ar = arxml.importer('mycomponent.arxml');
% get list of components present in the arxml file
names = getComponentNames(ar);
% import a software component and create an initial Simulink representation of the component.
createComponentAsModel(ar, '/component/path','sampleComponent','mySubsystem');
To know more you can refer to the following documentation.

Categorías

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

Productos


Versión

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by