MATLAB 帮助中心
本页采用了机器翻译。点击此处可查看最新英文版本。
为 OSLC 客户端设置服务器 URL
自 R2021a 起
setServer(myClient,serverURL)
setServer(myClient,serverURL) 将 OSLC 客户端 myClient 设置为 serverURL 指定的服务器 URL。
myClient
serverURL
示例
全部折叠
此示例说明如何为需求管理域在 MATLAB® 中创建 OSLC 客户端,并配置该客户端以连接到 OSLC 服务提供商。
创建 OSLC 客户端。
myClient = oslc.Client;
设置您的服务提供商的用户和服务器 URL。然后设置需求管理域的服务根和目录路径以及配置查询路径。
setUser(myClient,'jdoe'); setServer(myClient,'https://localhost:9443'); setServiceRoot(myClient,'rm'); setCatalogPath(myClient,'/oslc_rm/catalog'); setConfigurationQueryPath(myClient,'gc/oslc-query/configurations'); myClient
登录该客户端,并在提示时输入您的凭据。
login(myClient);
获取指定目录路径和服务根中的可用服务提供商。为 OSLC 客户端设置所需的服务提供商。
providers = getServiceProviderNames(myClient)
providers = 4×1 cell array {'OSLC Plugin' } {'Model Based Design with OSLC' } {'OSLC4RM' } {'Interactive Testing (Requirements Management)'}
setServiceProvider(myClient,'OSLC Plugin');
如果适用,获取可用的配置上下文。为 OSLC 客户端设置所需的配置上下文。
configurations = getConfigurationContextNames(myClient)
configurations = 2×1 cell array {'Initial Development'} {'Initial Baseline' }
setConfigurationContext(myClient,'Initial Development');
检查客户端属性。
myClient = Client with properties: ServiceProvider: 'OSLC Plugin' ConfigurationContext: 'Initial Development' CatalogUrl: 'https://localhost:9443/rm/oslc_rm/catalog'
oslc.Client
OSLC 客户端,指定为 oslc.Client 对象。
用于设置 OSLC 客户端的 OSLC 服务器 URL,指定为字符向量。
在 R2021a 中推出
oslc.Client | setCatalogPath | setServiceRoot | login | setUser
setCatalogPath
setServiceRoot
login
setUser
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处