Main Content

getPlatformProperties

Get AUTOSAR platform properties from data dictionary

Since R2022b

Description

[propNames,propVals] = getPlatformProperties(platformMapping,dictElementObj) returns AUTOSAR Classic platform-specific properties and their values for the specified dictionary element. Specified dictionary elements can be a data interface object or data element object.

example

Examples

collapse all

To get the platform-specific properties for a data interface, such as what kind of AUTOSAR communication interface is defined and the path to the element package for the specified data interface, use the getPlatformProperties 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");

[propNames,propValues] = ...
   getPlatformProperties(platformMapping,interfaceObj)
propNames =

  1×3 cell array

    {'IsService'}    {'Package'}    {'InterfaceKind'}


propValues =

  1×3 cell array

    {[0]}    {'/Interfaces'}    {'SenderReceiverInterface'}

To get the platform-specific properties for a data element in the data interface, such as SwAddrMethod information for the specified data element, use the getPlatformProperties 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");
dataElementObj = getElement(interfaceObj,"DE1");

[propNames,propValues] = ...
   getPlatformProperties(platformMapping,dataElementObj)
propNames =

  1×3 cell array

    {'SwAddrMethod'}    {'SwCalibrationAccess'}    {'DisplayFormat'}


propValues =

  1×3 cell array

    {'VAR1'}    {'ReadWrite'}    {'%.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.

Output Arguments

collapse all

Property names in selected dictionary element and platform mapping, specified as a cell array of character vectors or a string array.

For data interface objects, AUTOSAR properties include 'IsService', 'Package', and 'InterfaceKind'.

For data element objects, AUTOSAR properties include 'SwAddrMethod', 'SwCalibrationAccess', and 'DisplayFormat'.

Property values in selected dictionary element and platform mapping, specified as a cell array of character vectors or a string array.

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