Main Content

getPlatformProperty

Get AUTOSAR platform property from data dictionary

Since R2022b

Description

example

propValue = getPlatformProperty(platformMapping,dictElementObj,propName) gets the specified property for the specified dictionary element from a data dictionary mapped to the AUTOSAR Classic Platform. The specified dictionary element can be a data interface object or data element object.

Examples

collapse all

To get the kind of AUTOSAR communication interface that is defined for the specified data interface, use the getPlatformProperty function with the propName argument InterfaceKind. 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");
propValue_Interface = ...
   getPlatformProperty(platformMapping,interfaceObj,"InterfaceKind")
propValue_Interface =

    'NvDataInterface'

To get the calibration and measurement tool access defined for the specified data element, use the getPlatformProperty function with the propName argument SwCalibrationAccess.

dataElemObj = interfaceObj.Elements(1);
propValue_Sw_CalAccess = ...
    getPlatformProperty(platformMapping,dataElemObj,"SwCalibrationAccess")
propValue_Sw_CalAccess =

    'ReadWrite'

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.

Property name of property in dictionary element.

For data interface objects, valid argument values are "IsService", "Package", and "InterfaceKind".

For data element objects, valid argument values are "SwAddrMethod", "SwCalibrationAccess", and "DisplayFormat".

Example: "InterfaceKind"

Output Arguments

collapse all

Property value of property in dictionary element.

For data interface objects, returned properties include:

PropertyReturn Value
IsServiceSet as true for service interfaces. Returned as a Boolean.
PackageFully-qualified path to the element package. Returned as a character vector.
InterfaceKindAUTOSAR communication interface. Returned as a character vector. Valid values are 'SenderReceiverInterface', 'NvDataInterface', and 'ModeSwitchInterface'.

For data element objects, returned properties include:

PropertyReturn Value
SwAddrMethodName of previously defined software address method. Returned as a character vector.
SwCalibrationAccessCalibration and measurement tool access to a data object. Returned as a character vector. Valid values are 'ReadOnly', 'ReadWrite', and 'NotAccessible'.
DisplayFormatAUTOSAR display format specification. Returned as a character vector.

Version History

Introduced in R2022b