Main Content

AUTOSAR XML Options Settings

AUTOSAR software component XML Options

The autosar.api.getAUTOSARProperties function returns an object representing elements and properties in the AUTOSAR Dictionary. You can then use the get and set functions to view and change these settings. For an example configuring these options using the AUTOSAR Dictionary, see Configure AUTOSAR XML Options.

openExample("autosar_swc");
hModel = "autosar_swc";
arProps = autosar.api.getAUTOSARProperties(hModel);
set(arProps,"XmlOptions","ArxmlFilePackaging","SingleFile");
get(arProps,"XmlOptions","ArxmlFilePackaging")
ans =

    'SingleFile'

View and Edit XML Options

Source of XML options to use when the model builds if a component model is contained within an AUTOSAR architecture model, specified as one of these values:

  • Inlined — Override the shared settings to the XML option settings of the local component model.

  • Inherit from AUTOSAR architecture model — Use the shared architecture model XML option settings.

Programmatic Use

Parameter: XmlOptionsSource
Type: string scalar | character vector
Values: "Inlined" | "Inherit"
Default: "Inlined"

Packaging type of exported ARXML files, specified as one of these values:

  • Modular — Generate individual ARXML files containing component, datatype, implementation, interface, and timing information.

  • SingleFile — Generate a single ARXML file.

Programmatic Use

Parameter: ArxmlFilePackaging
Type: string scalar | character vector
Values: "Modular" | "SingleFile"
Default: "Modular"

Package Paths

Absolute path of the data types package.

Note

The DataTypePackage path and ApplicationDataTypePackage path must be different.

Example: /Company/Powertrain/DataTypes

Programmatic Use

Parameter: DataTypePackage
Type: string scalar | character vector
Default: ''

Absolute path of the interface package.

Example: /Company/Powertrain/Interfaces

Programmatic Use

Parameter: InterfacePackage
Type: string scalar | character vector
Default: ''

AUTOSAR Platform Types

The top-level package name for AUTOSAR implementation platform types and base types.

Programmatic Use

Parameter: PlatformDataTypePackage
Type: string scalar | character vector
Default: ''

Implement data type reference behavior, specified as one of these values:

  • BaseTypeReference — User-defined implementation data types reference an SW base type (CATEGORY is set to VALUE in the ARXML file).

  • PlatformTypeReference — User-defined implementation data types reference an AUTOSAR implementation data type (CATEGORY is set to TYPE_REFERENCE in the ARXML file).

Programmatic Use

Parameter: UsePlatformTypeReferences
Type: string scalar | character vector
Values: "BaseTypeReference" | "PlatformTypeReference"
Default: "BaseTypeReference"

Note

This option is only available for the AUTOSAR Classic Platform.

Property that controls whether the native declaration inherits the AUTOSAR platform type name or uses a C integral type name, specified as one of these values:

    • PlatformTypeName — The native declaration inherits the AUTOSAR platform type name.

    • CIntegralTypeName — The native declaration uses a C integral type name according to the hardware configuration specified in the model settings.

Programmatic Use

Parameter: NativeDeclaration
Type: string scalar | character vector
Values: "PlatformTypeName" | "CIntegralTypeName"
Default: "PlatformTypeName"

Note

This option is available only for the AUTOSAR Classic Platform.

Schema for AUTOSAR data types, specified as one of these values:

  • AUTOSAR3.x — uses the AUTOSAR platform types AUTOSAR 3.x.

  • AUTOSAR4.x — uses the AUTOSAR platform types AUTOSAR 4.x.

To learn more about AUTOSAR platform types and their corresponding Simulink® data types, see About AUTOSAR Data Types.

Programmatic Use

Parameter: PlatformTypeNames
Type: string scalar | character vector
Values: "AUTOSAR3.x" | "AUTOSAR4.x"
Default: "AUTOSAR4.x

Note

This option is available only for the AUTOSAR Classic Platform.

Additional Packages

Absolute path of the application data type package.

Note

The DataTypePackage path and ApplicationDataTypePackage path must be different.

Example: /Company/Powertrain/ApplDataTypes

Programmatic Use

