主要内容

autosar.api.getSimulinkMapping

Map万博1manbetxelements to AUTOSAR elements

Description

In an AUTOSAR software component model, use AUTOSAR map functions to map model elements to AUTOSAR component elements from a Simulink®model perspective. In an AUTOSAR adaptive model, use AUTOSAR map functions to configure generated C++ class names and namespaces for your adaptive application. For example, you can:

  • Map a Simulink entry-point function to an AUTOSAR runnable and optional software address methods.

  • Map a Simulink inport or outport to an AUTOSAR receiver or sender port and a sender-receiver data element.

  • 将Simul万博1manbetxink模型工作区参数映射到AutoSar组件参数。

  • 将Simul万博1manbetxink数据存储映射到AutoSar变量。

  • Add or remove Simulink block signals from AUTOSAR component mapping.

  • 将Simul万博1manbetxink块信号或状态映射到Autosar变量。

  • 在AutoSar生成的代码中设置Simulink内部数据存储,信号和状万博1manbetx态的默认数据包装。

  • 将Simul万博1manbetxink数据传输线映射到AutoSar Internable变量(IRV)。

  • Map a Simulink function caller to an AUTOSAR client port and a client-server operation.

  • Control generated C++ class name or namespace for adaptive applications.

Creation

Description

example

slMap= autosar.api.getSimulinkMapping(model)创建对象slMap,代表Autosar映射信息model. The specified model must be open.

Input Arguments

expand all

Model for which to create AUTOSAR mapping object, specified as a handle, character vector, or string scalar representing the model name.

Example:'my_model'

Object Functions

添加信号 Add万博1manbetxblock signal to AUTOSAR mapping
getClassname Get class name of model
getClassnamespace Get class namespace for a model
GetDatastore Get AUTOSAR mapping information for万博1manbetx数据存储
getDataTransfer Get AUTOSAR mapping information for万博1manbetxdata transfer
getFunction Get AUTOSAR mapping information for万博1manbetxentry-point function
getFunctionCaller Get AUTOSAR mapping information for万博1manbetxfunction-caller block
getInport Get AUTOSAR mapping information for万博1manbetxinport
getInternalDataPackaging Get default internal data packaging for AUTOSAR component model
getOutport Get AUTOSAR mapping information for万博1manbetxoutport
getParameter Get AUTOSAR mapping information for万博1manbetxmodel workspace parameter
getSignal Get AUTOSAR mapping information for万博1manbetxblock signal
GetState Get AUTOSAR mapping information for万博1manbetxblock state
MAPDATASTORE Map万博1manbetx数据存储到Autosar变量
mapDataTransfer Map万博1manbetx数据传输到Autosar间可互载变量
mapFunction Map万博1manbetxentry-point function to AUTOSAR runnable and software address methods
mapFunctionCaller Map万博1manbetxfunction-caller block to AUTOSAR client port and operation
mapInport Map万博1manbetx投入到汽车端口
mapOutport Map万博1manbetxoutport to AUTOSAR port
mapParameter Map万博1manbetxmodel workspace parameter to AUTOSAR component parameter
mapSignal Map万博1manbetxblock signal to AUTOSAR variable
mapState Map万博1manbetxblock state to AUTOSAR variable
removeSignal Remove万博1manbetxblock signal from AUTOSAR mapping
setClassName 设置模型的类名称
setClassNamespace Set class namespace of model
setInternal datapackaging Set default internal data packaging for AUTOSAR component model

Examples

collapse all

Call theautosar.api.getSimulinkMapping创建对象的功能slMap,代表Autosar映射信息modelautosar_swc. Use the returned object to map the Simulink initialize entry-point function to AUTOSAR runnableRunnable_Init.

hModel ='autosar_swc'; addpath(fullfile(matlabroot,'/示例/autosarblockset/main')); open_system(hModel); slMap = autosar.api.getSimulinkMapping(hModel); mapFunction(slMap,'Initialize','Runnable_Init'); arRunnableName = getFunction(slMap,'Initialize')
arRunnableName = 'Runnable_Init'

版本历史

在R2013B中引入