| Simulink® Verification and Validation™ | ![]() |
The ModelAdvisor.Task class is a wrapper for a check so you can access the check with the Model Advisor.
You can use one ModelAdvisor.Check object in multiple ModelAdvisor.Task objects, allowing you to place the same check in multiple locations in the Model Advisor tree. For example, Check for implicit signal resolution is in the By Product > Simulink folder and in the By Task > Model Referencing folder in the Model Advisor tree.
task_obj = ModelAdvisor.Task(task_ID)
A variable representing the task object you create.
A string that uniquely identifies the task. The value of task_ID must remain constant. If you do not specify a task_ID, the Model Advisor assigns a random task_ID to the task object.
| Name | Description |
|---|---|
| setCheck | Specify check used in task |
Specify check used in task
task_obj.setCheck(check_ID)
A variable representing the task object.
A unique string that identifies the check to use in the task.
The setCheck method specifies the check to use in the task.
Note The following example is a fragment of code from the sl_customization.m file for the demo model slvnvdemo_mdladv. The example does not execute as shown without the additional content found in the sl_customization.m file. |
See Demo and Code Example for more information.
function defineTaskAdvisor
mdladvRoot = ModelAdvisor.Root;
MAT1 = ModelAdvisor.Task('com.mathworks.sample.TaskSample1');
MAT1.DisplayName='Example task with input parameter and auto-fix ability';
MAT1.setCheck('com.mathworks.sample.Check1');
mdladvRoot.register(MAT1);
MAT2 = ModelAdvisor.Task('com.mathworks.sample.TaskSample2');
MAT2.DisplayName='Example task 2';
MAT2.setCheck('com.mathworks.sample.Check2');
mdladvRoot.register(MAT2);
MAT3 = ModelAdvisor.Task('com.mathworks.sample.TaskSample3');
MAT3.DisplayName='Example task 3';
MAT3.setCheck('com.mathworks.sample.Check3');
mdladvRoot.register(MAT3);![]() | ModelAdvisor.Table | ModelAdvisor.Text | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |