setMetricFamilyParameterValues

Class: slmetric.config.Configuration
Package: slmetric.config

Obtain compliance and issues metric data on your Model Advisor configuration

Syntax

setMetricFamilyParameterValues(config,... 'ModelAdvisorStandard', values)

Description

Use the Model Advisor Configuration Editor to create groups of Model Advisor checks or use a shipped check group. Then, use the setMetricFamilyParameterValues(config,... 'ModelAdvisorStandard', values) method to obtain compliance and issues data for this group and any other groups that you specify as part of the values input. Compliance data is the percentage of passed checks. Issues data is the number of check issues.The values input sets the groups that are members of the family that you associate with a particular slmetric.config.Configuration object.

Input Arguments

expand all

slmetric.config.Configuration object to add check groups for which to obtain compliance and issues data.

Standard string that you must supply as an input.

Specify Check Group IDs for each group of Model Advisor checks for which to obtain compliance and issues metric data. Obtain the Check Group IDs by opening up the Model Advisor Configuration Editor and selecting the folder that contains the group of checks. The Check Group ID parameter is in the folder.

Examples

expand all

Obtain compliance and issues data on the Modeling Standards for MISRA C:2012, MAAB, and High-Integrity Systems check groups.

Open the default configuration.

config = slmetric.config.Configuration.open();

Specify the metric family parameter ID and the metric family parameter values. To obtain the MISRA value, open the Model Advisor Configuration Editor and select the MISRA folder. The Check Group ID parameter is in the folder.

famParamID = 'ModelAdvisorStandard';
values = {'maab', 'hisl_do178', '_SYSTEM_By Task_misra_c'};
setMetricFamilyParameterValues(config, famParamID, values); 

The maab and hisl_do178 checks include a subset of MAAB and High-Integrity System checks. To include all the checks, specify the Check Group ID from the Model Advisor Configuration Editor.

Save the new configuration.

config.save('FileName', 'MetricConfig.xml');

Set the active Metrics Dashboard configuration.

slmetric.config.setActiveConfiguration(fullfile(pwd, 'MetricConfig.xml'));

Introduced in R2018b