arxml.importer

Import AUTOSAR component XML

Description

Use arxml.importer functions to import AUTOSAR components into Simulink® in a controlled manner. For example, you can parse an AUTOSAR software component description XML file exported by an AUTOSAR authoring tool, and then import the component into a Simulink model. After importing the component, use the Simulink representation of the component for further configuration, algorithm development, C/C++ code generation, and ARXML export.

Creation

Description

example

ar = arxml.importer(filename) creates object ar, which represents the AUTOSAR information in XML file filename.

example

ar = arxml.importer({filename1,filename2,...,filenameN}) creates object ar, which represents the AUTOSAR information in the specified XML files.

Tip

If you enter the arxml.importer function call without a terminating semicolon (;), the importer lists the AUTOSAR content of the specified XML file or files. The information includes paths to software components in the AUTOSAR package structure, which you can specify in calls to createComponentAsModel and createCompositionAsModel.

Input Arguments

expand all

Name of XML file containing AUTOSAR information.

Example: 'mySWC.arxml'

Cell array of names of XML files containing AUTOSAR information.

Example: {'mySWC.arxml','DataTypes.arxml','MiscDefs.arxml'}

Object Functions

createComponentAsModelCreate Simulink representation of AUTOSAR ARXML atomic software component
createCompositionAsModelCreate Simulink representation of AUTOSAR ARXML software composition
getComponentNamesGet AUTOSAR software component names from ARXML files
updateAUTOSARPropertiesUpdate model with ARXML definitions of AUTOSAR elements
updateModelUpdate AUTOSAR model with ARXML changes

Examples

collapse all

Call the arxml.importer function to create object ar, which represents the AUTOSAR information in XML file mySWC.arxml. Use the returned object to import AUTOSAR software component /pkg/swc and create an initial Simulink representation of the component.

ar = arxml.importer('mySWC.arxml')
createComponentAsModel(ar,'/pkg/swc','ModelPeriodicRunnablesAs','AtomicSubsystem')

Call the arxml.importer function to create object ar, which represents the AUTOSAR information in XML files mySWC.arxml, DataTypes.arxml, and MiscDefs.arxml. Use the returned object to import AUTOSAR software component /pkg/swc and create an initial Simulink representation of the component.

ar = arxml.importer({'mySWC.arxml','DataTypes.arxml','MiscDefs.arxml'})
createComponentAsModel(ar,'/pkg/swc','ModelPeriodicRunnablesAs','AtomicSubsystem')
Introduced in R2008a