本文整理汇总了C++中Universe::UIDCount方法的典型用法代码示例。如果您正苦于以下问题:C++ Universe::UIDCount方法的具体用法?C++ Universe::UIDCount怎么用?C++ Universe::UIDCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Universe
的用法示例。
在下文中一共展示了Universe::UIDCount方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetUniverseInfo
/*
* Returns information on the active universes.
*/
void OlaServerServiceImpl::GetUniverseInfo(
RpcController* controller,
const OptionalUniverseRequest* request,
UniverseInfoReply* response,
ola::rpc::RpcService::CompletionCallback* done) {
ClosureRunner runner(done);
UniverseInfo *universe_info;
if (request->has_universe()) {
// return info for a single universe
Universe *universe = m_universe_store->GetUniverse(request->universe());
if (!universe)
return MissingUniverseError(controller);
universe_info = response->add_universe();
universe_info->set_universe(universe->UniverseId());
universe_info->set_name(universe->Name());
universe_info->set_merge_mode(universe->MergeMode() == Universe::MERGE_HTP
? ola::proto::HTP: ola::proto::LTP);
universe_info->set_input_port_count(universe->InputPortCount());
universe_info->set_output_port_count(universe->OutputPortCount());
universe_info->set_rdm_devices(universe->UIDCount());
} else {
// return all
vector<Universe*> uni_list;
m_universe_store->GetList(&uni_list);
vector<Universe*>::const_iterator iter;
for (iter = uni_list.begin(); iter != uni_list.end(); ++iter) {
universe_info = response->add_universe();
universe_info->set_universe((*iter)->UniverseId());
universe_info->set_name((*iter)->Name());
universe_info->set_merge_mode((*iter)->MergeMode() == Universe::MERGE_HTP
? ola::proto::HTP: ola::proto::LTP);
universe_info->set_input_port_count((*iter)->InputPortCount());
universe_info->set_output_port_count((*iter)->OutputPortCount());
universe_info->set_rdm_devices((*iter)->UIDCount());
}
}
}