本文整理汇总了C++中DiscoveryQos::setProviderMustSupportOnChange方法的典型用法代码示例。如果您正苦于以下问题:C++ DiscoveryQos::setProviderMustSupportOnChange方法的具体用法?C++ DiscoveryQos::setProviderMustSupportOnChange怎么用?C++ DiscoveryQos::setProviderMustSupportOnChange使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DiscoveryQos
的用法示例。
在下文中一共展示了DiscoveryQos::setProviderMustSupportOnChange方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: copyDbusDiscoveryQosToJoynr
void DbusCapabilitiesUtil::copyDbusDiscoveryQosToJoynr(const joynr::messaging::types::Types::DiscoveryQos& dbusDiscoveryQos, DiscoveryQos& joynrDiscoveryQos) {
// copy arbitration strategy
switch (dbusDiscoveryQos.arbitrationStrategy) {
case joynr::messaging::types::Types::ArbitrationStrategy::FIXED_CHANNEL:
joynrDiscoveryQos.setArbitrationStrategy(DiscoveryQos::ArbitrationStrategy::FIXED_PARTICIPANT);
break;
case joynr::messaging::types::Types::ArbitrationStrategy::HIGHEST_PRIORITY:
joynrDiscoveryQos.setArbitrationStrategy(DiscoveryQos::ArbitrationStrategy::HIGHEST_PRIORITY);
break;
case joynr::messaging::types::Types::ArbitrationStrategy::KEYWORD:
joynrDiscoveryQos.setArbitrationStrategy(DiscoveryQos::ArbitrationStrategy::KEYWORD);
break;
case joynr::messaging::types::Types::ArbitrationStrategy::LOCAL_ONLY:
joynrDiscoveryQos.setArbitrationStrategy(DiscoveryQos::ArbitrationStrategy::LOCAL_ONLY);
break;
case joynr::messaging::types::Types::ArbitrationStrategy::NOT_SET:
joynrDiscoveryQos.setArbitrationStrategy(DiscoveryQos::ArbitrationStrategy::NOT_SET);
break;
default:
assert(false);
}
switch(dbusDiscoveryQos.discoveryScope) {
case joynr::messaging::types::Types::DiscoveryScope::GLOBAL_ONLY:
joynrDiscoveryQos.setDiscoveryScope(DiscoveryQos::DiscoveryScope::GLOBAL_ONLY);
break;
case joynr::messaging::types::Types::DiscoveryScope::LOCAL_ONLY:
joynrDiscoveryQos.setDiscoveryScope(DiscoveryQos::DiscoveryScope::LOCAL_ONLY);
break;
case joynr::messaging::types::Types::DiscoveryScope::LOCAL_THEN_GLOBAL:
joynrDiscoveryQos.setDiscoveryScope(DiscoveryQos::DiscoveryScope::LOCAL_THEN_GLOBAL);
break;
case joynr::messaging::types::Types::DiscoveryScope::LOCAL_AND_GLOBAL:
joynrDiscoveryQos.setDiscoveryScope(DiscoveryQos::DiscoveryScope::LOCAL_AND_GLOBAL);
break;
default:
assert(false);
}
joynrDiscoveryQos.setCacheMaxAge(dbusDiscoveryQos.cacheMaxAge);
joynrDiscoveryQos.setDiscoveryTimeout(dbusDiscoveryQos.discoveryTimeout);
joynrDiscoveryQos.setProviderMustSupportOnChange(dbusDiscoveryQos.providerMustSupportOnChange);
joynrDiscoveryQos.setRetryInterval(dbusDiscoveryQos.retryInterval);
// copy the custom parameters
auto parameterMap = dbusDiscoveryQos.customParameters;
for(auto it = parameterMap.begin(); it != parameterMap.end(); it++) {
joynr::messaging::types::Types::CustomParameter parameter = it->second;
// initialize the joynr parameter
joynrDiscoveryQos.addCustomParameter(QString::fromStdString(parameter.name),
QString::fromStdString(parameter.value));
}
}