sltest.testsequence.getScenarioControlSource
说明
返回控制由 scenarioCtrlSource
= sltest.testsequence.getScenarioControlSource(blockPath
)blockPath
指定的 Test Sequence 模块的活动场景的源。
示例
获取控制活动场景的源
设置 sltestRollRefTestExample
模型中的 Test Sequence 模块以使用场景。将控制源设置为工作区。然后,获取控制活动场景的源的名称。
Model = 'sltestRollRefTestExample'; load_system(Model); sltest.testsequence.useScenario... ('sltestRollRefTestExample/Test Sequence',... 'Scenario_1'); sltest.testsequence.setScenarioControlSource... ('sltestRollRefTestExample/Test Sequence',... sltest.testsequence.ScenarioControlSource.Workspace); scenarioControlSource = ... sltest.testsequence.getScenarioControlSource... ('sltestRollRefTestExample/Test Sequence')
scenarioCtrlSource = ScenarioControlSource enumeration Workspace
关闭模型而不保存。
close_system(Model,0)
输入参数
blockPath
— Test Sequence 模块路径或句柄
字符串 | 字符向量
Test Sequence 模块的路径,包括模块名称,指定为字符串或字符向量。您可以使用模块句柄,而不是模块路径。
示例: 'FanSpeedTestHarness/Test Sequence'
输出参量
scenarioCtrlSource
— 活动场景控制源
sltest.testsequence.ScenarioControlSource.Block | sltest.testsequence.ScenarioControlSource.工作区
活动场景控制源,以以下任一枚举值返回:
sltest.testsequence.ScenarioControlSource.Block
— 通过在 Test Sequence 模块中设置来控制活动场景。sltest.testsequence.ScenarioControlSource.Workspace
—活动场景由指定活动场景索引的工作区变量控制。变量可以位于基础工作区、模型工作区或数据字典中。
版本历史记录
在 R2020b 中推出
MATLAB 命令
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)