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 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
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)