]> AND Public Git Repository - simgrid.git/blobdiff - src/s4u/s4u_Netzone.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
do not store name in s4u::Disk
[simgrid.git] / src / s4u / s4u_Netzone.cpp
index 2298be598c82592da28feecd87055021dcb90088..90dedc88c782cea85941af79626db0804f142abf 100644 (file)
@@ -143,21 +143,42 @@ NetZone* NetZone::seal()
   return this;
 }
 
+s4u::Host* NetZone::create_host(const std::string& name, double speed)
+{
+  return create_host(name, std::vector<double>{speed});
+}
+
 s4u::Host* NetZone::create_host(const std::string& name, const std::vector<double>& speed_per_pstate)
 {
   return kernel::actor::simcall(
       [this, &name, &speed_per_pstate] { return pimpl_->create_host(name, speed_per_pstate); });
 }
+
+s4u::Host* NetZone::create_host(const std::string& name, const std::string& speed)
+{
+  return create_host(name, std::vector<std::string>{speed});
+}
+
 s4u::Host* NetZone::create_host(const std::string& name, const std::vector<std::string>& speed_per_pstate)
 {
   return create_host(name, Host::convert_pstate_speed_vector(speed_per_pstate));
 }
 
+s4u::Link* NetZone::create_link(const std::string& name, double bandwidth)
+{
+  return create_link(name, std::vector<double>{bandwidth});
+}
+
 s4u::Link* NetZone::create_link(const std::string& name, const std::vector<double>& bandwidths)
 {
   return kernel::actor::simcall([this, &name, &bandwidths] { return pimpl_->create_link(name, bandwidths); });
 }
 
+s4u::Link* NetZone::create_link(const std::string& name, const std::string& bandwidth)
+{
+  return create_link(name, std::vector<std::string>{bandwidth});
+}
+
 s4u::Link* NetZone::create_link(const std::string& name, const std::vector<std::string>& bandwidths)
 {
   std::vector<double> bw;
@@ -179,6 +200,10 @@ kernel::routing::NetPoint* NetZone::create_router(const std::string& name)
   return kernel::actor::simcall([this, &name] { return pimpl_->create_router(name); });
 }
 
+kernel::routing::NetPoint* NetZone::get_netpoint()
+{
+  return pimpl_->get_netpoint();
+}
 } // namespace s4u
 } // namespace simgrid