Main Content

createModel

Create Simulink implementation model for AUTOSAR architecture component

Description

example

createModel(component,modelName) creates Simulink® implementation model modelName with the same interface as the specified AUTOSAR architecture component and links the component to the implementation model. The component argument is a component handle returned by a previous call to addComponent. If not specified, modelName defaults to the name of the component.

Examples

collapse all

For an AUTOSAR component in an architecture model, create a Simulink implementation model with a matching interface. The function call links the component to the implementation model. By default, the implementation model has the same name as the component.

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

% Add component inside the architecture model
component = addComponent(archModel,'SWC1');
addPort(component,'Sender',{'PPort1','PPort2'});

% Create and link matching Simulink implementation model
createModel(component);

Input Arguments

collapse all

AUTOSAR architecture component from which to create a matching Simulink implementation model. The argument is a component handle returned by a previous call to addComponent.

Example: component

Name of the Simulink implementation model to create, based on the specified AUTOSAR architecture component. If not specified, modelName defaults to the name of the component.

Example: 'SWC1'

Introduced in R2020a