Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
please sonar, even if it is really pesky sometimes
[simgrid.git] / src / surf / network_interface.hpp
index 8db0f58..b94a0e0 100644 (file)
@@ -14,7 +14,6 @@
 #include "xbt/fifo.h"
 #include "xbt/dict.h"
 #include "surf_interface.hpp"
-#include "surf_routing.hpp"
 #include "src/surf/PropertyHolder.hpp"
 
 #include "simgrid/link.h"
@@ -32,15 +31,10 @@ namespace simgrid {
      *  Signature: `void(NetworkAction *action, simgrid::surf::Action::State old, simgrid::surf::Action::State current)` */
     XBT_PUBLIC_DATA(simgrid::xbt::signal<void(simgrid::surf::NetworkAction*, simgrid::surf::Action::State, simgrid::surf::Action::State)>) networkActionStateChangedCallbacks;
 
-  }
-}
 /*********
  * Model *
  *********/
 
-namespace simgrid {
-  namespace surf {
-
     /** @ingroup SURF_network_interface
      * @brief SURF network model interface class
      * @details A model is an object which handles the interactions between its Resources and its Actions
@@ -60,10 +54,9 @@ namespace simgrid {
        * @param bandwidth The initial bandwidth of the Link in bytes per second
        * @param latency The initial latency of the Link in seconds
        * @param policy The sharing policy of the Link
-       * @param props Dictionary of properties associated to this Link
        */
-      virtual Link* createLink(const char *name, double bandwidth, double latency,
-          e_surf_link_sharing_policy_t policy, xbt_dict_t properties)=0;
+      virtual Link* createLink(const charname, double bandwidth, double latency,
+                               e_surf_link_sharing_policy_t policy) = 0;
 
       /**
        * @brief Create a communication between two hosts.
@@ -120,6 +113,8 @@ namespace simgrid {
        */
       virtual double bandwidthConstraint(double rate, double bound, double size);
       double nextOccuringEventFull(double now) override;
+
+      Link* loopback_ = nullptr;
     };
 
     /************
@@ -134,13 +129,11 @@ namespace simgrid {
         public simgrid::surf::PropertyHolder {
         public:
 
-      /** @brief Constructor of non-LMM links */
-      Link(simgrid::surf::NetworkModel *model, const char *name, xbt_dict_t props);
       /** @brief Constructor of LMM links */
-      Link(simgrid::surf::NetworkModel *model, const char *name, xbt_dict_t props, lmm_constraint_t constraint);
+          Link(simgrid::surf::NetworkModel* model, const char* name, lmm_constraint_t constraint);
 
-      /* Link destruction logic */
-      /**************************/
+          /* Link destruction logic */
+          /**************************/
         protected:
       ~Link() override;
         public: