Main Content

autosar.api.getAUTOSARProperties

Configure AUTOSAR software component elements and properties

Description

In an AUTOSAR software component model, use AUTOSAR property functions to configure AUTOSAR elements from an AUTOSAR component perspective. You can add AUTOSAR elements, find elements, get and set properties of elements, delete elements, and define ARXML packaging of elements.

Creation

Description

arProps = autosar.api.getAUTOSARProperties(model) creates object arProps, which represents AUTOSAR properties information for model. The specified model must be open.

example

arProps = autosar.api.getAUTOSARproperties(dictName) creates object arProps, which represents AUTOSAR properties information for dictName. The specified data dictionary must be open.

example

Input Arguments

expand all

Model for which to create AUTOSAR properties object, specified as a handle, character vector, or string scalar representing the model name. When a model is modified, build the model before calling the autosar.api.getAUTOSARproperties object.

Example: "my_model"

Data dictionary for which to create AUTOSAR properties object, specified as a handle, character vector, or string scalar representing the data dictionary name.

Example: "myDataDictionary.sldd"

Object Functions

addAdd property to AUTOSAR element
addPackageableElementAdd element to AUTOSAR package in model
createEnumerationCreate Simulink enumeration data type definition from imported AUTOSAR data elements
createManifestCreate manifest file for AUTOSAR adaptive model
createNumericTypeCreate Simulink numeric data type definition from imported AUTOSAR data elements
deleteDelete AUTOSAR element
deleteUnmappedComponentsDelete unmapped AUTOSAR components from model
findFind AUTOSAR elements
getGet property of AUTOSAR element
setSet property of AUTOSAR element

Examples

collapse all

Call the autosar.api.getAUTOSARProperties function to create object arProps, which represents AUTOSAR properties information for model autosar_swc_slfcns. Use the returned object to set the IsService property for client-server interface CSIf to true (1), indicating that the port interface is used for AUTOSAR services. For more information regarding AUTOSAR element properties such as IsService, see AUTOSAR Element Properties.

hModel = "autosar_swc_slfcns";
openExample(hModel);
arProps = autosar.api.getAUTOSARProperties(hModel);
set(arProps,"CSIf","IsService",true);
isService = get(arProps,"CSIf","IsService")
isService =
  logical
   1

Call the autosar.api.getAUTOSARProperties function to create object arProps, which represents AUTOSAR properties information for data dictionary myInterfaces.sldd. Use the returned object to set the XmlOptionsSource property to Inlined. For more information regarding XML Options settings, see AUTOSAR XML Options Settings.

dictName = "myInterfaces.sldd";
arProps = autosar.api.getAUTOSARProperties(dictName);
set(arProps,"XmlOptionsSource","Inlined");

Call the autosar.api.getAUTOSARProperties function to create object ddProps, which represents AUTOSAR property information for data dictionary myCSInterfaces.sldd. Use the returned object to get and set the SwCalibrationAccess property of client-server operation, ReadBlock.

ddProps = autosar.api.getAUTOSARProperties("myCSInterfaces.sldd");
csOp = 'ReadBlock';
ifPaths = find(ddProps,[],"ClientServerInterface",...
    "PathType","FullyQualified");
argsReadBlockPaths = get(ddProps, [ifPaths{1} '/' csOp],...
    "Arguments","PathType","FullyQualified");
argReadBlockPath = argsReadBlockPaths{2};
set(arProps,[argReadBlockPath],...
    "SwCalibrationAccess","NotAccessible");

Version History

Introduced in R2013b