Main Content

mapOutport

Map Simulink outport to AUTOSAR port

Description

example

mapOutport(slMap,slPortName,arPortName,arDataElementName,arDataAccessMode) maps the Simulink® outport slPortName to the AUTOSAR data element arDataElementName at AUTOSAR provider port arPortName. The AUTOSAR data access mode for the provider port is set to arDataAccessMode.

Examples

collapse all

Set AUTOSAR mapping information for a model outport in the example model autosar_swc_expfcns. The model has an outport named PPort_DE1. This example changes the AUTOSAR data access mode for PPort_DE1 from ImplicitSend to ExplicitSend.

hModel = 'autosar_swc_expfcns';
addpath(fullfile(matlabroot,'/examples/autosarblockset/main'));
open_system(hModel);
slMap=autosar.api.getSimulinkMapping(hModel);
mapOutport(slMap,'PPort_DE1','PPort','DE1','ExplicitSend');
[arPortName,arDataElementName,arDataAccessMode]=getOutport(slMap,'PPort_DE1')
arPortName =
PPort

arDataElementName =
DE1

arDataAccessMode =
ExplicitSend

Input Arguments

collapse all

Simulink to AUTOSAR mapping information for a model, previously returned by slMap = autosar.api.getSimulinkMapping(model). model is a handle, character vector, or string scalar representing the model name.

Example: slMap

Name of the model outport for which to set AUTOSAR mapping information.

Example: 'Output'

Name of the AUTOSAR port to which to map the specified Simulink outport.

Example: 'Output'

Name of the AUTOSAR data element to which to map the specified Simulink outport.

Example: 'Output'

Value of the AUTOSAR data access mode to which to map the specified Simulink outport. The value can be ImplicitSend, ImplicitSendByRef, ExplicitSend, EndToEndWrite, ModeSend, or QueuedExplicitSend.

Example: 'ExplicitSend'

Introduced in R2013b