Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
allow to retrieve the link list from the Engine
authorMartin Quinson <martin.quinson@loria.fr>
Tue, 21 Nov 2017 15:15:58 +0000 (16:15 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Tue, 21 Nov 2017 15:15:58 +0000 (16:15 +0100)
include/simgrid/s4u/Engine.hpp
src/s4u/s4u_engine.cpp

index e705bab..805a309 100644 (file)
@@ -58,6 +58,8 @@ public:
 
   size_t getHostCount();
   void getHostList(std::vector<Host*> * whereTo);
+  size_t getLinkCount();
+  void getLinkList(std::vector<Link*> * list);
 
   /** @brief Run the simulation */
   void run();
index c16b189..886cc33 100644 (file)
@@ -93,6 +93,16 @@ void Engine::getHostList(std::vector<Host*>* list)
   for (auto const& kv : host_list)
     list->push_back(kv.second);
 }
+/** @brief Returns the amount of links in the platform */
+size_t Engine::getLinkCount()
+{
+  return simgrid::surf::LinkImpl::linksCount();
+}
+/** @brief Fills the passed list with all hosts found in the platform */
+void Engine::getLinkList(std::vector<Link*>* list)
+{
+  simgrid::surf::LinkImpl::linksList(list);
+}
 
 void Engine::run() {
   if (MC_is_active()) {