Main Content

getDataTransfer

Get AUTOSAR mapping information for Simulink data transfer

Description

example

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

Examples

collapse all

Get AUTOSAR mapping information for a data transfer line in the example model autosar_swc_expfcns. The model has data transfer lines named irv1, irv2, irv3, and irv4.

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 model mMultitasking_4rates. The model has Rate Transition blocks named RateTransition, RateTransition1, and RateTransition2, 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 by slMap = autosar.api.getSimulinkMapping(model). model is 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 is Implicit or Explicit.

Example: arDataAcessMode

Introduced in R2013b