Main Content

mapInport

Map Simulink inport to AUTOSAR port

Description

example

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

Examples

collapse all

Set AUTOSAR mapping information for a model inport in the example model autosar_swc_expfcns. The model has an inport named RPort_DE1. This example changes the AUTOSAR data access mode for RPort_DE1 from ImplicitReceive to ExplicitReceive.

hModel = 'autosar_swc_expfcns';
addpath(fullfile(matlabroot,'/examples/autosarblockset/main'));
open_system(hModel);
slMap=autosar.api.getSimulinkMapping(hModel);
mapInport(slMap,'RPort_DE1','RPort','DE1','ExplicitReceive');
[arPortName,arDataElementName,arDataAccessMode]=getInport(slMap,'RPort_DE1')
arPortName =
RPort

arDataElementName =
DE1

arDataAccessMode =
ExplicitReceive

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 inport for which to set AUTOSAR mapping information.

Example: 'Input'

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

Example: 'Input'

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

Example: 'Input'

Value of the AUTOSAR data access mode to which to map the specified Simulink inport. The value can be ImplicitReceive, ExplicitReceive, QueuedExplicitReceive, ErrorStatus, ModeReceive, IsUpdated, EndToEndRead, or ExplicitReceiveByVal.

Example: 'ExplicitReceive'

Introduced in R2013b