linkToModel

Link AUTOSAR architecture component to Simulink implementation model

Description

example

linkToModel(component,modelName) links the specified AUTOSAR architecture component to existing Simulink® implementation model modelName. The component inherits the interface of the linked implementation model. The component argument is a component handle returned by a previous call to addComponent.

Examples

collapse all

In an architecture model, link an AUTOSAR component to a Simulink implementation model. The component inherits the interface of the linked implementation model.

% Create AUTOSAR architecture model
modelName = 'myArchModel';
archModel = autosar.arch.createModel(modelName);

% Add component inside the architecture model
component = addComponent(archModel,'SWC1');

% Add path to implementation model
addpath(fullfile(matlabroot,'/examples/autosarblockset/main'));

% Link to Simulink implementation model and inherit its interface
linkToModel(component,'autosar_tpc_controller');

Input Arguments

collapse all

AUTOSAR architecture component to link to the specified Simulink implementation model. The argument is a component handle returned by a previous call to addComponent.

Example: component

Name of an existing Simulink implementation model to link from the specified AUTOSAR architecture component.

Example: 'autosar_tpc_controller'

Introduced in R2020a