delete
Delete AUTOSAR element
Description
delete(
deletes the AUTOSAR element at arProps
,elementPath
)elementPath
.
Examples
Delete Sender-Receiver Interface
Delete the sender-receiver interface
Interface1
from the AUTOSAR configuration for a
model.
hModel = 'autosar_swc_expfcns'; openExample(hModel); arProps = autosar.api.getAUTOSARProperties(hModel); % Add Interface3 addPackageableElement(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 Interface3 arPortType = 'DataReceiverPort'; aswcPath = find(arProps,[],'AtomicComponent','PathType','FullyQualified'); rPorts = find(arProps,aswcPath{1},arPortType,'PathType','FullyQualified'); rPort = rPorts{1}; set(arProps,rPort,'Interface','Interface3') % Delete Interface1 delete(arProps,'Interface1'); ifPaths = find(arProps,[],'SenderReceiverInterface','PathType','FullyQualified')
ifPaths = 1×2 cell array {'/pkg/if/Interface2'} {'/pkg/if/Interface3'}
Input Arguments
arProps
— AUTOSAR properties information for a model
handle
AUTOSAR properties information for a model, previously returned by
.
arProps
=
autosar.api.getAUTOSARProperties(model
)
is a handle,
character vector, or string scalar representing the model name.model
Example: arProps
elementPath
— Path to AUTOSAR element
character vector | string scalar
Path to the AUTOSAR element to delete.
Example: 'Input'
Version History
Introduced in R2013b
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)