当前位置: 首页>>代码示例>>C++>>正文


C++ UIDSet::End方法代码示例

本文整理汇总了C++中UIDSet::End方法的典型用法代码示例。如果您正苦于以下问题:C++ UIDSet::End方法的具体用法?C++ UIDSet::End怎么用?C++ UIDSet::End使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UIDSet的用法示例。


在下文中一共展示了UIDSet::End方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: PopulateResponderListFromUIDs

/**
 * Build a vector of MockResponder objects with the given uids.
 */
void DiscoveryAgentTest::PopulateResponderListFromUIDs(
    const UIDSet &uids,
    ResponderList *responders) {
  UIDSet::Iterator iter = uids.Begin();
  for (; iter != uids.End(); iter++)
    responders->push_back(new MockResponder(*iter));
}
开发者ID:Siliconsoul,项目名称:ola,代码行数:10,代码来源:DiscoveryAgentTest.cpp

示例2: ShowUIDs

 void ShowUIDs() {
   UIDSet::Iterator iter = m_uids.Begin();
   cout << "---------- " << m_uids.Size() << " UIDs -------" << endl;
   char c = 'A';
   for (; iter != m_uids.End(); ++iter) {
     if (c <= 'Z') {
       cout << *iter << " (" << c++ << ")" << endl;
     } else {
       cout << *iter << endl;
     }
   }
   cout << "-------------------------" << endl;
 }
开发者ID:DanielAeolusLaude,项目名称:ola,代码行数:13,代码来源:ja-rule-controller.cpp

示例3: RDMDiscoveryComplete

/**
 * Called when RDM discovery completes
 */
void OlaServerServiceImpl::RDMDiscoveryComplete(
    unsigned int universe_id,
    ola::rpc::RpcService::CompletionCallback* done,
    ola::proto::UIDListReply *response,
    const UIDSet &uids) {
  ClosureRunner runner(done);

  response->set_universe(universe_id);
  UIDSet::Iterator iter = uids.Begin();
  for (; iter != uids.End(); ++iter) {
    ola::proto::UID *uid = response->add_uid();
    SetProtoUID(*iter, uid);
  }
}
开发者ID:basileus,项目名称:ola,代码行数:17,代码来源:OlaServerServiceImpl.cpp

示例4: RDMDiscoveryComplete

/**
 * Called when RDM discovery completes
 */
void OlaServerServiceImpl::RDMDiscoveryComplete(
    unsigned int universe_id,
    google::protobuf::Closure* done,
    ola::proto::UIDListReply *response,
    const UIDSet &uids) {
  ClosureRunner runner(done);

  response->set_universe(universe_id);
  UIDSet::Iterator iter = uids.Begin();
  for (; iter != uids.End(); ++iter) {
    ola::proto::UID *uid = response->add_uid();
    uid->set_esta_id(iter->ManufacturerId());
    uid->set_device_id(iter->DeviceId());
  }
}
开发者ID:Siliconsoul,项目名称:ola,代码行数:18,代码来源:OlaServerServiceImpl.cpp

示例5: UIDList

/*
 * This is called when we receive uids for a universe
 * @param universes a vector of OlaUniverses
 */
void UIDList(const ola::rdm::UIDSet &uids,
             const string &error) {
  UIDSet vendorcast;
  if (error.empty()) {
    UIDSet::Iterator iter = uids.Begin();
    for (; iter != uids.End(); ++iter) {
      cout << *iter << endl;
      vendorcast.AddUID(UID::VendorcastAddress(*iter));
    }
    if (opts.vendorcast) {
      iter = vendorcast.Begin();
      for (; iter != vendorcast.End(); ++iter) {
        cout << *iter << endl;
      }
    }
    if (opts.broadcast) {
      cout << UID::AllDevices().ToString() << endl;
    }
  } else {
    cerr << error << endl;
  }
  ss->Terminate();
}
开发者ID:Jazeido,项目名称:ola,代码行数:27,代码来源:ola-rdm-discover.cpp


注:本文中的UIDSet::End方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。