arxml
File Import: Flexibly model imported periodic, asynchronous, and initialization runnablesThe AUTOSAR arxml
importer now supports AUTOSAR
modeling styles for which Simulink® modeling support was added
in R2016b. For example, you can
Import periodic and asynchronous runnables in a JMAAB type beta modeling configuration. The modeling style is described in Add Top-Level Asynchronous Trigger to Periodic Rate-Based System (Embedded Coder).
Import an initialize runnable, which the importer now represents with a Simulink Initialize Function block.
To import an AUTOSAR software component with multiple runnable
entities into a Simulink model, you use the arxml
importer
method createComponentAsModel
. As part of improved
runnable modeling, the createComponentAsModel
method
now provides the property ModelPeriodicRunnablesAs
,
which replaces the property CreateInternalBehavior
.
At model creation time, set ModelPeriodicRunnablesAs
to
one of these values:
AtomicSubsystem
(default) —
Import AUTOSAR periodic runnables found in arxml
files.
Model periodic runnables as atomic subsystems with periodic rates
in a rate-based model. If conditions prevent use of atomic subsystems,
the importer throws an error.
FunctionCallSubsystem
—
Model periodic runnables as function-call subsystems with periodic
rates.
Auto
— Attempt to model
periodic runnables as atomic subsystems. If conditions prevent use
of atomic subsystems, model periodic runnables as function-call subsystems.
Set ModelPeriodicRunnablesAs
to AtomicSubsystem
unless
your design requires use of function-call subsystems. The following
call directs the importer to import a multirunnable AUTOSAR software
component and map it into a new rate-based model.
obj = arxml.importer('mySWC.arxml') createComponentAsModel(obj,'/pkg/swc/ASWC','ModelPeriodicRunnablesAs','AtomicSubsystem')
For more information, see Import AUTOSAR Software Component (Embedded Coder) and Model AUTOSAR Software Components (Embedded Coder).
Importing AUTOSAR DESC information associated with an AUTOSAR
identifiable element now populates the Description property
in the corresponding Simulink element or data object. Correspondingly,
exporting a Simulink element or data object Description property
now populates the DESC information in the corresponding AUTOSAR element.
Previously, Embedded Coder® preserved AUTOSAR DESC information
across arxml
round-trips but did not leverage the
information to add a readable text description to the Simulink model.
For example, suppose that you open the example model rtwdemo_autosar_swc_slfcns
and
add a description to the Simulink Function block read_data
.
Use the block properties dialog.
When you export arxml
for the model, the
generated runnable description contains the Simulink description
text.
<RUNNABLE-ENTITY UUID="..."> <SHORT-NAME>Runnable_readData</SHORT-NAME> <DESC> <L-2 L="FOR-ALL">Read data function for ASWC</L-2> </DESC> ... <SYMBOL>readData</SYMBOL> </RUNNABLE-ENTITY>
Note: This support is available to R2015b, R2016a, and R2016b Embedded Coder customers by installing the latest AUTOSAR support package for your release:
|
Previously, for an AUTOSAR model, the name for local temporary
variables in the generated code was tmp
. In R2017a,
the name is tmp
plus an identifier associated with
the data access mode of the variable, such as IRead
or IWrite
.
For example, in R2017a, the name of a local temporary variable with
an ImplicitReceive
data access mode is tmpIRead
.
R2017a adds release notes and workflow overview documentation to the Embedded Coder Support Package for AUTOSAR Standard. The release notes describe AUTOSAR support changes from the current release back through R2014b. Other help topics provide an overview of AUTOSAR workflows, with links to the main AUTOSAR (Embedded Coder) help.
After you install the support package, restart MATLAB®,
open help (for example, with the MATLAB doc
command),
and go to the Hardware Support section. To access release notes and
other help topics, click the link Embedded Coder Support Package for AUTOSAR Standard.
arxml
filesThe arxml
importer function updateModel
updates
an AUTOSAR model with changes specified in arxml
files.
The updateModel
function automatically adds Simulink blocks
and signal lines to represent AUTOSAR elements, modifies AUTOSAR properties,
and updates Simulink-to-AUTOSAR mapping. For more information,
see Import AUTOSAR Software Component Updates (Embedded Coder).
In Version 17.1.1, the updateModel
function
now automates insertion and mapping of the following elements:
Inter-runnable variable (IRV) lines for AUTOSAR IRVs
Constant blocks for AUTOSAR parameters
Data store memory (DSM) blocks for AUTOSAR per-instance memory (PIM) blocks
Previously, these elements required manual additions to the model.
Model updates also now resize added Function Caller, Constant, and DSM blocks so that block text is readable.
Version 17.1.1 provides the following arxml
importer
enhancements:
The importer now correctly creates function-call subsystems with large subsystems (for example, greater than 800 ports). Previously, the importer generated the following error:
Error using autosar.mm.mm2sl.SLModelBuilder/setIdealBlockPosition (line 110) At least one value is out of range for defining rectangle or position. All values must be less than or equal to 32767.
The importer now correctly imports a configuration in which multiple InitValues have ValueSpecifications with the same short label name. Previously, when ValueSpecification short labels had the same name, the importer could import incorrect initial values.
The importer now correctly imports InvalidValues with a UnitReference. Previously, the importer displayed an error similar to the following:
Error using Simulink.metamodel.arplatform.ArxmlImporter/read Assertion failed: MetaClass Simulink.metamodel.types.LiteralReal does not have property Unit at b:\matlab\src\arxml_util\arxml\arxmlreadtransformer4p0.cpp:10444
The importer now supports import of NumericalValueSpecifications with Value NaN. Previously, the importer generated an error message.
The importer now supports import of ImplementationDataTypes of category TYPE_REFERENCE that do not specify a CompuMethod. Previously, the importer required that both the parent and the referenced ImplementationDataType specify a CompuMethod.
Version 17.1.2 provides the following arxml
importer
enhancement:
When an arxml
file contains INSTANTIATION-DATA-DEF-PROPS,
the importer now creates a Simulink.LookupTable
object
that references appropriate axis data. Previously, the importer generated
a Simulink.LookupTable
object with the breakpoint Field
name set to BP1.
Version 17.1.1 provides the following arxml
export
enhancements:
Export now correctly generates arxml
descriptions
for imported ApplicationRecordTypes that have missing type references.
Previously, export generated the following error:
Error using autosar.mm.arxml.Exporter/write Cannot create reference to element [unnamed].
Export now supports round-tripping an AutosarVariableRef that does not specify a DataPrototype. Previously, export generated an error message.