Main Content

mapOutport

Map Simulink outport to AUTOSAR port

Description

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.

example

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";
openExample(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.

Models configured for the AUTOSAR Classic Platform do not support multidimensional arrays for outports mapped with data access mode ImplicitSendByRef. When you validate your code mappings or try to generate code, the software produces an error if outports mapped with data access mode ImplicitSendByRef are present in the model. Use one-dimensional arrays or select a different data access mode for the port.

Example: "ExplicitSend"

Version History

Introduced in R2013b