Main Content

setPlatformProperty

Set AUTOSAR properties for data interface or element in data dictionary

Since R2022b

Description

setPlatformProperty(platformMapping,dictElementObj,Name=Value) sets the specified platform properties for the specified dictionary element in a data dictionary mapped to the AUTOSAR Classic Platform. The specified dictionary element can be a data interface object or data element object.

example

Examples

collapse all

To set AUTOSAR package and communication properties for the specified data interface, use the setPlatformProperty function. For an example that shows more of the workflow for related functions, see Configure AUTOSAR Classic Data Interface and Properties in Data Dictionary.

archDataObj = Simulink.dictionary.archdata.open("MyInterfaces.sldd");
platformMapping = getPlatformMapping(archDataObj,"AUTOSARClassic");
interfaceObj = getInterface(archDataObj,"DataInterface");

setPlatformProperty(platformMapping,interfaceObj,IsService=false,...
    Package="/Interface3",InterfaceKind="SenderReceiverInterface");

To set the AUTOSAR SwAddrMethod and calibration properties for the specified data element, use the setPlatformProperty function.

archDataObj = Simulink.dictionary.archdata.open("MyInterfaces.sldd");
platformMapping = getPlatformMapping(archDataObj, "AUTOSARClassic");
interfaceObj = getInterface(archDataObj, "DataInterface");
dataElementObj = getElement(interfaceObj,"DE1"); 

setPlatformProperty(platformMapping,dataElementObj,SwAddrMethod="VAR1",...
    SwCalibrationAccess="ReadWrite",DisplayFormat='%.3f');  

Input Arguments

collapse all

Platform mapping object, specified as an autosar.dictionary.ARClassicPlatformMapping object.

Element in a dictionary object from which you access the AUTOSAR platform-specific properties and values, specified as a Simulink.dictionary.archdata.DataInterface object or Simulink.dictionary.archdata.DataElement object.

The argument can be a data interface object, which is returned by a previous call to addDataInterface or getInterface, or a data element object, which is returned by a previous call to addElement or getElement.

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Example: SwAddrMethod='VAR1'

Calibration display format for the specified AUTOSAR data element object, specified as a character vector or string scalar. AUTOSAR display format specifications control the width and precision display for calibration and measurement data.

Example: DisplayFormat='%2.6f'

Kind of AUTOSAR communication interface that is represented for the specified AUTOSAR interface object, specified as "SenderReceiverInterface", "NvDataInterface", and "ModeSwitchInterface".

Example: InterfaceKind="SenderReceiverInterface"

Whether an interface is a service interface, specified as true or false.

Example: IsService=false

The fully-qualified path to the element package for the specified AUTOSAR interface object, specified as a character vector or a string scalar.

Example: Package='/Interface2'

SwAddrMethod name that is valid for the specified AUTOSAR data element object, specified as a character vector or a string scalar. Code generation uses the SwAddrMethod name to group AUTOSAR parameters in a memory section for access by calibration and measurement tools.

Example: SwAddrMethod="VAR"

How calibration and measurement tools access data for the specified AUTOSAR data element object, specified as "ReadOnly", "ReadWrite", and "NotAccessible".

Example: SwCalibrationAccess="ReadOnly"

Version History

Introduced in R2022b