Main Content

delete

Delete AUTOSAR element

Description

example

delete(arProps,elementPath)deletes the AUTOSAR element atelementPath.

Examples

collapse all

Delete the sender-receiver interfaceInterface1from the AUTOSAR configuration for a model.

addpath(fullfile(matlabroot,'/examples/autosarblockset/main')); hModel ='autosar_swc_expfcns'; open_system(hModel); arProps = autosar.api.getAUTOSARProperties(hModel);% Add Interface3addPackageableElement(arProps,'SenderReceiverInterface','/pkg/if','Interface3'); ifPaths = find(arProps,[],'SenderReceiverInterface','PathType','FullyQualified')
ifPaths = 1×3 cell array {'/pkg/if/Interface1'} {'/pkg/if/Interface2'} {'/pkg/if/Interface3'}
% Find AUTOSAR DataReceiverPort and change its interface from Interface1 to Interface3arPortType ='DataReceiverPort'; aswcPath = find(arProps,[],'AtomicComponent','PathType','FullyQualified'); rPorts = find(arProps,aswcPath{1},arPortType,'PathType','FullyQualified'); rPort = rPorts{1}; set(arProps,rPort,'Interface','Interface3')% Delete Interface1delete(arProps,'Interface1'); ifPaths = find(arProps,[],'SenderReceiverInterface','PathType','FullyQualified')
ifPaths = 1×2 cell array {'/pkg/if/Interface2'} {'/pkg/if/Interface3'}

Input Arguments

collapse all

AUTOSAR properties information for a model, previously returned byarProps= autosar.api.getAUTOSARProperties(model).modelis a handle, character vector, or string scalar representing the model name.

Example:arProps

Path to the AUTOSAR element to delete.

Example:'Input'

Version History

Introduced in R2013b