Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Action::links() cannot be used for NS3Actions
authorMartin Quinson <martin.quinson@loria.fr>
Wed, 24 May 2017 12:45:54 +0000 (14:45 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Wed, 24 May 2017 12:45:54 +0000 (14:45 +0200)
src/surf/network_interface.cpp
src/surf/network_interface.hpp
src/surf/network_ns3.cpp
src/surf/network_ns3.hpp

index f14530a..c315bb1 100644 (file)
@@ -198,7 +198,7 @@ namespace simgrid {
     {
       std::list<LinkImpl*> retlist;
       lmm_system_t sys = getModel()->getMaxminSystem();
-      int llen         = lmm_get_number_of_cnst_from_var(sys, getVariable());
+      int llen         = lmm_get_number_of_cnst_from_var(sys, variable_);
 
       for (int i = 0; i < llen; i++) {
         /* Beware of composite actions: ptasks put links and cpus together */
index 01a2372..59c93cc 100644 (file)
@@ -206,7 +206,7 @@ public:
       : simgrid::surf::Action(model, cost, failed, var){};
 
   void setState(simgrid::surf::Action::State state) override;
-  std::list<LinkImpl*> links();
+  virtual std::list<LinkImpl*> links();
 
   double latency_;
   double latCurrent_;
index c2dda73..aedde29 100644 (file)
@@ -317,7 +317,12 @@ void NetworkNS3Action::resume() {
   THROW_UNIMPLEMENTED;
 }
 
-  /* Test whether a flow is suspended */
+std::list<LinkImpl*> NetworkNS3Action::links()
+{
+  THROW_UNIMPLEMENTED;
+}
+
+/* Test whether a flow is suspended */
 bool NetworkNS3Action::isSuspended()
 {
   return false;
index 40a49d6..d7ff3ce 100644 (file)
@@ -49,11 +49,12 @@ public:
   NetworkNS3Action(Model* model, double cost, s4u::Host* src, s4u::Host* dst);
 
   bool isSuspended();
-  int unref();
-  void suspend();
-  void resume();
+  int unref() override;
+  void suspend() override;
+  void resume() override;
+  std::list<LinkImpl*> links() override;
 
-//private:
+  // private:
   double lastSent_ = 0;
   s4u::Host* src_;
   s4u::Host* dst_;