setPlatformProperty
Set AUTOSAR properties for data interface or element in data dictionary
Since R2022b
Description
setPlatformProperty(
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.platformMapping
,dictElementObj
,Name=Value
)
Examples
Set AUTOSAR Property Values for Data Interface
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");
Set AUTOSAR Property Values for Data Element
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
platformMapping
— Platform mapping object
autosar.dictionary.ARClassicPlatformMapping
object
Platform mapping object, specified as an autosar.dictionary.ARClassicPlatformMapping
object.
dictElementObj
— Element in dictionary object
Simulink.dictionary.archdata.DataInterface
object | Simulink.dictionary.archdata.DataElement
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'
DisplayFormat
— Calibration display format
character vector | string scalar
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'
InterfaceKind
— AUTOSAR communication interface
"SenderReceiverInterface"
| "NvDataInterface"
| "ModeSwitchInterface"
Kind of AUTOSAR communication interface that is represented for the specified
AUTOSAR interface object, specified as
"SenderReceiverInterface"
,
"NvDataInterface"
, and
"ModeSwitchInterface"
.
Example: InterfaceKind="SenderReceiverInterface"
IsService
— Interface is a service interface
true
| false
Whether an interface is a service interface, specified as true
or false
.
Example: IsService=false
Package
— Package path
character vector | string scalar
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 of parameter SwAddrMethod
character vector | string scalar
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"
SwCalibrationAccess
— Calibration access mode
"ReadOnly"
| "ReadWrite"
| "NotAccessible"
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
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)