|
|
|
| R2012a Documentation → Simulink Verification and Validation | |
Learn more about Simulink Verification and Validation |
|
| Contents | Index |
Create custom checks
The ModelAdvisor.Check class creates a Model Advisor check object. All checks must have an associated ModelAdvisor.Task object to be displayed in the Model Advisor tree.
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 displayed in the By Product > Simulink folder and in the By Task > Model Referencing folder in the Model Advisor tree.
When you use checks in task definitions, the following rules apply:
If you define the properties of the check in the check definition and the task definition, the task definition takes precedence. The Model Advisor displays the information contained in the task definition. For example, if you define the name of the check in the task definition using the ModelAdvisor.Task.DisplayName property and in the check definition using the ModelAdvisor.Check.Title property, the Model Advisor displays the information provided in ModelAdvisor.Task.DisplayName.
If you define the properties of the check in the check definition but not the task definition, the task uses the properties from the check. For example, if you define the name of the check in the check definition using the ModelAdvisor.Check.Title property, and you register the check using a task definition, the Model Advisor displays the information provided in ModelAdvisor.Check.Title.
If you define the properties of the check in the task definition but not the check definition, the Model Advisor displays the information as long as you register the task with the Model Advisor instead of the check. For example, if you define the name of the check in the task definition using the ModelAdvisor.Task.DisplayName property instead of the ModelAdvisor.Check.Title property, and you register the check using a task definition, the Model Advisor displays the information provided in ModelAdvisor.Task.DisplayName.
| ModelAdvisor.Check | Create custom checks |
| getID | Return check identifier |
| setAction | Specify action for check |
| setCallbackFcn | Specify callback function for check |
| setInputParameters | Specify input parameters for check |
| setInputParametersLayoutGrid | Specify layout grid for input parameters |
| CallbackContext | Specify when to run check |
| CallbackHandle | Callback function handle for check |
| CallbackStyle | Callback function type |
| EmitInputParametersToReport | Display check input parameters in the Model Advisor report |
| Enable | Indicate whether user can enable or disable check |
| ID | Identifier for check |
| LicenseName | Product license names required to display and run check |
| ListViewVisible | Status of Explore Result button |
| Result | Results cell array |
| supportExclusion | Set to support exclusions |
| Title | Name of check |
| TitleTips | Description of check |
| Value | Status of check |
| Visible | Indicate to display or hide check |
Handle. To learn how this affects your use of the class, see Copying Objects in the MATLAB Programming Fundamentals documentation.
rec = ModelAdvisor.Check('com.mathworks.sample.Check1');
Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |