Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
try to fix ns3 examples. Not sure this was the way intended, but it avoids crashes...
authorAugustin Degomme <adegomme@gmail.com>
Wed, 3 Jun 2020 09:20:00 +0000 (11:20 +0200)
committerAugustin Degomme <adegomme@gmail.com>
Wed, 3 Jun 2020 09:20:00 +0000 (11:20 +0200)
src/surf/network_ns3.cpp
src/surf/network_ns3.hpp

index 34d92a0..f74f504 100644 (file)
@@ -286,7 +286,7 @@ LinkNS3::LinkNS3(NetworkNS3Model* model, const std::string& name, double bandwid
 {
   bandwidth_.peak = bandwidth;
   latency_.peak   = latency;
-
+  sharing_policy_ = policy;
   /* If wifi, create the wifizone now. If not, don't do anything: the links will be created in routeCreate_cb */
 
   s4u::Link::on_creation(*this->get_iface());
index 51561f6..4e4defd 100644 (file)
@@ -34,12 +34,14 @@ public:
   explicit LinkNS3(NetworkNS3Model* model, const std::string& name, double bandwidth, double latency,
                    s4u::Link::SharingPolicy policy);
   ~LinkNS3();
+  s4u::Link::SharingPolicy sharing_policy_;
 
   void apply_event(profile::Event* event, double value) override;
   void set_bandwidth(double value) override { THROW_UNIMPLEMENTED; }
   void set_latency(double value) override { THROW_UNIMPLEMENTED; }
   void set_bandwidth_profile(profile::Profile* profile) override;
   void set_latency_profile(profile::Profile* profile) override;
+  s4u::Link::SharingPolicy get_sharing_policy() override {return sharing_policy_;}
 };
 
 /**********