How to import MATLAB generated ARXML file.
20 views (last 30 days)
Show older comments
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
0 Comments
Answers (1)
Jinal
on 15 May 2024
Edited: Jinal
on 15 May 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.
0 Comments
See Also
Categories
Find more on AUTOSAR Blockset in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!