Parameter: ApplicationDataTypePackage
Type: string scalar | character vector
Default: ''

Absolute path of the SwBaseType package.

Example: /Company/Powertrain/SwBaseTypes

Programmatic Use

Parameter: SwBaseTypePackage
Type: string scalar | character vector
Default: ''

Note

This option is available only for the AUTOSAR Classic Platform.

Absolute path of the data type mappings package.

Example: /Company/Powertrain/DataTypeMappings

Programmatic Use

Parameter: DataTypeMappingPackage
Type: string scalar | character vector
Default: ''

Note

This option is available only for the AUTOSAR Classic Platform.

Absolute path of the constant specification package.

Example: /Company/Powertrain/Constants

Programmatic Use

Parameter: ConstantSpecifcationPackage
Type: string scalar | character vector
Default: ''

Absolute path of the data constraint package.

Example: /Company/Powertrain/DataConstrs

Programmatic Use

Parameter: DataConstraintPackage
Type: string scalar | character vector
Default: ''

Absolute path of the system-level constant values package.

Example: /Company/Powertrain/SystemConstants

Programmatic Use

Parameter: SystemConstantPackage
Type: string scalar | character vector
Default: ''

Note

This option is available only for the AUTOSAR Classic Platform.

Absolute path of the PostBuildVariantCriterions package.

Example: /Company/Powertrain/DataTypes/PostBuildCriterions

Programmatic Use

Parameter: PostBuildVariantCriterionPackage
Type: string scalar | character vector
Default: ''

Note

This option is available only for the AUTOSAR Classic Platform.

Absolute path of the SwAddressMethod package.

Example: /DataTypes/SwAddrMethods

Programmatic Use

Parameter: SwAddressMethodPackage
Type: string scalar | character vector
Default: ''

Note

This option is available only for the AUTOSAR Classic Platform.

Absolute path of the mode declaration group package.

Example: /Company/Powertrain/ModeDeclarations

Programmatic Use

Parameter: ModeDeclarationGroupPackage
Type: string scalar | character vector
Default: ''

Note

This option is available only for the AUTOSAR Classic Platform.

Absolute path of the CompuMethod package.

Example: /Company/Powertrain/CompuMethods

Programmatic Use

Parameter: CompuMethodPackage
Type: string scalar | character vector
Default: ''

Note

This option is available only for the AUTOSAR Classic Platform.

Absolute path of the unit package.

Example: /Company/Powertrain/Units

Programmatic Use

Parameter: UnitPackage
Type: string scalar | character vector
Default: ''

Absolute path of the SwRecordLayout package.

Example: /Company/Powertrain/ApplDataTypes/SwRecordLayouts

Programmatic Use

Parameter: SwRecordLayoutPackage
Type: string scalar | character vector
Default: ''

Absolute path of the internal data constraints package.

Example: /Company/Powertrain/DataTypes/DataConstrs

Programmatic Use

Parameter: InternalDataConstraintPackage
Type: string scalar | character vector
Default: ''

Additional Options

Setting for generating AUTOSAR data types, specified as one of these values.

  • Allowed — Allow direct reference of implementation types in the generated ARXML code. If an application data type is not strictly required to describe an AUTOSAR data type, use an implementation data type reference.

  • NotAllowed — Do not allow direct reference of implementation data types in the generated ARXML code. Generate an application data type for each AUTOSAR data type.

By default, Simulink generates application base types only for fixed-point data types and enumerated data types with storage types. You can override the default behavior for generating application types by configuring the ARXML exporter to generate an application type, along with the implementation type and base type, for each exported AUTOSAR data type.

Programmatic Use

Parameter: ImplementationTypeReference
Type: string scalar | character vector
Values: "Allowed" | "NotAllowed"
Default: "Allowed"

The default accessibility for measurement variables, calibration parameters, and signal and parameter data objects, specified as one of these values:

  • ReadOnly — Data element appears in the generated description file with read-only access.

  • ReadWrite — Data element appears in the generated description file with both read and write access.

  • NotAccessible — Data element appears in the generated description file and is not accessible using calibration and measurement tools.

Programmatic Use

