Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Wifi model interface:
[simgrid.git] / src / surf / network_ns3.cpp
index 36b798d..c6e2cce 100644 (file)
@@ -173,10 +173,11 @@ NetworkNS3Model::~NetworkNS3Model() {
   IPV4addr.clear();
 }
 
-LinkImpl* NetworkNS3Model::create_link(const std::string& name, double bandwidth, double latency,
+LinkImpl* NetworkNS3Model::create_link(const std::string& name, std::vector<double> bandwidths, double latency,
                                        s4u::Link::SharingPolicy policy)
 {
-  return new LinkNS3(this, name, bandwidth, latency);
+  xbt_assert(bandwidths.size() == 1, "Non WIFI links must use only 1 bandwidth.");
+  return new LinkNS3(this, name, bandwidths[0], latency);
 }
 
 Action* NetworkNS3Model::communicate(s4u::Host* src, s4u::Host* dst, double size, double rate)