slreq.dngSetSessionConfig
说明
示例
获取和设置配置上下文
此示例显示如何获取和设置当前工程中 IBM DOORS Next 会话的配置上下文。
指定服务器地址、需求管理服务根和用户名。
rmipref(OslcServerAddress="https://localhost:9443"); rmipref(OslcServerRMRoot="rm"); rmipref(OslcServerUser="jdoe");
通过指定工程、配置上下文、是否测试从系统浏览器到 MATLAB® 的连接以及自定义身份验证回调函数 myPasswordHelperCallback
来建立连接。函数myPasswordHelperCallback
获取密码。有关更多信息,请参阅 setCustomLoginProvider
。
slreq.dngConfigure("My Project","My Project Initial Stream", ... true,"myPasswordHelperCallback")
Performing default system browser message test. If browser warns about a missing certificate for 127.0.0.1, please allow the connection or add exemption for 127.0.0.1. https://127.0.0.1:31515/matlab/oslc/inboundTest
获取工程的可用配置上下文。
configs = slreq.dngGetProjectConfig
configs = 1×8 struct array with fields: id name type url
将配置上下文设置为结构体数组中的第一个配置上下文。
slreq.dngSetSessionConfig(configs(1))
设置配置上下文而不检查一致性
此示例显示如何获取和设置当前工程中 IBM DOORS Next 会话的配置上下文,而无需检查 IBM DOORS Next 中的配置上下文一致性。
指定服务器地址、需求管理服务根和用户名。
rmipref(OslcServerAddress="https://localhost:9443"); rmipref(OslcServerRMRoot="rm"); rmipref(OslcServerUser="jdoe");
通过指定工程、配置上下文、是否测试从系统浏览器到 MATLAB 的连接以及自定义身份验证回调函数 myPasswordHelperCallback
来建立连接。函数myPasswordHelperCallback
获取密码。有关更多信息,请参阅 setCustomLoginProvider
。
slreq.dngConfigure("My Project","My Project Initial Stream", ... true,"myPasswordHelperCallback")
Performing default system browser message test. If browser warns about a missing certificate for 127.0.0.1, please allow the connection or add exemption for 127.0.0.1. https://127.0.0.1:31515/matlab/oslc/inboundTest
获取工程的可用配置上下文。
configs = slreq.dngGetProjectConfig
configs = 1×8 struct array with fields: id name type url
将配置上下文设置为结构体数组中的第一个配置上下文。在 IBM DOORS Next 中不要检查配置上下文一致性。
slreq.dngSetSessionConfig(configs(1),true)
输入参数
config
— 配置上下文
字符串标量 | 字符向量 | 结构体
配置上下文,指定为字符串标量、字符向量或结构体。您可以通过指定字符串标量或字符向量来输入配置上下文的名称。或者,您可以输入由 slreq.dngGetProjectConfig
或 slreq.dngGetSessionConfig
函数返回的配置上下文结构体。
数据类型: char
| string
| struct
skipCheck
— 绕过配置上下文一致性检查的选项
false
或 0
(默认) | true
或 1
绕过 IBM DOORS Next 服务器中的配置上下文一致性检查的选项,指定为数字或逻辑 0
(false
) 或 1
(true
)。将此值设置为true
以绕过检查。
提示
当 MathWorks Requirements Toolbox 小组件未安装在您的 IBM DOORS Next 服务器上,或者该小组件未与 Requirements Toolbox™ 通信时,您可以使用此参量为 IBM DOORS Next 会话设置配置上下文。
数据类型: logical
版本历史记录
在 R2023b 中推出
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)