Parameter: SwCalibrationAccessDefault
Type: string scalar | character vector
Values: "ReadWrite" | "ReadOnly" | "NotAccessible"
Default: "ReadWrite"

Direction of the CompuMethod conversion, specified as one of these values.

  • InternalToPhys — Generate CompuMethod sections for conversion of internal values to their physical representations.

  • PhysToInternal — Generate CompuMethod sections for conversion of physical values to their internal representations.

  • Bidirectional — Generate CompuMethod sections for both internal-to-physical and physical-to-internal conversion directions.

Programmatic Use

Parameter: CompuMethodDirection
Type: string scalar | character vector
Values: "InternalToPhys" | "PhysToInternal" | "Bidirectional"
Default: "InternalToPhys"

Note

This option is available only for the AUTOSAR Classic Platform.

Export setting for internal data constraints, specified as true or false, and returned as logical 1 or 0.

  • true — Enable export of internal data constraints.

  • false — Disable export of internal data constraints.

Programmatic Use

Parameter: InternalDataConstraintExport
Type: logical
Default: false

Note

This option is available only for the AUTOSAR Classic Platform.

Export setting for lookup table constants, specified as true or false, and returned as logical 1 or 0.

  • true — Enable export of lookup table constants.

  • false — Disable export of lookup table constants.

Programmatic Use

Parameter: ExportLookupTableApplicationValueSpecification
Type: logical
Values: true | false
Default: true

Note

This option is available only for the AUTOSAR Classic Platform.

Binding time override for variation points, excluding variation point proxies, implementation data types, and application data types, specified as one of the following values:

  • PreCompileTime — Set the binding time for variation points to before compile time.

  • CodeGenerationTime — Set the binding time for variation points to be at code generation.

Programmatic Use

Parameter: VpBindingTimeOverride
Type: string scalar | character vector
Values: "PreCompileTime" | "CodeGenerationTime"
Default: "PreCompileTime"

Programmatic Options

Setting to produce an error or warning when generating code for a model that cannot be invoked concurrently, specified as one of these values:

  • "Error" — Produce an error.

  • "Warning" — Produce a warning.

Example: "Warning"

Data Types: char | string

Absolute path of the component name, specified as a character vector or string scalar.

Example: '/Company/Powertrain/Components/ASWC'

Data Types: char | string

Export setting for propagated variant conditions, specified as "All" or "None".

  • "All" — The propagated variant conditions are exported.

  • "None" — The propagated variant conditions are not exported.

Example: "None"

Data Types: char | string

Export setting for AdminData in the ARXML lookup table description, specified as true or false, and returned as 1 or 0.

  • true — Enable export of AdminData.

  • false — Disable export of AdminData.

Example: true

Note

This option is available only for the AUTOSAR Classic Platform.

Data Types: logical

Absolute path of software component implementations, specified as a character vector or string scalar.

Example: '/Company/Powertrain/SwcImplementations/ASWC_Impl'

Note

This option is available only for the AUTOSAR Classic Platform.

Data Types: char | string

Absolute path of the atomic software component internal behavior qualified name, specified as a character vector or string scalar.

Example: '/Company/Powertain/Components/ASWC_IB'

Note

This option is available only for the AUTOSAR Classic Platform.

Data Types: char | string

If you programmatically modify a package path, you can specify the handling of affected elements by setting MoveElements to one of these values:

  • "All" — All affected package elements will be moved to the modified package path.

  • "Alert" — If packageable elements are affected, a dialog box with OK and Cancel buttons appears. Clicking OK moves the affected package elements to the modified package path. Clicking Cancel sets the new package path without moving any package elements.

  • "None" — None of the affected package elements will be moved to the modified package path.

Example: "Alert"

Data Types: char | string

Network binding option through which the AUTOSAR adaptive applications communicate with each other, specified as "DDS" or "SOME/IP".

Example: 'SOME/IP'

Note

This option is available only for the AUTOSAR Adaptive Platform.

Data Types: char | string

Absolute path of the timing package, specified as a character vector or string scalar.

Example: '/Timing'

Note

This option is available only for the AUTOSAR Classic Platform.

Data Types: char | string

Version History

Introduced in R2013b