Main Content

addBSWService

Add Basic Software component to AUTOSAR classic architecture model

Since R2020a

Description

bswBlock = addBSWService(archCM,bswKind) adds a Basic Software (BSW) service component block of type bswKind to a classic composition or architecture model archCM. Valid values for bswKind are 'dem' for Diagnostic Event Manager and 'nvm' for NVRAM Manager (not case-sensitive). The archCM argument is a composition or architecture model handle returned by a previous call to addComposition, autosar.arch.createModel, or autosar.arch.loadModel. The bswBlock output argument returns a block handle.

example

Examples

collapse all

Add NVRAM Service Component and Diagnostic Service Component blocks to the top level of an AUTOSAR architecture model.

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

% Add components inside the architecture model
addComponent(archModel,'Controller1');
actuator = addComponent(archModel,'Actuator');
set(actuator,'Kind','SensorActuator');

% Add Basic Software service component blocks
addBSWService(archModel,'nvm');
addBSWService(archModel,'dem');
layout(archModel);  % Auto-arrange layout

Input Arguments

collapse all

AUTOSAR composition or architecture model to which to add a BSW component. The argument is a classic composition or architecture model handle returned by a previous call to addComposition, autosar.arch.createModel, or autosar.arch.loadModel.

Example: archModel

Type of AUTOSAR BSW service component block to add to the specified classic composition or architecture model. Valid values are 'dem' for Diagnostic Event Manager and 'nvm' for NVRAM Manager (not case-sensitive).

Example: 'dem'

Output Arguments

collapse all

Returns an AUTOSAR BSW block handle.

Version History

Introduced in R2020a