How to import MATLAB generated ARXML file.

10 次查看(过去 30 天)
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

回答(1 个)

Jinal
Jinal 2024-5-15
编辑:Jinal 2024-5-15
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.

类别

Help CenterFile Exchange 中查找有关 AUTOSAR Blockset 的更多信息

产品


版本

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by