Main Content

setPlatform

Set platform kind of architecture model to classic or adaptive

Since R2023a

    Description

    setPlatform(archModel,platformKind) sets the platform of the AUTOSAR architecture model archModel to platformKind.

    example

    Examples

    collapse all

    Create an AUTOSAR architecture model using the default settings, read the platform, and set the platform kind to adaptive.

    Create AUTOSAR architecture model, and read the platform setting.

    % Create AUTOSAR architecture model
    modelName = 'myArchModel';
    archModel = autosar.arch.createModel(modelName); % Default platform kind is Classic
    % Read the default platform kind
    ptm = archModel.Platform
    
    ptm =
        'Classic'
    

    Specify the AUTOSAR Adaptive Platform for the architecture model.

    setPlatform(archModel,"Adaptive");
    
    % Read the updated platform kind
    ptm = archModel.Platform
    ptm =
        'Adaptive'

    Input Arguments

    collapse all

    AUTOSAR architecture model, specified as a model handle returned by a previous call to autosar.arch.createModel or autosar.arch.loadModel.

    AUTOSAR platform kind, specified as a character vector or string scalar.

    Set "Adaptive" to specify an adaptive architecture model. Set "Classic" to specify a classic architecture model.

    Mixing classic and adaptive architecture modeling is not supported.

    Example: 'Adaptive'

    Version History

    Introduced in R2023a