The AUTOSAR ARXML importer functions createComponentAsModel
and createCompositionAsModel
can import AUTOSAR software components with multiple
runnable entities into a new Simulink® model. Use the ModelPeriodicRunnablesAs
property on the model
creation to specify whether the importer models AUTOSAR periodic runnables as atomic
subsystems with periodic rates (the default) or function-call subsystems with periodic
rates.
If you set ModelPeriodicRunnablesAs
to the default value,
AtomicSubsystem
, the importer creates rate-based models. If the
ARXML code contains periodic runnables, the importer adds rate-based
model content, including atomic subsystems and data transfer lines with rate transitions, and
maps them to corresponding periodic runnables and IRVs imported from the AUTOSAR software
component.
If you set ModelPeriodicRunnablesAs
to
FunctionCallSubsystem
, the importer creates function-call-based models.
The importer adds function-call subsystem or function blocks and signal lines and maps them to
corresponding runnables and IRVs imported from the AUTOSAR software component.
Set ModelPeriodicRunnablesAs
to AtomicSubsystem
unless your design requires use of function-call subsystems. The following call directs the
importer to import a multi-runnable AUTOSAR software component and map it into a new
rate-based model:
addpath(fullfile(matlabroot,'examples','autosarblockset','data')) ar = arxml.importer('ThrottlePositionControlComposition.arxml') createComponentAsModel(ar,'/Company/Components/Controller',... 'ModelPeriodicRunnablesAs','AtomicSubsystem')
For more information, see Model AUTOSAR Software Components.
createComponentAsModel
| createCompositionAsModel