主要内容

setPlatform

将架构模型的平台类型设置为 Classic 或 Adaptive

自 R2023a 起

    说明

    setPlatform(archModel,platformKind) 将 AUTOSAR 架构模型 archModel 的平台设置为 platformKind

    示例

    示例

    全部折叠

    使用默认设置创建一个 AUTOSAR 架构模型,读取平台,并将平台类型设置为 Adaptive。

    创建 AUTOSAR 架构模型,并读取平台设置。

    % 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'
    

    为架构模型指定 AUTOSAR Adaptive 平台。

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

    输入参数

    全部折叠

    AUTOSAR 架构模型,指定为由先前调用 autosar.arch.createModelautosar.arch.loadModel 返回的模型句柄。

    AUTOSAR 平台类型,指定为字符向量或字符串标量。

    设置“Adaptive”以指定 Adaptive 架构模型。设置“Classic”以指定经典架构模型。

    不支持混合经典和自适应架构建模。

    示例: 'Adaptive'

    版本历史记录

    在 R2023a 中推出