Main Content

allSimulationModes

Class: cv.cvdatagroup
Namespace: cv

Get names of all simulation modes associated with cvdata objects in cv.cvdatagroup

Description

Get names of all simulation modes associated with cvdata objects in cv.cvdatagroup.

simModes= allSimulationModes(cvdg) returns a cell array of character vectors or strings identifying all simulation modes associated with the cvdata objects in cvdg, an instantiation of the cv.cvdatagroup class.

simModes= allSimulationModes(cvdg, modelName) returns a cell array of character vectors or strings identifying all simulation modes associated with the model modelNamein cvdg, an instantiation of the cv.cvdatagroup class.

Input Arguments

expand all

Instance of class cv.cvdatagroup.

Model with which simulation modes are associated.

Output Arguments

expand all

All simulation modes associated with cvdg. Valid values include the following:

Object SpecificationDescription

'Normal'

Model in Normal simulation mode.

'SIL' (or 'PIL')

Model in Software-in-the-Loop (SIL) or Processor-in-the-Loop (PIL) simulation mode.

'ModelRefSIL' (or 'ModelRefPIL')

Model reference in Software-in-the-Loop (SIL) or Processor-in-the-Loop (PIL) simulation mode.

'ModelRefTopSIL' (or 'ModelRefTopPIL')

Model reference in Software-in-the-Loop (SIL or Processor-in-the-Loop (PIL) simulation mode with code interface set to top model.

Examples

expand all

This example shows how to query the simulation modes of the coverage results inside a cvdatagroup object.

Record coverage for slvnvdemo_cv_small_controller.

model_1 = 'slvnvdemo_cv_small_controller';
load_system(model_1)
cvdo1 = cvsim(model_1);

Record coverage for slvnvdemo_powerwindow_controller.

model_2 = 'slvnvdemo_powerwindow_controller';
load_system(model_2)
cvdo2 = cvsim(model_2);

Record coverage for slvnvdemo_counter.

model_3 = 'slvnvdemo_counter';
load_system(model_3)
cvdo3 = cvsim(model_3);

Add the three cvdata objects to a cv.cvdatagroup object.

cvdg = cv.cvdatagroup(cvdo1,cvdo2,cvdo3);

Get the simulation modes by using allSimulationModes.

simModes = allSimulationModes(cvdg)
simModes =

  1x1 cell array

    {'Normal'}