Main Content

getDataTransfer

Get AUTOSAR mapping information for万博1manbetxdata transfer

Description

example

[arIrvName,arDataAccessMode] = getDataTransfer(slMap,slDataTransfer)returns the values of the AUTOSAR inter-runnable variablearIrvNameand AUTOSAR data access modearDataAccessModethat are mapped to Simulink®data transfer line or Rate Transition blockslDataTransfer.

Examples

collapse all

Get AUTOSAR mapping information for a data transfer line in the example modelautosar_swc_expfcns. The model has data transfer lines namedirv1,irv2,irv3, andirv4.

hModel ='autosar_swc_expfcns'; addpath(fullfile(matlabroot,'/examples/autosarblockset/main')); open_system(hModel); slMap=autosar.api.getSimulinkMapping(hModel); [arIrvName,arDataAccessMode]=getDataTransfer(slMap,'irv4')
arIrvName = 'IRV4' arDataAccessMode = 'Implicit'

Get AUTOSAR mapping information for a Rate Transition block in the example modelmMultitasking_4rates. The model has Rate Transition blocks namedRateTransition,RateTransition1, andRateTransition2, which are located at the top level of the model.

hModel ='mMultitasking_4rates'; addpath(fullfile(matlabroot,'/help/toolbox/autosar/examples')); open_system(hModel); slMap=autosar.api.getSimulinkMapping(hModel); [arIrvName,arDataAccessMode]=getDataTransfer(slMap,'mMultitasking_4rates/RateTransition')
arIrvName = 'IRV1' arDataAccessMode = 'Implicit'

Input Arguments

collapse all

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

Example:slMap

Name of the Simulink data transfer line or full block path to the Rate Transition block for which to return AUTOSAR mapping information.

Example:'irv4'

Example:'myModel/RateTransition2'

Output Arguments

collapse all

Variable that returns the name of AUTOSAR inter-runnable variable mapped to the specified Simulink data transfer.

Example:arIrvName

Variable that returns the value of the AUTOSAR data access mode mapped to the specified Simulink data transfer. The value isImplicitorExplicit.

Example:arDataAcessMode

Version History

Introduced in R2013b