Contenido principal

addPlatformMapping

R2026b

Add AUTOSAR Classic mapping to Architectural Data section of Simulink data dictionary

Since R2023b

    Description

    platformMapping = addPlatformMapping(archData,platformName) adds a mapping for the platform specified by platformName to the Architectural Data section of a data dictionary, archData.

    example

    platformMapping = addPlatformMapping(archData,platformName,EnableDictionaryHierarchy=tf) specifies whether the platform-mapped data dictionary supports use in modeling hierarchies with other platform-mapped dictionaries.

    example

    Examples

    collapse all

    To add an AUTOSAR Classic mapping to a Simulink® data dictionary, use the addPlatformMapping function. For an example that shows more of the workflow for related functions, see Create Architectural Data Object and Use It to Configure Architectural Data.

    Create a data dictionary MyInterfaces.sldd and add an AUTOSAR Classic Platform mapping to the Architectural Data section.

    dictName = "MyInterfaces.sldd";
    archData = Simulink.dictionary.archdata.open(dictName);
    platformMapping = addPlatformMapping(archData,"AUTOSARClassic");

    To create a platform-mapped data dictionary that supports use in modeling hierarchies with other platform-mapped dictionaries, specify the EnableDictionaryHierarchy name-value argument as true.

    Create data dictionary MyInterfaces.sldd and add an AUTOSAR Classic Platform mapping to the Architectural Data section that supports references to and from other mapped data dictionaries.

    dictName = "MyInterfaces.sldd";
    archData = Simulink.dictionary.archdata.open(dictName);
    platformMapping = addPlatformMapping(archData,"AUTOSARClassic", ...
        EnableDictionaryHierarchy=true);

    Input Arguments

    collapse all

    Architectural Data object, specified as a Simulink.dictionary.ArchitecturalData object. Before you use this function, create archData by using Simulink.dictionary.archdata.create or Simulink.dictionary.archdata.open.

    Platform mapping name, specified as a character vector or string scalar.

    Example: "AUTOSARClassic"

    Option to enable use in dictionary reference hierarchies, specified as numeric or logical 1 (true) or 0 (false). When set to true, the data dictionary platform mapping supports use in modeling hierarchies with other mapped dictionaries. If there are multiple mapped data dictionaries in the same modeling or reference hierarchy then they must have EnableDictionaryHierarchy set to true. For information how to decide when to enable platform mapped data dictionary references, see Choose When to Use AUTOSAR Mapped Dictionary Hierarchies (AUTOSAR Blockset).

    Example: EnableDictionaryHierarchy=true

    Data Types: logical

    Output Arguments

    collapse all

    Platform mapping object, returned as an autosar.dictionary.ARClassicPlatformMapping (AUTOSAR Blockset) object.

    Version History

    Introduced in R2023b