Main Content

arxml.importer

Import AUTOSAR XML descriptions of software components, compositions, or packages

Description

Use arxml.importer functions to import AUTOSAR software components, compositions, or packages of shared elements from ARXML files into Simulink®. 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, you can use the Simulink representation of the component for further configuration, algorithm development, C/C++ code generation, and ARXML export.

For a list of schema versions supported for ARXML import and export, see Select AUTOSAR Classic Schema or Select AUTOSAR Adaptive Schema.

Creation

Description

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.

example

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 from AUTOSAR element packages
updateModelUpdate AUTOSAR model or architecture 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')

Version History

Introduced in R2008a