Hauptinhalt

getInport

R2026b

Get AUTOSAR mapping information for Simulink inport

Description

[arPortName,arDataElementName,arDataAccessMode] = getInport(slMap,slPortName) returns the values of the AUTOSAR port arPortName, AUTOSAR data element arDataElementName, and AUTOSAR data access mode arDataAccessMode mapped to Simulink® inport slPortName.

example

Examples

collapse all

Get AUTOSAR mapping information for a model inport in the example model autosar_swc_expfcns. The model has an inport named RPort_DE1.

hModel = "autosar_swc_expfcns";
openExample(hModel);
slMap = autosar.api.getSimulinkMapping(hModel);
[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 or bus element port for which to set AUTOSAR mapping information.

Example: "In Bus Element"

Output Arguments

collapse all

Name of AUTOSAR port mapped to the specified Simulink inport or bus element port.

Example: arPortName = "RPort"

Name of AUTOSAR data element mapped to the specified Simulink inport or bus element port.

Example: arDataElementName = "DataElement"

Value of the AUTOSAR data access mode to which to map the specified Simulink inport or bus element port. Bus element ports mapped to data access modes IsUpdated or ErrorStatus return the name of QoS bus element port, no the data element you are tracking the status of. For example, if you have a QoS bus element port RPort.DE1_IsUpdated that is tracking the IsUpdated status of data element RPort.DE1, then when you use the getInport function to retrieve the QoS bus element port the software returns data element "DE1", not "DE1_IsUpdated".

[arPortName, arStatusElementName, arDataAccessMode] = getInport(slMap,"In Bus Element_IsUpdated")
arPortName =

    'RPort'


arStatusElementName =

    'DE1'


arDataAccessMode =

    'IsUpdated'

Example: "ExplicitReceive"

Version History

Introduced in R2013b

expand all