Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
reorganize *LinkImpl stuff
authorSUTER Frederic <frederic.suter@cc.in2p3.fr>
Wed, 5 Jan 2022 14:56:37 +0000 (15:56 +0100)
committerSUTER Frederic <frederic.suter@cc.in2p3.fr>
Wed, 5 Jan 2022 16:54:29 +0000 (17:54 +0100)
68 files changed:
MANIFEST.in
include/simgrid/forward.h
include/simgrid/kernel/routing/ClusterZone.hpp
include/simgrid/kernel/routing/DragonflyZone.hpp
include/simgrid/kernel/routing/FatTreeZone.hpp
include/simgrid/kernel/routing/NetZoneImpl.hpp
include/simgrid/kernel/routing/RoutedZone.hpp
include/simgrid/kernel/routing/StarZone.hpp
include/simgrid/kernel/routing/WifiZone.hpp
include/simgrid/s4u/Engine.hpp
include/simgrid/s4u/Host.hpp
include/simgrid/s4u/Link.hpp
include/simgrid/s4u/NetZone.hpp
src/instr/instr_interface.cpp
src/instr/instr_platform.cpp
src/kernel/EngineImpl.cpp
src/kernel/EngineImpl.hpp
src/kernel/activity/CommImpl.cpp
src/kernel/resource/LinkImpl.cpp [moved from src/surf/network_interface.cpp with 79% similarity]
src/kernel/resource/LinkImpl.hpp [moved from src/surf/network_interface.hpp with 68% similarity]
src/kernel/resource/SplitDuplexLinkImpl.cpp [moved from src/surf/SplitDuplexLinkImpl.cpp with 90% similarity]
src/kernel/resource/SplitDuplexLinkImpl.hpp [moved from src/surf/SplitDuplexLinkImpl.hpp with 85% similarity]
src/kernel/resource/SplitDuplexLinkImpl_test.cpp [moved from src/surf/SplitDuplexLinkImpl_test.cpp with 96% similarity]
src/kernel/resource/StandardLinkImpl.cpp [moved from src/surf/LinkImpl.cpp with 82% similarity]
src/kernel/resource/StandardLinkImpl.hpp [moved from src/surf/LinkImpl.hpp with 76% similarity]
src/kernel/resource/WifiLinkImpl.cpp [moved from src/surf/network_wifi.cpp with 69% similarity]
src/kernel/resource/WifiLinkImpl.hpp [moved from src/surf/network_wifi.hpp with 67% similarity]
src/kernel/routing/ClusterZone.cpp
src/kernel/routing/DijkstraZone.cpp
src/kernel/routing/DijkstraZone_test.cpp
src/kernel/routing/DragonflyZone.cpp
src/kernel/routing/FatTreeZone.cpp
src/kernel/routing/FloydZone.cpp
src/kernel/routing/FloydZone_test.cpp
src/kernel/routing/FullZone.cpp
src/kernel/routing/FullZone_test.cpp
src/kernel/routing/NetZoneImpl.cpp
src/kernel/routing/RoutedZone.cpp
src/kernel/routing/StarZone.cpp
src/kernel/routing/StarZone_test.cpp
src/kernel/routing/TorusZone.cpp
src/kernel/routing/VivaldiZone.cpp
src/kernel/routing/WifiZone.cpp
src/plugins/host_dvfs.cpp
src/plugins/link_energy_wifi.cpp
src/plugins/link_load.cpp
src/s4u/s4u_Host.cpp
src/s4u/s4u_Link.cpp
src/s4u/s4u_Netzone.cpp
src/surf/HostImpl.hpp
src/surf/LinkImplIntf.hpp [deleted file]
src/surf/network_cm02.cpp
src/surf/network_cm02.hpp
src/surf/network_constant.cpp
src/surf/network_constant.hpp
src/surf/network_ns3.cpp
src/surf/network_ns3.hpp
src/surf/ptask_L07.cpp
src/surf/ptask_L07.hpp
src/surf/xml/surfxml_parseplatf.cpp
src/surf/xml/surfxml_sax_cb.cpp
teshsuite/models/wifi_usage/wifi_usage.cpp
teshsuite/models/wifi_usage_decay/wifi_usage_decay.cpp
teshsuite/platforms/flatifier.cpp
teshsuite/surf/surf_usage/surf_usage.cpp
teshsuite/surf/surf_usage2/surf_usage2.cpp
tools/cmake/DefinePackages.cmake
tools/cmake/Tests.cmake

index 29c5e33..583e1ab 100644 (file)
@@ -2284,11 +2284,20 @@ include src/kernel/resource/CpuImpl.cpp
 include src/kernel/resource/CpuImpl.hpp
 include src/kernel/resource/DiskImpl.cpp
 include src/kernel/resource/DiskImpl.hpp
+include src/kernel/resource/LinkImpl.cpp
+include src/kernel/resource/LinkImpl.hpp
 include src/kernel/resource/Model.cpp
 include src/kernel/resource/NetworkModelIntf_test.cpp
 include src/kernel/resource/Resource.hpp
+include src/kernel/resource/SplitDuplexLinkImpl.cpp
+include src/kernel/resource/SplitDuplexLinkImpl.hpp
+include src/kernel/resource/SplitDuplexLinkImpl_test.cpp
+include src/kernel/resource/StandardLinkImpl.cpp
+include src/kernel/resource/StandardLinkImpl.hpp
 include src/kernel/resource/VirtualMachineImpl.cpp
 include src/kernel/resource/VirtualMachineImpl.hpp
+include src/kernel/resource/WifiLinkImpl.cpp
+include src/kernel/resource/WifiLinkImpl.hpp
 include src/kernel/resource/profile/DatedValue.cpp
 include src/kernel/resource/profile/DatedValue.hpp
 include src/kernel/resource/profile/Event.hpp
@@ -2641,12 +2650,6 @@ include src/smpi/smpirun.in
 include src/smpi/smpitools.sh
 include src/surf/HostImpl.cpp
 include src/surf/HostImpl.hpp
-include src/surf/LinkImpl.cpp
-include src/surf/LinkImpl.hpp
-include src/surf/LinkImplIntf.hpp
-include src/surf/SplitDuplexLinkImpl.cpp
-include src/surf/SplitDuplexLinkImpl.hpp
-include src/surf/SplitDuplexLinkImpl_test.cpp
 include src/surf/cpu_cas01.cpp
 include src/surf/cpu_cas01.hpp
 include src/surf/cpu_ti.cpp
@@ -2661,14 +2664,10 @@ include src/surf/network_constant.cpp
 include src/surf/network_constant.hpp
 include src/surf/network_ib.cpp
 include src/surf/network_ib.hpp
-include src/surf/network_interface.cpp
-include src/surf/network_interface.hpp
 include src/surf/network_ns3.cpp
 include src/surf/network_ns3.hpp
 include src/surf/network_smpi.cpp
 include src/surf/network_smpi.hpp
-include src/surf/network_wifi.cpp
-include src/surf/network_wifi.hpp
 include src/surf/ns3/ns3_simulator.cpp
 include src/surf/ns3/ns3_simulator.hpp
 include src/surf/ptask_L07.cpp
index f5f5c6a..ab25b7f 100644 (file)
@@ -173,8 +173,8 @@ class HostModel;
 class NetworkModel;
 class NetworkModelIntf;
 class LinkImpl;
+class StandardLinkImpl;
 class SplitDuplexLinkImpl;
-class LinkImplIntf;
 class NetworkAction;
 class DiskImpl;
 class DiskModel;
index 8ed8894..4efbe49 100644 (file)
@@ -88,9 +88,9 @@ protected:
 class XBT_PRIVATE ClusterBase : public ClusterZone {
   /* We use a map instead of a std::vector here because that's a sparse vector. Some values may not exist */
   /* The pair is {link_up, link_down} */
-  std::unordered_map<unsigned long, std::pair<resource::LinkImpl*, resource::LinkImpl*>> private_links_;
+  std::unordered_map<unsigned long, std::pair<resource::StandardLinkImpl*, resource::StandardLinkImpl*>> private_links_;
   std::unordered_map<unsigned long, NetPoint*> gateways_; //!< list of gateways for leafs (if they're netzones)
-  resource::LinkImpl* backbone_     = nullptr;
+  resource::StandardLinkImpl* backbone_ = nullptr;
   NetPoint* router_                 = nullptr;
   bool has_limiter_                 = false;
   bool has_loopback_                = false;
@@ -104,8 +104,14 @@ class XBT_PRIVATE ClusterBase : public ClusterZone {
 protected:
   using ClusterZone::ClusterZone;
   void set_num_links_per_node(unsigned long num) { num_links_per_node_ = num; }
-  resource::LinkImpl* get_uplink_from(unsigned long position) const { return private_links_.at(position).first; }
-  resource::LinkImpl* get_downlink_to(unsigned long position) const { return private_links_.at(position).second; }
+  resource::StandardLinkImpl* get_uplink_from(unsigned long position) const
+  {
+    return private_links_.at(position).first;
+  }
+  resource::StandardLinkImpl* get_downlink_to(unsigned long position) const
+  {
+    return private_links_.at(position).second;
+  }
 
   double get_link_latency() const { return link_lat_; }
   double get_link_bandwidth() const { return link_bw_; }
@@ -115,14 +121,15 @@ protected:
   bool has_loopback() const { return has_loopback_; }
   void set_limiter();
   bool has_limiter() const { return has_limiter_; }
-  void set_backbone(resource::LinkImpl* bb) { backbone_ = bb; }
+  void set_backbone(resource::StandardLinkImpl* bb) { backbone_ = bb; }
   bool has_backbone() const { return backbone_ != nullptr; }
   void set_router(NetPoint* router) { router_ = router; }
   /** @brief Sets gateway for the leaf */
   void set_gateway(unsigned long position, NetPoint* gateway);
   /** @brief Gets gateway for the leaf or nullptr */
   NetPoint* get_gateway(unsigned long position);
-  void add_private_link_at(unsigned long position, std::pair<resource::LinkImpl*, resource::LinkImpl*> link);
+  void add_private_link_at(unsigned long position,
+                           std::pair<resource::StandardLinkImpl*, resource::StandardLinkImpl*> link);
   bool private_link_exists_at(unsigned long position) const
   {
     return private_links_.find(position) != private_links_.end();
index bfbc897..e0f0c4f 100644 (file)
@@ -18,12 +18,12 @@ public:
   unsigned int group_;
   unsigned int chassis_;
   unsigned int blade_;
-  resource::LinkImpl* blue_link_ = nullptr;
-  resource::LinkImpl* limiter_   = nullptr;
-  std::vector<resource::LinkImpl*> black_links_;
-  std::vector<resource::LinkImpl*> green_links_;
-  std::vector<resource::LinkImpl*> my_nodes_;
-  DragonflyRouter(unsigned group, unsigned chassis, unsigned blade, resource::LinkImpl* limiter)
+  resource::StandardLinkImpl* blue_link_ = nullptr;
+  resource::StandardLinkImpl* limiter_   = nullptr;
+  std::vector<resource::StandardLinkImpl*> black_links_;
+  std::vector<resource::StandardLinkImpl*> green_links_;
+  std::vector<resource::StandardLinkImpl*> my_nodes_;
+  DragonflyRouter(unsigned group, unsigned chassis, unsigned blade, resource::StandardLinkImpl* limiter)
       : group_(group), chassis_(chassis), blade_(blade), limiter_(limiter)
   {
   }
@@ -96,7 +96,8 @@ public:
 private:
   void generate_routers(const s4u::ClusterCallbacks& set_callbacks);
   void generate_links();
-  void generate_link(const std::string& id, int numlinks, resource::LinkImpl** linkup, resource::LinkImpl** linkdown);
+  void generate_link(const std::string& id, int numlinks, resource::StandardLinkImpl** linkup,
+                     resource::StandardLinkImpl** linkdown);
 
   unsigned int num_nodes_per_blade_    = 0;
   unsigned int num_blades_per_chassis_ = 0;
index a493182..2f45948 100644 (file)
@@ -46,12 +46,13 @@ public:
 
   /** Virtual link standing for the node global capacity.
    */
-  resource::LinkImpl* limiter_link_;
+  resource::StandardLinkImpl* limiter_link_;
   /** If present, communications from this node to this node will pass through it
    * instead of passing by an upper level switch.
    */
-  resource::LinkImpl* loopback_;
-  FatTreeNode(int id, int level, int position, resource::LinkImpl* limiter, resource::LinkImpl* loopback)
+  resource::StandardLinkImpl* loopback_;
+  FatTreeNode(int id, int level, int position, resource::StandardLinkImpl* limiter,
+              resource::StandardLinkImpl* loopback)
       : id(id), level(level), position(position), limiter_link_(limiter), loopback_(loopback)
   {
   }
@@ -64,7 +65,8 @@ public:
  */
 class FatTreeLink {
 public:
-  FatTreeLink(FatTreeNode* src, FatTreeNode* dst, resource::LinkImpl* linkup, resource::LinkImpl* linkdown)
+  FatTreeLink(FatTreeNode* src, FatTreeNode* dst, resource::StandardLinkImpl* linkup,
+              resource::StandardLinkImpl* linkdown)
       : up_node_(dst), down_node_(src), up_link_(linkup), down_link_(linkdown)
   {
   }
@@ -73,9 +75,9 @@ public:
   /** Lower end of the link */
   FatTreeNode* down_node_;
   /** Link going up in the tree */
-  resource::LinkImpl* up_link_;
+  resource::StandardLinkImpl* up_link_;
   /** Link going down in the tree */
-  resource::LinkImpl* down_link_;
+  resource::StandardLinkImpl* down_link_;
 };
 
 /** @ingroup ROUTING_API
@@ -148,7 +150,7 @@ public:
   /** @brief Set FatTree topology */
   void set_topology(unsigned int n_levels, const std::vector<unsigned int>& down_links,
                     const std::vector<unsigned int>& up_links, const std::vector<unsigned int>& link_count);
-  void add_processing_node(int id, resource::LinkImpl* limiter, resource::LinkImpl* loopback);
+  void add_processing_node(int id, resource::StandardLinkImpl* limiter, resource::StandardLinkImpl* loopback);
   /**
    * @brief Build upper levels (switches) in Fat-Tree
    *
index 4ca0386..733d7b4 100644 (file)
@@ -31,7 +31,7 @@ public:
   NetPoint* dst_    = nullptr;
   NetPoint* gw_src_ = nullptr;
   NetPoint* gw_dst_ = nullptr;
-  std::vector<resource::LinkImpl*> link_list_;
+  std::vector<resource::StandardLinkImpl*> link_list_;
 };
 
 class BypassRoute {
@@ -39,7 +39,7 @@ public:
   explicit BypassRoute(NetPoint* gwSrc, NetPoint* gwDst) : gw_src(gwSrc), gw_dst(gwDst) {}
   NetPoint* gw_src;
   NetPoint* gw_dst;
-  std::vector<resource::LinkImpl*> links;
+  std::vector<resource::StandardLinkImpl*> links;
 };
 
 /** @ingroup ROUTING_API
@@ -104,15 +104,15 @@ protected:
   /** @brief retrieves the list of all routes of size 1 (of type src x dst x Link) */
   /* returns whether we found a bypass path */
   bool get_bypass_route(const routing::NetPoint* src, const routing::NetPoint* dst,
-                        /* OUT */ std::vector<resource::LinkImpl*>& links, double* latency,
+                        /* OUT */ std::vector<resource::StandardLinkImpl*>& links, double* latency,
                         std::unordered_set<NetZoneImpl*>& netzones);
 
   /** @brief Get the NetZone that is represented by the netpoint */
   const NetZoneImpl* get_netzone_recursive(const NetPoint* netpoint) const;
 
   /** @brief Get the list of LinkImpl* to add in a route, considering split-duplex links and the direction */
-  std::vector<resource::LinkImpl*> get_link_list_impl(const std::vector<s4u::LinkInRoute>& link_list,
-                                                      bool backroute) const;
+  std::vector<resource::StandardLinkImpl*> get_link_list_impl(const std::vector<s4u::LinkInRoute>& link_list,
+                                                              bool backroute) const;
 
 public:
   enum class RoutingMode {
@@ -191,11 +191,11 @@ public:
    * @param latency Accumulator in which the latencies should be added (caller must set it to 0)
    */
   static void get_global_route(const NetPoint* src, const NetPoint* dst,
-                               /* OUT */ std::vector<resource::LinkImpl*>& links, double* latency);
+                               /* OUT */ std::vector<resource::StandardLinkImpl*>& links, double* latency);
 
   /** @brief Similar to get_global_route but get the NetZones traversed by route */
   static void get_global_route_with_netzones(const NetPoint* src, const NetPoint* dst,
-                                             /* OUT */ std::vector<resource::LinkImpl*>& links, double* latency,
+                                             /* OUT */ std::vector<resource::StandardLinkImpl*>& links, double* latency,
                                              std::unordered_set<NetZoneImpl*>& netzones);
 
   virtual void get_graph(const s_xbt_graph_t* graph, std::map<std::string, xbt_node_t, std::less<>>* nodes,
@@ -203,7 +203,7 @@ public:
 
   /*** Called on each newly created regular route (not on bypass routes) */
   static xbt::signal<void(bool symmetrical, NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst,
-                          std::vector<resource::LinkImpl*> const& link_list)>
+                          std::vector<resource::StandardLinkImpl*> const& link_list)>
       on_route_creation; // XBT_ATTRIB_DEPRECATED_v332 : should be an internal signal used by NS3.. if necessary,
                          // callback shouldn't use LinkImpl*
 
index 8b69c7c..a8fe0d8 100644 (file)
@@ -57,7 +57,7 @@ public:
 
 protected:
   Route* new_extended_route(RoutingMode hierarchy, NetPoint* gw_src, NetPoint* gw_dst,
-                            const std::vector<resource::LinkImpl*>& link_list, bool preserve_order);
+                            const std::vector<resource::StandardLinkImpl*>& link_list, bool preserve_order);
   void get_route_check_params(const NetPoint* src, const NetPoint* dst) const;
   void add_route_check_params(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst,
                               const std::vector<s4u::LinkInRoute>& link_list, bool symmetrical) const;
index 9327c3b..f000d6f 100644 (file)
@@ -75,9 +75,9 @@ public:
 private:
   class StarRoute {
   public:
-    std::vector<resource::LinkImpl*> links_up;   //!< list of links UP for route (can be empty)
-    std::vector<resource::LinkImpl*> links_down; //!< list of links DOWN for route (can be empty)
-    std::vector<resource::LinkImpl*> loopback;   //!< loopback links, cannot be empty if configured
+    std::vector<resource::StandardLinkImpl*> links_up;   //!< list of links UP for route (can be empty)
+    std::vector<resource::StandardLinkImpl*> links_down; //!< list of links DOWN for route (can be empty)
+    std::vector<resource::StandardLinkImpl*> loopback;   //!< loopback links, cannot be empty if configured
     bool links_up_set   = false;                 //!< bool to indicate that links_up was configured (empty or not)
     bool links_down_set = false;                 //!< same for links_down
     NetPoint* gateway   = nullptr;
@@ -86,8 +86,8 @@ private:
     bool has_links_down() const { return links_down_set; }
   };
   /** @brief Auxiliary method to add links to a route */
-  void add_links_to_route(const std::vector<resource::LinkImpl*>& links, Route* route, double* latency,
-                          std::unordered_set<resource::LinkImpl*>& added_links) const;
+  void add_links_to_route(const std::vector<resource::StandardLinkImpl*>& links, Route* route, double* latency,
+                          std::unordered_set<resource::StandardLinkImpl*>& added_links) const;
   /** @brief Auxiliary methods to check params received in add_route method */
   void check_add_route_param(const NetPoint* src, const NetPoint* dst, const NetPoint* gw_src, const NetPoint* gw_dst,
                              bool symmetrical) const;
index 830779a..e8d2214 100644 (file)
@@ -19,7 +19,7 @@ namespace routing {
  *  That link is used for all communications within the zone.
  */
 class XBT_PRIVATE WifiZone : public RoutedZone {
-  resource::LinkImpl* wifi_link_ = nullptr; // Representing the air media (there is no such thing in NS-3)
+  resource::StandardLinkImpl* wifi_link_ = nullptr; // Representing the air media (there is no such thing in NS-3)
   NetPoint* access_point_        = nullptr; // Zone's gateway to the external world
 
   void do_seal() override;
index db83801..e51f478 100644 (file)
@@ -98,7 +98,7 @@ protected:
   friend kernel::routing::NetPoint;
   friend kernel::routing::NetZoneImpl;
   friend kernel::resource::HostImpl;
-  friend kernel::resource::LinkImpl;
+  friend kernel::resource::StandardLinkImpl;
   void host_register(const std::string& name, Host* host);
   void host_unregister(const std::string& name);
   void link_register(const std::string& name, const Link* link);
index b59ec85..74d0f43 100644 (file)
@@ -222,7 +222,7 @@ public:
   VirtualMachine* create_vm(const std::string& name, int core_amount, size_t ramsize);
 
   void route_to(const Host* dest, std::vector<Link*>& links, double* latency) const;
-  void route_to(const Host* dest, std::vector<kernel::resource::LinkImpl*>& links, double* latency) const;
+  void route_to(const Host* dest, std::vector<kernel::resource::StandardLinkImpl*>& links, double* latency) const;
 
   /**
    * @brief Seal this host
index c473b10..5924c0f 100644 (file)
@@ -31,15 +31,15 @@ namespace s4u {
  */
 class XBT_PUBLIC Link : public xbt::Extendable<Link> {
 #ifndef DOXYGEN
-  friend kernel::resource::LinkImpl;
+  friend kernel::resource::StandardLinkImpl;
 #endif
 
 protected:
   // Links are created from the NetZone, and destroyed by their private implementation when the simulation ends
-  explicit Link(kernel::resource::LinkImplIntf* pimpl) : pimpl_(pimpl) {}
+  explicit Link(kernel::resource::LinkImpl* pimpl) : pimpl_(pimpl) {}
   virtual ~Link() = default;
   // The implementation that never changes
-  kernel::resource::LinkImplIntf* const pimpl_;
+  kernel::resource::LinkImpl* const pimpl_;
 #ifndef DOXYGEN
   friend kernel::resource::NetworkAction; // signal comm_state_changed
 #endif
@@ -47,7 +47,7 @@ protected:
 public:
   enum class SharingPolicy { NONLINEAR = 4, WIFI = 3, SPLITDUPLEX = 2, SHARED = 1, FATPIPE = 0 };
 
-  kernel::resource::LinkImpl* get_impl() const;
+  kernel::resource::StandardLinkImpl* get_impl() const;
 
   /** @brief Retrieve a link from its name */
   static Link* by_name(const std::string& name);
@@ -177,7 +177,7 @@ public:
  */
 class XBT_PUBLIC SplitDuplexLink : public Link {
 public:
-  explicit SplitDuplexLink(kernel::resource::LinkImplIntf* pimpl) : Link(pimpl) {}
+  explicit SplitDuplexLink(kernel::resource::LinkImpl* pimpl) : Link(pimpl) {}
   /** @brief Get the link direction up*/
   Link* get_link_up() const;
   /** @brief Get the link direction down */
index 4d37853..004f46c 100644 (file)
@@ -89,20 +89,18 @@ public:
                  kernel::routing::NetPoint* gw_dst, const std::vector<LinkInRoute>& link_list, bool symmetrical = true);
 
 #ifndef DOXYGEN
-  XBT_ATTRIB_DEPRECATED_v332("Please use add_route() method which uses s4u::LinkInRoute instead of "
-                             "LinkImpl") void add_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
-                                                        kernel::routing::NetPoint* gw_src,
-                                                        kernel::routing::NetPoint* gw_dst,
-                                                        const std::vector<kernel::resource::LinkImpl*>& link_list,
-                                                        bool symmetrical);
-
-  XBT_ATTRIB_DEPRECATED_v332("Please use add_bypass_route() method which uses s4u::LinkInRoute instead of "
-                             "LinkImpl") void add_bypass_route(kernel::routing::NetPoint* src,
-                                                               kernel::routing::NetPoint* dst,
-                                                               kernel::routing::NetPoint* gw_src,
-                                                               kernel::routing::NetPoint* gw_dst,
-                                                               std::vector<kernel::resource::LinkImpl*>& link_list,
-                                                               bool /*symmetrical*/);
+  XBT_ATTRIB_DEPRECATED_v332(
+      "Please use add_route() method which uses s4u::LinkInRoute instead of "
+      "LinkImpl") void add_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
+                                 kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
+                                 const std::vector<kernel::resource::StandardLinkImpl*>& link_list, bool symmetrical);
+
+  XBT_ATTRIB_DEPRECATED_v332(
+      "Please use add_bypass_route() method which uses s4u::LinkInRoute instead of "
+      "LinkImpl") void add_bypass_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
+                                        kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
+                                        std::vector<kernel::resource::StandardLinkImpl*>& link_list,
+                                        bool /*symmetrical*/);
 #endif
 
   void add_bypass_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
@@ -113,7 +111,7 @@ public:
   /*** Called on each newly created regular route (not on bypass routes) */
   static xbt::signal<void(bool symmetrical, kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
                           kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
-                          std::vector<kernel::resource::LinkImpl*> const& link_list)>
+                          std::vector<kernel::resource::StandardLinkImpl*> const& link_list)>
       on_route_creation; // XBT_ATTRIB_DEPRECATED_v332 : should not be used by users, used by ns3.. if necessary,
                          // signal shouldn't use LinkImpl*
 
@@ -186,7 +184,8 @@ public:
 private:
 #ifndef DOXYGEN
   /** @brief XBT_ATTRIB_DEPRECATED_v332 Auxiliary function to convert types */
-  static std::vector<LinkInRoute> convert_to_linkInRoute(const std::vector<kernel::resource::LinkImpl*>& link_list);
+  static std::vector<LinkInRoute>
+  convert_to_linkInRoute(const std::vector<kernel::resource::StandardLinkImpl*>& link_list);
 #endif
 };
 
index 2cc7d1f..6c35bea 100644 (file)
@@ -8,7 +8,7 @@
 #include <xbt/random.hpp>
 
 #include "src/instr/instr_private.hpp"
-#include "src/surf/network_interface.hpp"
+#include "src/kernel/resource/StandardLinkImpl.hpp"
 #include <algorithm>
 #include <cmath>
 
@@ -301,7 +301,7 @@ static void instr_user_srcdst_variable(double time, const char* src, const char*
   const simgrid::kernel::routing::NetPoint* dst_elm = sg_netpoint_by_name_or_null(dst);
   xbt_assert(dst_elm, "Element '%s' not found!", dst);
 
-  std::vector<simgrid::kernel::resource::LinkImpl*> route;
+  std::vector<simgrid::kernel::resource::StandardLinkImpl*> route;
   simgrid::kernel::routing::NetZoneImpl::get_global_route(src_elm, dst_elm, route, nullptr);
   for (auto const& link : route)
     instr_user_variable(time, link->get_cname(), variable, parent_type, value, what, nullptr, &user_link_variables);
index c47e879..619cafe 100644 (file)
@@ -15,7 +15,7 @@
 
 #include "src/instr/instr_private.hpp"
 #include "src/kernel/resource/CpuImpl.hpp"
-#include "src/surf/network_interface.hpp"
+#include "src/kernel/resource/StandardLinkImpl.hpp"
 #include "src/surf/surf_interface.hpp"
 
 #include <fstream>
@@ -344,7 +344,7 @@ static void on_action_state_change(kernel::resource::Action const& action,
       resource_set_utilization("HOST", "speed_used", cpu->get_cname(), action.get_category(), value,
                                action.get_last_update(), simgrid_get_clock() - action.get_last_update());
 
-    const kernel::resource::LinkImpl* link = dynamic_cast<kernel::resource::LinkImpl*>(resource);
+    const kernel::resource::StandardLinkImpl* link = dynamic_cast<kernel::resource::StandardLinkImpl*>(resource);
 
     if (link != nullptr)
       resource_set_utilization("LINK", "bandwidth_used", link->get_cname(), action.get_category(), value,
index c9f6f41..be693d6 100644 (file)
 
 #include "mc/mc.h"
 #include "src/kernel/EngineImpl.hpp"
+#include "src/kernel/resource/StandardLinkImpl.hpp"
 #include "src/kernel/resource/profile/Profile.hpp"
 #include "src/mc/mc_record.hpp"
 #include "src/mc/mc_replay.hpp"
 #include "src/smpi/include/smpi_actor.hpp"
-#include "src/surf/network_interface.hpp"
 #include "src/surf/xml/platf.hpp"
-#include "xbt/xbt_modinter.h"     /* whether initialization was already done */
+#include "xbt/xbt_modinter.h" /* whether initialization was already done */
 
 #include <boost/algorithm/string/predicate.hpp>
 #ifndef _WIN32
index 2fcab66..458bcba 100644 (file)
@@ -19,7 +19,7 @@
 #include "src/kernel/activity/SleepImpl.hpp"
 #include "src/kernel/activity/SynchroRaw.hpp"
 #include "src/kernel/actor/ActorImpl.hpp"
-#include "src/surf/SplitDuplexLinkImpl.hpp"
+#include "src/kernel/resource/SplitDuplexLinkImpl.hpp"
 
 #include <boost/intrusive/list.hpp>
 #include <map>
@@ -37,7 +37,7 @@ xbt_dynar_t get_dead_actors_addr();
 
 class EngineImpl {
   std::map<std::string, s4u::Host*, std::less<>> hosts_;
-  std::map<std::string, resource::LinkImpl*, std::less<>> links_;
+  std::map<std::string, resource::StandardLinkImpl*, std::less<>> links_;
   /* save split-duplex links separately, keep links_ with only LinkImpl* seen by the user
    * members of a split-duplex are saved in the links_ */
   std::map<std::string, std::unique_ptr<resource::SplitDuplexLinkImpl>, std::less<>> split_duplex_links_;
index be78f3b..d94b872 100644 (file)
@@ -12,8 +12,9 @@
 #include "src/kernel/activity/MailboxImpl.hpp"
 #include "src/kernel/context/Context.hpp"
 #include "src/kernel/resource/CpuImpl.hpp"
+#include "src/kernel/resource/LinkImpl.hpp"
+#include "src/kernel/resource/StandardLinkImpl.hpp"
 #include "src/mc/mc_replay.hpp"
-#include "src/surf/network_interface.hpp"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_network, simix, "SIMIX network-related synchronization");
 
similarity index 79%
rename from src/surf/network_interface.cpp
rename to src/kernel/resource/LinkImpl.cpp
index c18d8d7..c0312c2 100644 (file)
@@ -6,8 +6,9 @@
 #include <simgrid/s4u/Engine.hpp>
 
 #include "simgrid/sg_config.hpp"
+#include "src/kernel/resource/LinkImpl.hpp"
+#include "src/kernel/resource/StandardLinkImpl.hpp"
 #include "src/kernel/resource/profile/Profile.hpp"
-#include "src/surf/network_interface.hpp"
 #include "src/surf/surf_interface.hpp"
 
 #include <numeric>
@@ -68,41 +69,43 @@ void NetworkAction::set_state(Action::State state)
 }
 
 /** @brief returns a list of all Links that this action is using */
-std::list<LinkImpl*> NetworkAction::get_links() const
+std::list<StandardLinkImpl*> NetworkAction::get_links() const
 {
-  std::list<LinkImpl*> retlist;
+  std::list<StandardLinkImpl*> retlist;
   int llen = get_variable()->get_number_of_constraint();
 
   for (int i = 0; i < llen; i++) {
     /* Beware of composite actions: ptasks put links and cpus together */
-    if (auto* link = dynamic_cast<LinkImpl*>(get_variable()->get_constraint(i)->get_id()))
+    if (auto* link = dynamic_cast<StandardLinkImpl*>(get_variable()->get_constraint(i)->get_id()))
       retlist.push_back(link);
   }
 
   return retlist;
 }
 
-static void add_latency(const std::vector<LinkImpl*>& links, double* latency)
+static void add_latency(const std::vector<StandardLinkImpl*>& links, double* latency)
 {
   if (latency)
     *latency = std::accumulate(begin(links), end(links), *latency,
                                [](double lat, const auto* link) { return lat + link->get_latency(); });
 }
 
-void add_link_latency(std::vector<LinkImpl*>& result, LinkImpl* link, double* latency)
+void add_link_latency(std::vector<StandardLinkImpl*>& result, StandardLinkImpl* link, double* latency)
 {
   result.push_back(link);
   if (latency)
     *latency += link->get_latency();
 }
 
-void add_link_latency(std::vector<LinkImpl*>& result, const std::vector<LinkImpl*>& links, double* latency)
+void add_link_latency(std::vector<StandardLinkImpl*>& result, const std::vector<StandardLinkImpl*>& links,
+                      double* latency)
 {
   result.insert(result.end(), begin(links), end(links));
   add_latency(links, latency);
 }
 
-void insert_link_latency(std::vector<LinkImpl*>& result, const std::vector<LinkImpl*>& links, double* latency)
+void insert_link_latency(std::vector<StandardLinkImpl*>& result, const std::vector<StandardLinkImpl*>& links,
+                         double* latency)
 {
   result.insert(result.begin(), rbegin(links), rend(links));
   add_latency(links, latency);
similarity index 68%
rename from src/surf/network_interface.hpp
rename to src/kernel/resource/LinkImpl.hpp
index 039af7f..5022907 100644 (file)
@@ -3,15 +3,14 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#ifndef SURF_NETWORK_INTERFACE_HPP_
-#define SURF_NETWORK_INTERFACE_HPP_
+#ifndef SIMGRID_KERNEL_RESOURCE_LINKIMPL_HPP
+#define SIMGRID_KERNEL_RESOURCE_LINKIMPL_HPP
 
 #include "simgrid/kernel/resource/Model.hpp"
 #include "simgrid/kernel/resource/NetworkModelIntf.hpp"
 #include "simgrid/s4u/Link.hpp"
 #include "src/kernel/lmm/maxmin.hpp"
 #include "src/kernel/resource/Resource.hpp"
-#include "src/surf/LinkImpl.hpp"
 #include "xbt/PropertyHolder.hpp"
 
 #include <list>
 /***********
  * Classes *
  ***********/
+class StandardLinkImpl;
 
 namespace simgrid {
 namespace kernel {
 namespace resource {
+
 /*********
  * Model *
  *********/
@@ -48,9 +49,9 @@ public:
    * @param name The name of the Link
    * @param bandwidths The vector of bandwidths of the Link in bytes per second
    */
-  virtual LinkImpl* create_link(const std::string& name, const std::vector<double>& bandwidths) = 0;
+  virtual StandardLinkImpl* create_link(const std::string& name, const std::vector<double>& bandwidths) = 0;
 
-  virtual LinkImpl* create_wifi_link(const std::string& name, const std::vector<double>& bandwidths) = 0;
+  virtual StandardLinkImpl* create_wifi_link(const std::string& name, const std::vector<double>& bandwidths) = 0;
 
   /**
    * @brief Create a communication between two hosts.
@@ -91,7 +92,37 @@ public:
   void set_lat_factor_cb(const std::function<NetworkFactorCb>& cb) override { THROW_UNIMPLEMENTED; }
   void set_bw_factor_cb(const std::function<NetworkFactorCb>& cb) override { THROW_UNIMPLEMENTED; }
 
-  LinkImpl* loopback_ = nullptr;
+  StandardLinkImpl* loopback_ = nullptr;
+};
+
+/************
+ * Resource *
+ ************/
+class LinkImpl : public Resource_T<LinkImpl>, public xbt::PropertyHolder {
+public:
+  using Resource_T::Resource_T;
+  /** @brief Get the bandwidth in bytes per second of current Link */
+  virtual double get_bandwidth() const = 0;
+  /** @brief Update the bandwidth in bytes per second of current Link */
+  virtual void set_bandwidth(double value) = 0;
+
+  /** @brief Get the latency in seconds of current Link */
+  virtual double get_latency() const = 0;
+  /** @brief Update the latency in seconds of current Link */
+  virtual void set_latency(double value) = 0;
+
+  /** @brief The sharing policy */
+  virtual void set_sharing_policy(s4u::Link::SharingPolicy policy, const s4u::NonLinearResourceCb& cb) = 0;
+  virtual s4u::Link::SharingPolicy get_sharing_policy() const                                          = 0;
+
+  /* setup the profile file with bandwidth events (peak speed changes due to external load).
+   * Profile must contain percentages (value between 0 and 1). */
+  virtual void set_bandwidth_profile(kernel::profile::Profile* profile) = 0;
+  /* setup the profile file with latency events (peak latency changes due to external load).
+   * Profile must contain absolute values */
+  virtual void set_latency_profile(kernel::profile::Profile* profile) = 0;
+  /** @brief Set the concurrency limit for this link */
+  virtual void set_concurrency_limit(int limit) const = 0;
 };
 
 /**********
@@ -129,7 +160,7 @@ public:
       : Action(model, cost, failed, var), src_(src), dst_(dst){};
 
   void set_state(Action::State state) override;
-  virtual std::list<LinkImpl*> get_links() const;
+  virtual std::list<StandardLinkImpl*> get_links() const;
 
   double latency_         = 0.; // Delay before the action starts
   double lat_current_     = 0.; // Used to compute the communication RTT, and accordingly limit the communication rate
@@ -142,12 +173,14 @@ public:
 /* Insert link(s) at the end of vector `result' (at the beginning, and reversed, for insert_link_latency()), and add
  * link->get_latency() to *latency when latency is not null
  */
-void add_link_latency(std::vector<LinkImpl*>& result, LinkImpl* link, double* latency);
-void add_link_latency(std::vector<LinkImpl*>& result, const std::vector<LinkImpl*>& links, double* latency);
-void insert_link_latency(std::vector<LinkImpl*>& result, const std::vector<LinkImpl*>& links, double* latency);
+void add_link_latency(std::vector<StandardLinkImpl*>& result, StandardLinkImpl* link, double* latency);
+void add_link_latency(std::vector<StandardLinkImpl*>& result, const std::vector<StandardLinkImpl*>& links,
+                      double* latency);
+void insert_link_latency(std::vector<StandardLinkImpl*>& result, const std::vector<StandardLinkImpl*>& links,
+                         double* latency);
 
 } // namespace resource
 } // namespace kernel
 } // namespace simgrid
 
-#endif /* SURF_NETWORK_INTERFACE_HPP_ */
+#endif /* SIMGRID_KERNEL_RESOURCE_LINKIMPL_HPP */
similarity index 90%
rename from src/surf/SplitDuplexLinkImpl.cpp
rename to src/kernel/resource/SplitDuplexLinkImpl.cpp
index 48cd097..0b02ce4 100644 (file)
@@ -3,7 +3,7 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include "src/surf/SplitDuplexLinkImpl.hpp"
+#include "src/kernel/resource/SplitDuplexLinkImpl.hpp"
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(res_network);
 
@@ -15,8 +15,9 @@ namespace simgrid {
 namespace kernel {
 namespace resource {
 
-SplitDuplexLinkImpl::SplitDuplexLinkImpl(const std::string& name, LinkImpl* link_up, LinkImpl* link_down)
-    : LinkImplIntf(name), piface_(this), link_up_(link_up), link_down_(link_down)
+SplitDuplexLinkImpl::SplitDuplexLinkImpl(const std::string& name, StandardLinkImpl* link_up,
+                                         StandardLinkImpl* link_down)
+    : LinkImpl(name), piface_(this), link_up_(link_up), link_down_(link_down)
 {
 }
 
similarity index 85%
rename from src/surf/SplitDuplexLinkImpl.hpp
rename to src/kernel/resource/SplitDuplexLinkImpl.hpp
index 231e130..244c08a 100644 (file)
@@ -6,16 +6,13 @@
 #ifndef SIMGRID_KERNEL_RESOURCE_SDLINKIMPL_HPP
 #define SIMGRID_KERNEL_RESOURCE_SDLINKIMPL_HPP
 
-#include "src/surf/LinkImpl.hpp"
-#include "src/surf/LinkImplIntf.hpp"
-
-/***********
- * Classes *
- ***********/
+#include "src/kernel/resource/LinkImpl.hpp"
+#include "src/kernel/resource/StandardLinkImpl.hpp"
 
 namespace simgrid {
 namespace kernel {
 namespace resource {
+
 /************
  * Resource *
  ************/
@@ -23,17 +20,17 @@ namespace resource {
  * @brief SURF network link interface class
  * @details A Link represents the link between two [hosts](@ref HostImpl)
  */
-class SplitDuplexLinkImpl : public LinkImplIntf {
+class SplitDuplexLinkImpl : public LinkImpl {
   s4u::SplitDuplexLink piface_;
-  LinkImpl* link_up_;
-  LinkImpl* link_down_;
+  StandardLinkImpl* link_up_;
+  StandardLinkImpl* link_down_;
 
 protected:
-  SplitDuplexLinkImpl(const LinkImpl&) = delete;
-  SplitDuplexLinkImpl& operator=(const LinkImpl&) = delete;
+  SplitDuplexLinkImpl(const StandardLinkImpl&) = delete;
+  SplitDuplexLinkImpl& operator=(const StandardLinkImpl&) = delete;
 
 public:
-  SplitDuplexLinkImpl(const std::string& name, LinkImpl* link_up, LinkImpl* link_down);
+  SplitDuplexLinkImpl(const std::string& name, StandardLinkImpl* link_up, StandardLinkImpl* link_down);
   /** @brief Public interface */
   const s4u::SplitDuplexLink* get_iface() const { return &piface_; }
   s4u::SplitDuplexLink* get_iface() { return &piface_; }
similarity index 96%
rename from src/surf/SplitDuplexLinkImpl_test.cpp
rename to src/kernel/resource/SplitDuplexLinkImpl_test.cpp
index b36ea8a..629bbb1 100644 (file)
@@ -5,9 +5,10 @@
 
 #include "catch.hpp"
 
-#include "simgrid/s4u/Engine.hpp"
-#include "simgrid/s4u/Link.hpp"
-#include "src/surf/SplitDuplexLinkImpl.hpp"
+#include <simgrid/s4u/Engine.hpp>
+#include <simgrid/s4u/Link.hpp>
+
+#include "src/kernel/resource/SplitDuplexLinkImpl.hpp"
 
 TEST_CASE("SplitDuplexLink: create", "")
 {
similarity index 82%
rename from src/surf/LinkImpl.cpp
rename to src/kernel/resource/StandardLinkImpl.cpp
index a5a34ae..4ecfa60 100644 (file)
@@ -6,8 +6,7 @@
 #include <simgrid/s4u/Engine.hpp>
 
 #include "src/kernel/EngineImpl.hpp"
-#include "src/surf/LinkImpl.hpp"
-
+#include "src/kernel/resource/StandardLinkImpl.hpp"
 #include <numeric>
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(res_network);
@@ -20,7 +19,7 @@ namespace simgrid {
 namespace kernel {
 namespace resource {
 
-LinkImpl::LinkImpl(const std::string& name) : LinkImplIntf(name), piface_(this)
+StandardLinkImpl::StandardLinkImpl(const std::string& name) : LinkImpl(name), piface_(this)
 {
   if (name != "__loopback__")
     xbt_assert(not s4u::Link::by_name_or_null(name), "Link '%s' declared several times in the platform.", name.c_str());
@@ -33,7 +32,7 @@ LinkImpl::LinkImpl(const std::string& name) : LinkImplIntf(name), piface_(this)
  *
  * Don't delete directly a Link, call l->destroy() instead.
  */
-void LinkImpl::destroy()
+void StandardLinkImpl::destroy()
 {
   s4u::Link::on_destruction(piface_);
   s4u::Engine::get_instance()->link_unregister(get_name());
@@ -52,13 +51,13 @@ constexpr kernel::lmm::Constraint::SharingPolicy to_maxmin_policy(s4u::Link::Sha
   }
 }
 
-void LinkImpl::set_sharing_policy(s4u::Link::SharingPolicy policy, const s4u::NonLinearResourceCb& cb)
+void StandardLinkImpl::set_sharing_policy(s4u::Link::SharingPolicy policy, const s4u::NonLinearResourceCb& cb)
 {
   get_constraint()->set_sharing_policy(to_maxmin_policy(policy), cb);
   sharing_policy_ = policy;
 }
 
-void LinkImpl::latency_check(double latency) const
+void StandardLinkImpl::latency_check(double latency) const
 {
   static double last_warned_latency = sg_surf_precision;
   if (latency != 0.0 && latency < last_warned_latency) {
@@ -69,7 +68,7 @@ void LinkImpl::latency_check(double latency) const
   }
 }
 
-void LinkImpl::turn_on()
+void StandardLinkImpl::turn_on()
 {
   if (not is_on()) {
     Resource::turn_on();
@@ -77,7 +76,7 @@ void LinkImpl::turn_on()
   }
 }
 
-void LinkImpl::turn_off()
+void StandardLinkImpl::turn_off()
 {
   if (is_on()) {
     Resource::turn_off();
@@ -95,7 +94,7 @@ void LinkImpl::turn_off()
   }
 }
 
-void LinkImpl::seal()
+void StandardLinkImpl::seal()
 {
   if (is_sealed())
     return;
@@ -104,12 +103,12 @@ void LinkImpl::seal()
   Resource::seal();
 }
 
-void LinkImpl::on_bandwidth_change() const
+void StandardLinkImpl::on_bandwidth_change() const
 {
   s4u::Link::on_bandwidth_change(piface_);
 }
 
-void LinkImpl::set_bandwidth_profile(profile::Profile* profile)
+void StandardLinkImpl::set_bandwidth_profile(profile::Profile* profile)
 {
   if (profile) {
     xbt_assert(bandwidth_.event == nullptr, "Cannot set a second bandwidth profile to Link %s", get_cname());
@@ -117,7 +116,7 @@ void LinkImpl::set_bandwidth_profile(profile::Profile* profile)
   }
 }
 
-void LinkImpl::set_latency_profile(profile::Profile* profile)
+void StandardLinkImpl::set_latency_profile(profile::Profile* profile)
 {
   if (profile) {
     xbt_assert(latency_.event == nullptr, "Cannot set a second latency profile to Link %s", get_cname());
@@ -125,7 +124,7 @@ void LinkImpl::set_latency_profile(profile::Profile* profile)
   }
 }
 
-void LinkImpl::set_concurrency_limit(int limit) const
+void StandardLinkImpl::set_concurrency_limit(int limit) const
 {
   if (limit != -1) {
     get_constraint()->reset_concurrency_maximum();
similarity index 76%
rename from src/surf/LinkImpl.hpp
rename to src/kernel/resource/StandardLinkImpl.hpp
index e49c884..96dc680 100644 (file)
@@ -3,10 +3,10 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#ifndef SIMGRID_KERNEL_RESOURCE_LINKIMPL_HPP
-#define SIMGRID_KERNEL_RESOURCE_LINKIMPL_HPP
+#ifndef SIMGRID_KERNEL_RESOURCE_STANDARDLINKIMPL_HPP
+#define SIMGRID_KERNEL_RESOURCE_STANDARDLINKIMPL_HPP
 
-#include "src/surf/LinkImplIntf.hpp"
+#include "src/kernel/resource/LinkImpl.hpp"
 
 /***********
  * Classes *
@@ -18,19 +18,15 @@ namespace resource {
 /************
  * Resource *
  ************/
-/** @ingroup SURF_network_interface
- * @brief SURF network link interface class
- * @details A Link represents the link between two [hosts](@ref simgrid::kernel::resource::HostImpl)
- */
-class LinkImpl : public LinkImplIntf {
+class StandardLinkImpl : public LinkImpl {
   s4u::Link piface_;
   s4u::Link::SharingPolicy sharing_policy_ = s4u::Link::SharingPolicy::SHARED;
 
 protected:
-  explicit LinkImpl(const std::string& name);
-  LinkImpl(const LinkImpl&) = delete;
-  LinkImpl& operator=(const LinkImpl&) = delete;
-  ~LinkImpl() override                 = default; // Use destroy() instead of this destructor.
+  explicit StandardLinkImpl(const std::string& name);
+  StandardLinkImpl(const StandardLinkImpl&) = delete;
+  StandardLinkImpl& operator=(const StandardLinkImpl&) = delete;
+  ~StandardLinkImpl() override                         = default; // Use destroy() instead of this destructor.
 
   Metric latency_   = {0.0, 1, nullptr};
   Metric bandwidth_ = {1.0, 1, nullptr};
@@ -75,4 +71,4 @@ public:
 } // namespace kernel
 } // namespace simgrid
 
-#endif /* SIMGRID_KERNEL_RESOURCE_LINKIMPL_HPP */
+#endif /* SIMGRID_KERNEL_RESOURCE_STANDARDLINKIMPL_HPP */
similarity index 69%
rename from src/surf/network_wifi.cpp
rename to src/kernel/resource/WifiLinkImpl.cpp
index 9f0707b..39309a0 100644 (file)
@@ -3,8 +3,9 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include "network_wifi.hpp"
-#include "simgrid/s4u/Host.hpp"
+#include <simgrid/s4u/Host.hpp>
+
+#include "src/kernel/resource/WifiLinkImpl.hpp"
 #include "src/surf/surf_interface.hpp"
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(res_network);
@@ -17,15 +18,15 @@ namespace resource {
  * Resource *
  ************/
 
-NetworkWifiLink::NetworkWifiLink(const std::string& name, const std::vector<double>& bandwidths, lmm::System* system)
-    : LinkImpl(name)
+WifiLinkImpl::WifiLinkImpl(const std::string& name, const std::vector<double>& bandwidths, lmm::System* system)
+    : StandardLinkImpl(name)
 {
   this->set_constraint(system->constraint_new(this, 1));
   for (auto bandwidth : bandwidths)
     bandwidths_.push_back({bandwidth, 1.0, nullptr});
 }
 
-void NetworkWifiLink::set_host_rate(const s4u::Host* host, int rate_level)
+void WifiLinkImpl::set_host_rate(const s4u::Host* host, int rate_level)
 {
   auto insert_done = host_rates_.insert(std::make_pair(host->get_name(), rate_level));
   if (not insert_done.second)
@@ -35,7 +36,7 @@ void NetworkWifiLink::set_host_rate(const s4u::Host* host, int rate_level)
   refresh_decay_bandwidths();
 }
 
-double NetworkWifiLink::get_host_rate(const s4u::Host* host) const
+double WifiLinkImpl::get_host_rate(const s4u::Host* host) const
 {
   auto host_rates_it = host_rates_.find(host->get_name());
 
@@ -54,44 +55,46 @@ double NetworkWifiLink::get_host_rate(const s4u::Host* host) const
   return rate.peak * rate.scale;
 }
 
-s4u::Link::SharingPolicy NetworkWifiLink::get_sharing_policy() const
+s4u::Link::SharingPolicy WifiLinkImpl::get_sharing_policy() const
 {
   return s4u::Link::SharingPolicy::WIFI;
 }
 
-int NetworkWifiLink::get_host_count() const
+int WifiLinkImpl::get_host_count() const
 {
   return static_cast<int>(host_rates_.size());
 }
 
-void NetworkWifiLink::refresh_decay_bandwidths(){
+void WifiLinkImpl::refresh_decay_bandwidths()
+{
   // Compute number of STAtion on the Access Point
   int nSTA = get_host_count();
 
   std::vector<Metric> new_bandwidths;
   for (auto const& bandwidth : bandwidths_) {
     // Instantiate decay model relatively to the actual bandwidth
-    double max_bw=bandwidth.peak;
-    double min_bw=bandwidth.peak-(wifi_max_rate_-wifi_min_rate_);
-    double model_rate=bandwidth.peak-(wifi_max_rate_-model_rate_);
+    double max_bw     = bandwidth.peak;
+    double min_bw     = bandwidth.peak - (wifi_max_rate_ - wifi_min_rate_);
+    double model_rate = bandwidth.peak - (wifi_max_rate_ - model_rate_);
 
     xbt_assert(min_bw > 0, "Your WIFI link is using bandwidth(s) which is too low for the decay model.");
 
-    double N0=max_bw-min_bw;
-    double lambda=(-log(model_rate-min_bw)+log(N0))/model_n_;
+    double N0     = max_bw - min_bw;
+    double lambda = (-log(model_rate - min_bw) + log(N0)) / model_n_;
     // Since decay model start at 0 we should use (nSTA-1)
-    double new_peak=N0*exp(-lambda*(nSTA-1))+min_bw;
+    double new_peak = N0 * exp(-lambda * (nSTA - 1)) + min_bw;
     new_bandwidths.push_back({new_peak, 1.0, nullptr});
   }
-  decay_bandwidths_=new_bandwidths;
+  decay_bandwidths_ = new_bandwidths;
 }
 
-bool NetworkWifiLink::toggle_decay_model(){
+bool WifiLinkImpl::toggle_decay_model()
+{
   use_decay_model_ = not use_decay_model_;
   return use_decay_model_;
 }
 
-void NetworkWifiLink::set_latency(double value)
+void WifiLinkImpl::set_latency(double value)
 {
   xbt_assert(value == 0, "Latency cannot be set for WiFi Links.");
 }
similarity index 67%
rename from src/surf/network_wifi.hpp
rename to src/kernel/resource/WifiLinkImpl.hpp
index 71850b5..63e449b 100644 (file)
@@ -8,7 +8,7 @@
 
 #include <xbt/base.h>
 
-#include "network_cm02.hpp"
+#include "src/surf/network_cm02.hpp"
 #include "xbt/string.hpp"
 
 /***********
@@ -19,9 +19,9 @@ namespace simgrid {
 namespace kernel {
 namespace resource {
 
-class XBT_PRIVATE NetworkWifiAction;
+class XBT_PRIVATE WifiLinkAction;
 
-class NetworkWifiLink : public LinkImpl {
+class WifiLinkImpl : public StandardLinkImpl {
   /** @brief Hold every rates association between host and links (host name, rates id) */
   std::map<xbt::string, int> host_rates_;
 
@@ -29,20 +29,20 @@ class NetworkWifiLink : public LinkImpl {
   std::vector<Metric> bandwidths_;
 
   /** @brief Should we use the decay model ? */
-  bool use_decay_model_=false;
+  bool use_decay_model_ = false;
   /** @brief Wifi maximal bit rate according to the ns-3 802.11n standard */
   const double wifi_max_rate_ = 54 * 1e6 / 8;
   /** @brief minimum bit rate observed with ns3 during our calibration experiments */
   const double wifi_min_rate_ = 41.70837 * 1e6 / 8;
   /** @brief Amount of stations used in the reference point to rescale SimGrid predictions to fit ns-3 ones */
-  const int model_n_=5;
+  const int model_n_ = 5;
   /** @brief Bit rate observed on ns3 at the reference point used for rescaling */
-  const double model_rate_=42.61438*1e6 / 8;
+  const double model_rate_ = 42.61438 * 1e6 / 8;
   /** @brief The bandwidth to use for each SNR level, corrected with the decay rescale mechanism */
   std::vector<Metric> decay_bandwidths_;
 
 public:
-  NetworkWifiLink(const std::string& name, const std::vector<double>& bandwidths, lmm::System* system);
+  WifiLinkImpl(const std::string& name, const std::vector<double>& bandwidths, lmm::System* system);
 
   void set_host_rate(const s4u::Host* host, int rate_level);
   /** @brief Get the AP rate associated to the host (or -1 if not associated to the AP) */
@@ -57,24 +57,23 @@ public:
   int get_host_count() const;
 };
 
-class NetworkWifiAction : public NetworkCm02Action {
-  NetworkWifiLink* src_wifi_link_;
-  NetworkWifiLink* dst_wifi_link_;
+class WifiLinkAction : public NetworkCm02Action {
+  WifiLinkImpl* src_wifi_link_;
+  WifiLinkImpl* dst_wifi_link_;
 
 public:
-  NetworkWifiAction() = delete;
-  NetworkWifiAction(Model* model, s4u::Host& src, s4u::Host& dst, double cost, bool failed,
-                    NetworkWifiLink* src_wifi_link, NetworkWifiLink* dst_wifi_link)
-      : NetworkCm02Action(model, src, dst, cost, failed)
-      , src_wifi_link_(src_wifi_link)
-      , dst_wifi_link_(dst_wifi_link)
-    {}
-
-  NetworkWifiLink* get_src_link() const { return src_wifi_link_; }
-  NetworkWifiLink* get_dst_link() const { return dst_wifi_link_; }
+  WifiLinkAction() = delete;
+  WifiLinkAction(Model* model, s4u::Host& src, s4u::Host& dst, double cost, bool failed, WifiLinkImpl* src_wifi_link,
+                 WifiLinkImpl* dst_wifi_link)
+      : NetworkCm02Action(model, src, dst, cost, failed), src_wifi_link_(src_wifi_link), dst_wifi_link_(dst_wifi_link)
+  {
+  }
+
+  WifiLinkImpl* get_src_link() const { return src_wifi_link_; }
+  WifiLinkImpl* get_dst_link() const { return dst_wifi_link_; }
 };
 
 } // namespace resource
 } // namespace kernel
 } // namespace simgrid
-#endif /* SURF_NETWORK_WIFI_HPP_ */
+#endif
index 8405293..9b3c0d3 100644 (file)
@@ -6,7 +6,7 @@
 #include "simgrid/kernel/routing/ClusterZone.hpp"
 #include "simgrid/kernel/routing/NetPoint.hpp"
 #include "simgrid/kernel/routing/RoutedZone.hpp"
-#include "src/surf/network_interface.hpp"
+#include "src/kernel/resource/StandardLinkImpl.hpp"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_cluster, surf, "Routing part of surf");
 
@@ -40,7 +40,8 @@ void ClusterBase::set_link_characteristics(double bw, double lat, s4u::Link::Sha
   link_lat_            = lat;
 }
 
-void ClusterBase::add_private_link_at(unsigned long position, std::pair<resource::LinkImpl*, resource::LinkImpl*> link)
+void ClusterBase::add_private_link_at(unsigned long position,
+                                      std::pair<resource::StandardLinkImpl*, resource::StandardLinkImpl*> link)
 {
   private_links_.insert({position, link});
 }
index 5381c38..65580e9 100644 (file)
@@ -7,7 +7,7 @@
 #include <simgrid/kernel/routing/NetPoint.hpp>
 #include <xbt/string.hpp>
 
-#include "src/surf/network_interface.hpp"
+#include "src/kernel/resource/StandardLinkImpl.hpp"
 
 #include <climits>
 #include <queue>
@@ -184,7 +184,7 @@ void DijkstraZone::get_local_route(const NetPoint* src, const NetPoint* dst, Rou
 
     if (get_hierarchy() == RoutingMode::recursive && v != dst_node_id &&
         gw_dst->get_name() != prev_gw_src->get_name()) {
-      std::vector<resource::LinkImpl*> e_route_as_to_as;
+      std::vector<resource::StandardLinkImpl*> e_route_as_to_as;
 
       const NetPoint* gw_dst_net_elm      = nullptr;
       const NetPoint* prev_gw_src_net_elm = nullptr;
index 6fbbd30..eb64fb0 100644 (file)
@@ -10,7 +10,7 @@
 #include "simgrid/s4u/Engine.hpp"
 #include "simgrid/s4u/Host.hpp"
 #include "simgrid/s4u/NetZone.hpp"
-#include "src/surf/network_interface.hpp" //LinkImpl
+#include "src/kernel/resource/LinkImpl.hpp"
 
 TEST_CASE("kernel::routing::DijkstraZone: Creating Zone", "")
 {
index 6511c5c..49b5a74 100644 (file)
@@ -5,7 +5,7 @@
 
 #include "simgrid/kernel/routing/DragonflyZone.hpp"
 #include "simgrid/kernel/routing/NetPoint.hpp"
-#include "src/surf/network_interface.hpp"
+#include "src/kernel/resource/StandardLinkImpl.hpp"
 
 #include <boost/algorithm/string/classification.hpp>
 #include <boost/algorithm/string/split.hpp>
@@ -144,8 +144,8 @@ void DragonflyZone::generate_routers(const s4u::ClusterCallbacks& set_callbacks)
   unsigned long id = 2UL * num_groups_ * num_chassis_per_group_ * num_blades_per_chassis_ * num_nodes_per_blade_;
   /* get limiter for this router */
   auto get_limiter = [this, &id, &set_callbacks](unsigned int i, unsigned int j,
-                                                 unsigned int k) -> resource::LinkImpl* {
-    kernel::resource::LinkImpl* limiter = nullptr;
+                                                 unsigned int k) -> resource::StandardLinkImpl* {
+    kernel::resource::StandardLinkImpl* limiter = nullptr;
     if (set_callbacks.limiter) {
       id--;
       const auto* s4u_link =
@@ -167,8 +167,8 @@ void DragonflyZone::generate_routers(const s4u::ClusterCallbacks& set_callbacks)
   }
 }
 
-void DragonflyZone::generate_link(const std::string& id, int numlinks, resource::LinkImpl** linkup,
-                                  resource::LinkImpl** linkdown)
+void DragonflyZone::generate_link(const std::string& id, int numlinks, resource::StandardLinkImpl** linkup,
+                                  resource::StandardLinkImpl** linkdown)
 {
   XBT_DEBUG("Generating link %s", id.c_str());
   *linkup   = nullptr;
@@ -189,8 +189,8 @@ void DragonflyZone::generate_link(const std::string& id, int numlinks, resource:
 void DragonflyZone::generate_links()
 {
   static int uniqueId = 0;
-  resource::LinkImpl* linkup;
-  resource::LinkImpl* linkdown;
+  resource::StandardLinkImpl* linkup;
+  resource::StandardLinkImpl* linkdown;
 
   unsigned int numRouters = num_groups_ * num_chassis_per_group_ * num_blades_per_chassis_;
 
@@ -279,7 +279,7 @@ void DragonflyZone::get_local_route(const NetPoint* src, const NetPoint* dst, Ro
            dst->id());
 
   if ((src->id() == dst->id()) && has_loopback()) {
-    resource::LinkImpl* uplink = get_uplink_from(node_pos(src->id()));
+    resource::StandardLinkImpl* uplink = get_uplink_from(node_pos(src->id()));
 
     add_link_latency(route->link_list_, uplink, latency);
     return;
index 04cc4bb..a22566a 100644 (file)
@@ -6,7 +6,7 @@
 #include <simgrid/kernel/routing/FatTreeZone.hpp>
 #include <simgrid/kernel/routing/NetPoint.hpp>
 
-#include "src/surf/network_interface.hpp"
+#include "src/kernel/resource/StandardLinkImpl.hpp"
 #include "src/surf/xml/platf.hpp" // surf_parse_error() and surf_parse_assert()
 
 #include <fstream>
@@ -249,8 +249,8 @@ void FatTreeZone::generate_switches(const s4u::ClusterCallbacks& set_callbacks)
   }
 
   /* get limiter for this router */
-  auto get_limiter = [this, &set_callbacks](unsigned long i, unsigned long j, long id) -> resource::LinkImpl* {
-    kernel::resource::LinkImpl* limiter = nullptr;
+  auto get_limiter = [this, &set_callbacks](unsigned long i, unsigned long j, long id) -> resource::StandardLinkImpl* {
+    kernel::resource::StandardLinkImpl* limiter = nullptr;
     if (set_callbacks.limiter) {
       const auto* s4u_link = set_callbacks.limiter(get_iface(), {i + 1, j}, id);
       if (s4u_link) {
@@ -333,7 +333,7 @@ int FatTreeZone::get_level_position(const unsigned int level)
   return tempPosition;
 }
 
-void FatTreeZone::add_processing_node(int id, resource::LinkImpl* limiter, resource::LinkImpl* loopback)
+void FatTreeZone::add_processing_node(int id, resource::StandardLinkImpl* limiter, resource::StandardLinkImpl* loopback)
 {
   using std::make_pair;
   static int position = 0;
index 7a134c5..fb7c67d 100644 (file)
@@ -7,7 +7,7 @@
 #include <simgrid/kernel/routing/NetPoint.hpp>
 #include <xbt/string.hpp>
 
-#include "src/surf/network_interface.hpp"
+#include "src/kernel/resource/StandardLinkImpl.hpp"
 
 #include <climits>
 
index 0d36328..dfadb4d 100644 (file)
@@ -10,7 +10,7 @@
 #include "simgrid/s4u/Engine.hpp"
 #include "simgrid/s4u/Host.hpp"
 #include "simgrid/s4u/NetZone.hpp"
-#include "src/surf/network_interface.hpp" //LinkImpl
+#include "src/kernel/resource/LinkImpl.hpp"
 
 TEST_CASE("kernel::routing::FloydZone: Creating Zone", "")
 {
index 132dc87..19b5afd 100644 (file)
@@ -6,7 +6,7 @@
 #include <simgrid/kernel/routing/FullZone.hpp>
 #include <simgrid/kernel/routing/NetPoint.hpp>
 
-#include "src/surf/network_interface.hpp"
+#include "src/kernel/resource/StandardLinkImpl.hpp"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_full, surf, "Routing part of surf");
 
index ef1407f..c7a1f0c 100644 (file)
@@ -10,7 +10,7 @@
 #include "simgrid/s4u/Engine.hpp"
 #include "simgrid/s4u/Host.hpp"
 #include "simgrid/s4u/NetZone.hpp"
-#include "src/surf/network_interface.hpp" //LinkImpl
+#include "src/kernel/resource/LinkImpl.hpp"
 
 TEST_CASE("kernel::routing::FullZone: Creating Zone", "")
 {
index 07cfb6e..64f0fab 100644 (file)
 #include "src/kernel/EngineImpl.hpp"
 #include "src/kernel/resource/CpuImpl.hpp"
 #include "src/kernel/resource/DiskImpl.hpp"
+#include "src/kernel/resource/SplitDuplexLinkImpl.hpp"
 #include "src/surf/HostImpl.hpp"
-#include "src/surf/SplitDuplexLinkImpl.hpp"
-#include "src/surf/network_interface.hpp"
 
+#include "src/kernel/resource/StandardLinkImpl.hpp"
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_route);
 
 namespace simgrid {
@@ -67,7 +67,7 @@ static void surf_config_models_setup()
 
 xbt::signal<void(bool symmetrical, kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
                  kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
-                 std::vector<kernel::resource::LinkImpl*> const& link_list)>
+                 std::vector<kernel::resource::StandardLinkImpl*> const& link_list)>
     NetZoneImpl::on_route_creation;
 
 NetZoneImpl::NetZoneImpl(const std::string& name) : piface_(this), name_(name)
@@ -213,10 +213,10 @@ unsigned long NetZoneImpl::add_component(NetPoint* elm)
   return vertices_.size() - 1; // The rank of the newly created object
 }
 
-std::vector<resource::LinkImpl*> NetZoneImpl::get_link_list_impl(const std::vector<s4u::LinkInRoute>& link_list,
-                                                                 bool backroute) const
+std::vector<resource::StandardLinkImpl*> NetZoneImpl::get_link_list_impl(const std::vector<s4u::LinkInRoute>& link_list,
+                                                                         bool backroute) const
 {
-  std::vector<resource::LinkImpl*> links;
+  std::vector<resource::StandardLinkImpl*> links;
 
   for (const auto& link : link_list) {
     if (link.get_link()->get_sharing_policy() != s4u::Link::SharingPolicy::SPLITDUPLEX) {
@@ -227,7 +227,7 @@ std::vector<resource::LinkImpl*> NetZoneImpl::get_link_list_impl(const std::vect
     const auto* sd_link = dynamic_cast<const s4u::SplitDuplexLink*>(link.get_link());
     xbt_assert(sd_link,
                "Add_route: cast to SpliDuplexLink impossible. This should not happen, please contact SimGrid team");
-    resource::LinkImpl* link_impl;
+    resource::StandardLinkImpl* link_impl;
     switch (link.get_direction()) {
       case s4u::LinkInRoute::Direction::UP:
         if (backroute)
@@ -396,7 +396,7 @@ static void find_common_ancestors(const NetPoint* src, const NetPoint* dst,
 
 /* PRECONDITION: this is the common ancestor of src and dst */
 bool NetZoneImpl::get_bypass_route(const NetPoint* src, const NetPoint* dst,
-                                   /* OUT */ std::vector<resource::LinkImpl*>& links, double* latency,
+                                   /* OUT */ std::vector<resource::StandardLinkImpl*>& links, double* latency,
                                    std::unordered_set<NetZoneImpl*>& netzones)
 {
   // If never set a bypass route return nullptr without any further computations
@@ -480,15 +480,15 @@ bool NetZoneImpl::get_bypass_route(const NetPoint* src, const NetPoint* dst,
 }
 
 void NetZoneImpl::get_global_route(const NetPoint* src, const NetPoint* dst,
-                                   /* OUT */ std::vector<resource::LinkImpl*>& links, double* latency)
+                                   /* OUT */ std::vector<resource::StandardLinkImpl*>& links, double* latency)
 {
   std::unordered_set<NetZoneImpl*> netzones;
   get_global_route_with_netzones(src, dst, links, latency, netzones);
 }
 
 void NetZoneImpl::get_global_route_with_netzones(const NetPoint* src, const NetPoint* dst,
-                                                 /* OUT */ std::vector<resource::LinkImpl*>& links, double* latency,
-                                                 std::unordered_set<NetZoneImpl*>& netzones)
+                                                 /* OUT */ std::vector<resource::StandardLinkImpl*>& links,
+                                                 double* latency, std::unordered_set<NetZoneImpl*>& netzones)
 {
   Route route;
 
index 7bbddf9..308c81e 100644 (file)
@@ -5,7 +5,7 @@
 
 #include "simgrid/kernel/routing/RoutedZone.hpp"
 #include "simgrid/kernel/routing/NetPoint.hpp"
-#include "src/surf/network_interface.hpp"
+#include "src/kernel/resource/StandardLinkImpl.hpp"
 #include "xbt/dict.h"
 #include "xbt/graph.h"
 #include "xbt/log.h"
@@ -111,7 +111,7 @@ void RoutedZone::get_graph(const s_xbt_graph_t* graph, std::map<std::string, xbt
 /* ************************* GENERIC AUX FUNCTIONS ************************** */
 /* change a route containing link names into a route containing link entities */
 Route* RoutedZone::new_extended_route(RoutingMode hierarchy, NetPoint* gw_src, NetPoint* gw_dst,
-                                      const std::vector<resource::LinkImpl*>& link_list, bool preserve_order)
+                                      const std::vector<resource::StandardLinkImpl*>& link_list, bool preserve_order)
 {
   auto* result = new Route();
 
index c30a638..f3bebd8 100644 (file)
@@ -6,7 +6,7 @@
 #include "simgrid/kernel/routing/StarZone.hpp"
 #include "simgrid/kernel/routing/NetPoint.hpp"
 #include "simgrid/kernel/routing/RoutedZone.hpp"
-#include "src/surf/network_interface.hpp"
+#include "src/kernel/resource/StandardLinkImpl.hpp"
 #include "xbt/string.hpp"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_star, surf, "Routing part of surf");
@@ -16,8 +16,8 @@ namespace kernel {
 namespace routing {
 StarZone::StarZone(const std::string& name) : ClusterZone(name) {}
 
-void StarZone::add_links_to_route(const std::vector<resource::LinkImpl*>& links, Route* route, double* latency,
-                                  std::unordered_set<resource::LinkImpl*>& added_links) const
+void StarZone::add_links_to_route(const std::vector<resource::StandardLinkImpl*>& links, Route* route, double* latency,
+                                  std::unordered_set<resource::StandardLinkImpl*>& added_links) const
 {
   for (auto* link : links) {
     /* do not add duplicated links in route->link_list_ */
@@ -34,7 +34,7 @@ void StarZone::get_local_route(const NetPoint* src, const NetPoint* dst, Route*
 
   const auto& src_route = routes_.at(src->id());
   const auto& dst_route = routes_.at(dst->id());
-  std::unordered_set<resource::LinkImpl*> added_links;
+  std::unordered_set<resource::StandardLinkImpl*> added_links;
   /* loopback */
   if (src == dst && src_route.has_loopback()) {
     add_links_to_route(src_route.loopback, route, latency, added_links);
index afc79b6..4a81b27 100644 (file)
@@ -10,7 +10,7 @@
 #include "simgrid/s4u/Engine.hpp"
 #include "simgrid/s4u/Host.hpp"
 #include "simgrid/s4u/NetZone.hpp"
-#include "src/surf/network_interface.hpp"
+#include "src/kernel/resource/StandardLinkImpl.hpp"
 
 TEST_CASE("kernel::routing::StarZone: Creating Zone", "[creation]")
 {
index ce897b4..ccc9fdf 100644 (file)
@@ -6,7 +6,7 @@
 #include "simgrid/kernel/routing/TorusZone.hpp"
 #include "simgrid/kernel/routing/NetPoint.hpp"
 #include "simgrid/s4u/Host.hpp"
-#include "src/surf/network_interface.hpp"
+#include "src/kernel/resource/LinkImpl.hpp"
 
 #include <boost/algorithm/string/classification.hpp>
 #include <boost/algorithm/string/split.hpp>
@@ -86,7 +86,7 @@ void TorusZone::get_local_route(const NetPoint* src, const NetPoint* dst, Route*
     return;
 
   if (src->id() == dst->id() && has_loopback()) {
-    resource::LinkImpl* uplink = get_uplink_from(node_pos(src->id()));
+    resource::StandardLinkImpl* uplink = get_uplink_from(node_pos(src->id()));
 
     add_link_latency(route->link_list_, uplink, lat);
     return;
@@ -162,7 +162,7 @@ void TorusZone::get_local_route(const NetPoint* src, const NetPoint* dst, Route*
       route->link_list_.push_back(get_uplink_from(node_pos_with_loopback(current_node)));
     }
 
-    resource::LinkImpl* lnk;
+    resource::StandardLinkImpl* lnk;
     if (use_lnk_up)
       lnk = get_uplink_from(linkOffset);
     else
index c68526d..aa68d48 100644 (file)
@@ -8,7 +8,7 @@
 #include <simgrid/s4u/Engine.hpp>
 #include <simgrid/s4u/Host.hpp>
 
-#include "src/surf/network_interface.hpp"
+#include "src/kernel/resource/StandardLinkImpl.hpp"
 
 #include <boost/algorithm/string.hpp>
 
index 1e16ca1..5fe8489 100644 (file)
@@ -6,7 +6,7 @@
 #include <simgrid/kernel/routing/NetPoint.hpp>
 #include <simgrid/kernel/routing/WifiZone.hpp>
 
-#include "src/surf/network_interface.hpp"
+#include "src/kernel/resource/StandardLinkImpl.hpp"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_wifi, surf, "Routing part of surf");
 
index b0677f6..c9cf1ac 100644 (file)
@@ -13,7 +13,7 @@
 
 #include "src/internal_config.h" // HAVE_SMPI
 #include "src/kernel/activity/CommImpl.hpp"
-#include "src/surf/network_interface.hpp"
+#include "src/kernel/resource/StandardLinkImpl.hpp"
 #if HAVE_SMPI
 #include "src/smpi/include/smpi_request.hpp"
 #include "src/smpi/plugins/ampi/ampi.hpp"
index bee75ad..5080f41 100644 (file)
@@ -8,8 +8,8 @@
 #include <simgrid/s4u/Link.hpp>
 
 #include "src/kernel/activity/CommImpl.hpp"
-#include "src/surf/network_interface.hpp"
-#include "src/surf/network_wifi.hpp"
+#include "src/kernel/resource/StandardLinkImpl.hpp"
+#include "src/kernel/resource/WifiLinkImpl.hpp"
 
 #include <boost/algorithm/string/classification.hpp>
 #include <boost/algorithm/string/split.hpp>
@@ -27,7 +27,7 @@ namespace plugin {
 
 class XBT_PRIVATE LinkEnergyWifi {
   // associative array keeping size of data already sent for a given flow (required for interleaved actions)
-  std::map<kernel::resource::NetworkWifiAction*, std::pair<int, double>> flowTmp{};
+  std::map<kernel::resource::WifiLinkAction*, std::pair<int, double>> flowTmp{};
 
   // WiFi link the plugin instance is attached to
   s4u::Link* link_{};
@@ -98,7 +98,7 @@ xbt::Extension<s4u::Link, LinkEnergyWifi> LinkEnergyWifi::EXTENSION_ID;
 
 void LinkEnergyWifi::update_destroy()
 {
-  auto const* wifi_link = static_cast<kernel::resource::NetworkWifiLink*>(link_->get_impl());
+  auto const* wifi_link = static_cast<kernel::resource::WifiLinkImpl*>(link_->get_impl());
   double duration       = simgrid::s4u::Engine::get_clock() - prev_update_;
   prev_update_          = simgrid::s4u::Engine::get_clock();
 
@@ -122,7 +122,7 @@ void LinkEnergyWifi::update()
   if(duration < 1e-6)
     return;
 
-  auto const* wifi_link = static_cast<kernel::resource::NetworkWifiLink*>(link_->get_impl());
+  auto const* wifi_link = static_cast<kernel::resource::WifiLinkImpl*>(link_->get_impl());
 
   const kernel::lmm::Element* elem = nullptr;
 
@@ -137,7 +137,7 @@ void LinkEnergyWifi::update()
    */
   double durUsage = 0;
   while (const auto* var = wifi_link->get_constraint()->get_variable(&elem)) {
-    auto* action = static_cast<kernel::resource::NetworkWifiAction*>(var->get_id());
+    auto* action = static_cast<kernel::resource::WifiLinkAction*>(var->get_id());
     XBT_DEBUG("cost: %f action value: %f link rate 1: %f link rate 2: %f", action->get_cost(), action->get_rate(),
               wifi_link->get_host_rate(&action->get_src()), wifi_link->get_host_rate(&action->get_dst()));
 
index 69b4397..e2e0581 100644 (file)
@@ -7,7 +7,7 @@
 #include <simgrid/s4u/Engine.hpp>
 
 #include "src/kernel/activity/CommImpl.hpp"
-#include "src/surf/network_interface.hpp"
+#include "src/kernel/resource/StandardLinkImpl.hpp"
 
 #include <limits>
 
index be5c558..a2bd5f2 100644 (file)
@@ -13,6 +13,7 @@
 #include <simgrid/s4u/VirtualMachine.hpp>
 #include <xbt/parse_units.hpp>
 
+#include "src/kernel/resource/StandardLinkImpl.hpp"
 #include "src/kernel/resource/VirtualMachineImpl.hpp"
 #include "src/surf/HostImpl.hpp"
 
@@ -160,14 +161,14 @@ size_t Host::get_actor_count() const
  */
 void Host::route_to(const Host* dest, std::vector<Link*>& links, double* latency) const
 {
-  std::vector<kernel::resource::LinkImpl*> linkImpls;
+  std::vector<kernel::resource::StandardLinkImpl*> linkImpls;
   this->route_to(dest, linkImpls, latency);
   for (auto* l : linkImpls)
     links.push_back(l->get_iface());
 }
 
 /** @brief Just like Host::routeTo, but filling an array of link implementations */
-void Host::route_to(const Host* dest, std::vector<kernel::resource::LinkImpl*>& links, double* latency) const
+void Host::route_to(const Host* dest, std::vector<kernel::resource::StandardLinkImpl*>& links, double* latency) const
 {
   kernel::routing::NetZoneImpl::get_global_route(pimpl_netpoint_, dest->get_netpoint(), links, latency);
   if (XBT_LOG_ISENABLED(surf_route, xbt_log_priority_debug)) {
index 8391962..a949b72 100644 (file)
@@ -10,9 +10,9 @@
 #include <xbt/config.hpp>
 #include <xbt/parse_units.hpp>
 
-#include "src/surf/SplitDuplexLinkImpl.hpp"
-#include "src/surf/network_interface.hpp"
-#include "src/surf/network_wifi.hpp"
+#include "src/kernel/resource/LinkImpl.hpp"
+#include "src/kernel/resource/SplitDuplexLinkImpl.hpp"
+#include "src/kernel/resource/WifiLinkImpl.hpp"
 
 namespace simgrid {
 
@@ -32,9 +32,9 @@ Link* Link::by_name(const std::string& name)
   return Engine::get_instance()->link_by_name(name);
 }
 
-kernel::resource::LinkImpl* Link::get_impl() const
+kernel::resource::StandardLinkImpl* Link::get_impl() const
 {
-  auto* link_impl = dynamic_cast<kernel::resource::LinkImpl*>(pimpl_);
+  auto* link_impl = dynamic_cast<kernel::resource::StandardLinkImpl*>(pimpl_);
   xbt_assert(link_impl != nullptr, "Impossible to get a LinkImpl* from link. %s.",
              (get_sharing_policy() == SharingPolicy::SPLITDUPLEX
                   ? "For a Split-Duplex link, you should call this method to each UP/DOWN member"
@@ -115,7 +115,7 @@ Link::SharingPolicy Link::get_sharing_policy() const
 
 void Link::set_host_wifi_rate(const s4u::Host* host, int level) const
 {
-  auto* wlink = dynamic_cast<kernel::resource::NetworkWifiLink*>(pimpl_);
+  auto* wlink = dynamic_cast<kernel::resource::WifiLinkImpl*>(pimpl_);
   xbt_assert(wlink != nullptr, "Link %s does not seem to be a wifi link.", get_cname());
   wlink->set_host_rate(host, level);
 }
index 31df149..4f10cc7 100644 (file)
 #include <simgrid/zone.h>
 #include <xbt/parse_units.hpp>
 
-#include "src/surf/network_interface.hpp"
+#include "src/kernel/resource/LinkImpl.hpp"
+#include "src/kernel/resource/StandardLinkImpl.hpp"
 
 namespace simgrid {
 namespace s4u {
 
 xbt::signal<void(bool symmetrical, kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
                  kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
-                 std::vector<kernel::resource::LinkImpl*> const& link_list)>
+                 std::vector<kernel::resource::StandardLinkImpl*> const& link_list)>
     NetZone::on_route_creation;
 xbt::signal<void(NetZone const&)> NetZone::on_creation;
 xbt::signal<void(NetZone const&)> NetZone::on_seal;
@@ -102,7 +103,8 @@ unsigned long NetZone::add_component(kernel::routing::NetPoint* elm)
 }
 
 // XBT_ATTRIB_DEPRECATED_v332
-std::vector<LinkInRoute> NetZone::convert_to_linkInRoute(const std::vector<kernel::resource::LinkImpl*>& link_list)
+std::vector<LinkInRoute>
+NetZone::convert_to_linkInRoute(const std::vector<kernel::resource::StandardLinkImpl*>& link_list)
 {
   std::vector<LinkInRoute> links;
   for (const auto* link : link_list) {
@@ -121,7 +123,7 @@ void NetZone::add_route(kernel::routing::NetPoint* src, kernel::routing::NetPoin
 // XBT_ATTRIB_DEPRECATED_v332
 void NetZone::add_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
                         kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
-                        const std::vector<kernel::resource::LinkImpl*>& link_list, bool symmetrical)
+                        const std::vector<kernel::resource::StandardLinkImpl*>& link_list, bool symmetrical)
 {
   pimpl_->add_route(src, dst, gw_src, gw_dst, convert_to_linkInRoute(link_list), symmetrical);
 }
@@ -129,7 +131,7 @@ void NetZone::add_route(kernel::routing::NetPoint* src, kernel::routing::NetPoin
 // XBT_ATTRIB_DEPRECATED_v332
 void NetZone::add_bypass_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
                                kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
-                               std::vector<kernel::resource::LinkImpl*>& link_list, bool /*symmetrical*/)
+                               std::vector<kernel::resource::StandardLinkImpl*>& link_list, bool /*symmetrical*/)
 {
   pimpl_->add_bypass_route(src, dst, gw_src, gw_dst, convert_to_linkInRoute(link_list));
 }
index 0dcc24d..99b22da 100644 (file)
@@ -9,7 +9,7 @@
 #include "src/kernel/actor/ActorImpl.hpp"
 #include "src/kernel/resource/CpuImpl.hpp"
 #include "src/kernel/resource/DiskImpl.hpp"
-#include "src/surf/network_interface.hpp"
+#include "src/kernel/resource/LinkImpl.hpp"
 #include <xbt/PropertyHolder.hpp>
 
 #include <vector>
diff --git a/src/surf/LinkImplIntf.hpp b/src/surf/LinkImplIntf.hpp
deleted file mode 100644 (file)
index 6845de0..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/* Copyright (c) 2004-2021. The SimGrid Team. All rights reserved.          */
-
-/* This program is free software; you can redistribute it and/or modify it
- * under the terms of the license (GNU LGPL) which comes with this package. */
-
-#ifndef SIMGRID_KERNEL_RESOURCE_LINKIMPLINTF_HPP
-#define SIMGRID_KERNEL_RESOURCE_LINKIMPLINTF_HPP
-
-#include "simgrid/s4u/Link.hpp"
-#include "src/kernel/resource/Resource.hpp"
-#include "xbt/PropertyHolder.hpp"
-
-/***********
- * Classes *
- ***********/
-
-namespace simgrid {
-namespace kernel {
-namespace resource {
-/************
- * Resource *
- ************/
-/** @ingroup SURF_interface
- * @brief SURF network link interface class
- * @details A Link represents the link between two [hosts](@ref HostImpl)
- */
-class LinkImplIntf : public Resource_T<LinkImplIntf>, public xbt::PropertyHolder {
-public:
-  using Resource_T::Resource_T;
-  /** @brief Get the bandwidth in bytes per second of current Link */
-  virtual double get_bandwidth() const = 0;
-  /** @brief Update the bandwidth in bytes per second of current Link */
-  virtual void set_bandwidth(double value) = 0;
-
-  /** @brief Get the latency in seconds of current Link */
-  virtual double get_latency() const = 0;
-  /** @brief Update the latency in seconds of current Link */
-  virtual void set_latency(double value) = 0;
-
-  /** @brief The sharing policy */
-  virtual void set_sharing_policy(s4u::Link::SharingPolicy policy, const s4u::NonLinearResourceCb& cb) = 0;
-  virtual s4u::Link::SharingPolicy get_sharing_policy() const      = 0;
-
-  /* setup the profile file with bandwidth events (peak speed changes due to external load).
-   * Profile must contain percentages (value between 0 and 1). */
-  virtual void set_bandwidth_profile(kernel::profile::Profile* profile) = 0;
-  /* setup the profile file with latency events (peak latency changes due to external load).
-   * Profile must contain absolute values */
-  virtual void set_latency_profile(kernel::profile::Profile* profile) = 0;
-  /** @brief Set the concurrency limit for this link */
-  virtual void set_concurrency_limit(int limit) const = 0;
-};
-
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
-
-#endif /* SIMGRID_KERNEL_RESOURCE_LINKIMPLINTF_HPP */
index 3dc1bd7..5037e6a 100644 (file)
@@ -9,8 +9,9 @@
 #include "simgrid/s4u/Host.hpp"
 #include "simgrid/sg_config.hpp"
 #include "src/kernel/EngineImpl.hpp"
+#include "src/kernel/resource/StandardLinkImpl.hpp"
+#include "src/kernel/resource/WifiLinkImpl.hpp"
 #include "src/kernel/resource/profile/Event.hpp"
-#include "src/surf/network_wifi.hpp"
 #include "src/surf/surf_interface.hpp"
 
 #include <algorithm>
@@ -128,7 +129,7 @@ void NetworkCm02Model::set_bw_factor_cb(const std::function<NetworkFactorCb>& cb
   bw_factor_cb_ = cb;
 }
 
-LinkImpl* NetworkCm02Model::create_link(const std::string& name, const std::vector<double>& bandwidths)
+StandardLinkImpl* NetworkCm02Model::create_link(const std::string& name, const std::vector<double>& bandwidths)
 {
   xbt_assert(bandwidths.size() == 1, "Non-WIFI links must use only 1 bandwidth.");
   auto link = new NetworkCm02Link(name, bandwidths[0], get_maxmin_system());
@@ -136,9 +137,9 @@ LinkImpl* NetworkCm02Model::create_link(const std::string& name, const std::vect
   return link;
 }
 
-LinkImpl* NetworkCm02Model::create_wifi_link(const std::string& name, const std::vector<double>& bandwidths)
+StandardLinkImpl* NetworkCm02Model::create_wifi_link(const std::string& name, const std::vector<double>& bandwidths)
 {
-  auto link = new NetworkWifiLink(name, bandwidths, get_maxmin_system());
+  auto link = new WifiLinkImpl(name, bandwidths, get_maxmin_system());
   link->set_model(this);
   return link;
 }
@@ -206,17 +207,17 @@ void NetworkCm02Model::update_actions_state_full(double /*now*/, double delta)
 
 void NetworkCm02Model::comm_action_expand_constraints(const s4u::Host* src, const s4u::Host* dst,
                                                       const NetworkCm02Action* action,
-                                                      const std::vector<LinkImpl*>& route,
-                                                      const std::vector<LinkImpl*>& back_route) const
+                                                      const std::vector<StandardLinkImpl*>& route,
+                                                      const std::vector<StandardLinkImpl*>& back_route) const
 {
   /* expand route links constraints for route and back_route */
-  const NetworkWifiLink* src_wifi_link = nullptr;
-  const NetworkWifiLink* dst_wifi_link = nullptr;
+  const WifiLinkImpl* src_wifi_link = nullptr;
+  const WifiLinkImpl* dst_wifi_link = nullptr;
   if (not route.empty() && route.front()->get_sharing_policy() == s4u::Link::SharingPolicy::WIFI) {
-    src_wifi_link = static_cast<NetworkWifiLink*>(route.front());
+    src_wifi_link = static_cast<WifiLinkImpl*>(route.front());
   }
   if (route.size() > 1 && route.back()->get_sharing_policy() == s4u::Link::SharingPolicy::WIFI) {
-    dst_wifi_link = static_cast<NetworkWifiLink*>(route.back());
+    dst_wifi_link = static_cast<WifiLinkImpl*>(route.back());
   }
 
   /* WI-FI links needs special treatment, do it here */
@@ -252,20 +253,20 @@ void NetworkCm02Model::comm_action_expand_constraints(const s4u::Host* src, cons
 }
 
 NetworkCm02Action* NetworkCm02Model::comm_action_create(s4u::Host* src, s4u::Host* dst, double size,
-                                                        const std::vector<LinkImpl*>& route, bool failed)
+                                                        const std::vector<StandardLinkImpl*>& route, bool failed)
 {
-  NetworkWifiLink* src_wifi_link = nullptr;
-  NetworkWifiLink* dst_wifi_link = nullptr;
+  WifiLinkImpl* src_wifi_link = nullptr;
+  WifiLinkImpl* dst_wifi_link = nullptr;
   /* many checks related to Wi-Fi links */
   if (not route.empty() && route.front()->get_sharing_policy() == s4u::Link::SharingPolicy::WIFI) {
-    src_wifi_link = static_cast<NetworkWifiLink*>(route.front());
+    src_wifi_link = static_cast<WifiLinkImpl*>(route.front());
     xbt_assert(src_wifi_link->get_host_rate(src) != -1,
                "The route from %s to %s begins with the WIFI link %s, but the host %s does not seem attached to that "
                "WIFI link. Did you call link->set_host_rate()?",
                src->get_cname(), dst->get_cname(), src_wifi_link->get_cname(), src->get_cname());
   }
   if (route.size() > 1 && route.back()->get_sharing_policy() == s4u::Link::SharingPolicy::WIFI) {
-    dst_wifi_link = static_cast<NetworkWifiLink*>(route.back());
+    dst_wifi_link = static_cast<WifiLinkImpl*>(route.back());
     xbt_assert(dst_wifi_link->get_host_rate(dst) != -1,
                "The route from %s to %s ends with the WIFI link %s, but the host %s does not seem attached to that "
                "WIFI link. Did you call link->set_host_rate()?",
@@ -292,7 +293,7 @@ NetworkCm02Action* NetworkCm02Model::comm_action_create(s4u::Host* src, s4u::Hos
   if (src_wifi_link == nullptr && dst_wifi_link == nullptr)
     action = new NetworkCm02Action(this, *src, *dst, size, failed);
   else
-    action = new NetworkWifiAction(this, *src, *dst, size, failed, src_wifi_link, dst_wifi_link);
+    action = new WifiLinkAction(this, *src, *dst, size, failed, src_wifi_link, dst_wifi_link);
 
   if (is_update_lazy()) {
     action->set_last_update();
@@ -302,7 +303,8 @@ NetworkCm02Action* NetworkCm02Model::comm_action_create(s4u::Host* src, s4u::Hos
 }
 
 bool NetworkCm02Model::comm_get_route_info(const s4u::Host* src, const s4u::Host* dst, double& latency,
-                                           std::vector<LinkImpl*>& route, std::vector<LinkImpl*>& back_route,
+                                           std::vector<StandardLinkImpl*>& route,
+                                           std::vector<StandardLinkImpl*>& back_route,
                                            std::unordered_set<kernel::routing::NetZoneImpl*>& netzones) const
 {
   kernel::routing::NetZoneImpl::get_global_route_with_netzones(src->get_netpoint(), dst->get_netpoint(), route,
@@ -312,19 +314,19 @@ bool NetworkCm02Model::comm_get_route_info(const s4u::Host* src, const s4u::Host
              "You're trying to send data from %s to %s but there is no connecting path between these two hosts.",
              src->get_cname(), dst->get_cname());
 
-  bool failed = std::any_of(route.begin(), route.end(), [](const LinkImpl* link) { return not link->is_on(); });
+  bool failed = std::any_of(route.begin(), route.end(), [](const StandardLinkImpl* link) { return not link->is_on(); });
 
   if (cfg_crosstraffic) {
     dst->route_to(src, back_route, nullptr);
     if (not failed)
-      failed =
-          std::any_of(back_route.begin(), back_route.end(), [](const LinkImpl* link) { return not link->is_on(); });
+      failed = std::any_of(back_route.begin(), back_route.end(),
+                           [](const StandardLinkImpl* link) { return not link->is_on(); });
   }
   return failed;
 }
 
 void NetworkCm02Model::comm_action_set_bounds(const s4u::Host* src, const s4u::Host* dst, double size,
-                                              NetworkCm02Action* action, const std::vector<LinkImpl*>& route,
+                                              NetworkCm02Action* action, const std::vector<StandardLinkImpl*>& route,
                                               const std::unordered_set<kernel::routing::NetZoneImpl*>& netzones,
                                               double rate)
 {
@@ -333,7 +335,8 @@ void NetworkCm02Model::comm_action_set_bounds(const s4u::Host* src, const s4u::H
 
   /* transform data to user structures if necessary */
   if (lat_factor_cb_ || bw_factor_cb_) {
-    std::for_each(route.begin(), route.end(), [&s4u_route](LinkImpl* l) { s4u_route.push_back(l->get_iface()); });
+    std::for_each(route.begin(), route.end(),
+                  [&s4u_route](StandardLinkImpl* l) { s4u_route.push_back(l->get_iface()); });
     std::for_each(netzones.begin(), netzones.end(),
                   [&s4u_netzones](kernel::routing::NetZoneImpl* n) { s4u_netzones.insert(n->get_iface()); });
   }
@@ -373,8 +376,8 @@ void NetworkCm02Model::comm_action_set_bounds(const s4u::Host* src, const s4u::H
   }
 }
 
-void NetworkCm02Model::comm_action_set_variable(NetworkCm02Action* action, const std::vector<LinkImpl*>& route,
-                                                const std::vector<LinkImpl*>& back_route)
+void NetworkCm02Model::comm_action_set_variable(NetworkCm02Action* action, const std::vector<StandardLinkImpl*>& route,
+                                                const std::vector<StandardLinkImpl*>& back_route)
 {
   size_t constraints_per_variable = route.size();
   constraints_per_variable += back_route.size();
@@ -408,8 +411,8 @@ void NetworkCm02Model::comm_action_set_variable(NetworkCm02Action* action, const
 Action* NetworkCm02Model::communicate(s4u::Host* src, s4u::Host* dst, double size, double rate)
 {
   double latency = 0.0;
-  std::vector<LinkImpl*> back_route;
-  std::vector<LinkImpl*> route;
+  std::vector<StandardLinkImpl*> back_route;
+  std::vector<StandardLinkImpl*> route;
   std::unordered_set<kernel::routing::NetZoneImpl*> netzones;
 
   XBT_IN("(%s,%s,%g,%g)", src->get_cname(), dst->get_cname(), size, rate);
@@ -421,10 +424,10 @@ Action* NetworkCm02Model::communicate(s4u::Host* src, s4u::Host* dst, double siz
   action->latency_          = latency;
 
   if (sg_weight_S_parameter > 0) {
-    action->sharing_penalty_ =
-        std::accumulate(route.begin(), route.end(), action->sharing_penalty_, [](double total, LinkImpl* const& link) {
-          return total + sg_weight_S_parameter / link->get_bandwidth();
-        });
+    action->sharing_penalty_ = std::accumulate(route.begin(), route.end(), action->sharing_penalty_,
+                                               [](double total, StandardLinkImpl* const& link) {
+                                                 return total + sg_weight_S_parameter / link->get_bandwidth();
+                                               });
   }
 
   /* setting bandwidth and latency bounds considering route and configured bw/lat factors */
@@ -444,7 +447,7 @@ Action* NetworkCm02Model::communicate(s4u::Host* src, s4u::Host* dst, double siz
  * Resource *
  ************/
 NetworkCm02Link::NetworkCm02Link(const std::string& name, double bandwidth, kernel::lmm::System* system)
-    : LinkImpl(name)
+    : StandardLinkImpl(name)
 {
   bandwidth_.scale = 1.0;
   bandwidth_.peak  = bandwidth;
@@ -483,7 +486,7 @@ void NetworkCm02Link::set_bandwidth(double value)
 
   get_model()->get_maxmin_system()->update_constraint_bound(get_constraint(), (bandwidth_.peak * bandwidth_.scale));
 
-  LinkImpl::on_bandwidth_change();
+  StandardLinkImpl::on_bandwidth_change();
 
   if (sg_weight_S_parameter > 0) {
     double delta = sg_weight_S_parameter / (bandwidth_.peak * bandwidth_.scale) -
index c962616..c6b709f 100644 (file)
@@ -8,8 +8,9 @@
 
 #include <xbt/base.h>
 
-#include "network_interface.hpp"
 #include "simgrid/kernel/resource/NetworkModelIntf.hpp"
+#include "src/kernel/resource/LinkImpl.hpp"
+#include "src/kernel/resource/StandardLinkImpl.hpp"
 #include "xbt/graph.h"
 #include "xbt/string.hpp"
 
@@ -32,27 +33,27 @@ class XBT_PRIVATE NetworkSmpiModel;
 class NetworkCm02Model : public NetworkModel {
   /** @brief Get route information (2-way) */
   bool comm_get_route_info(const s4u::Host* src, const s4u::Host* dst, /* OUT */ double& latency,
-                           std::vector<LinkImpl*>& route, std::vector<LinkImpl*>& back_route,
+                           std::vector<StandardLinkImpl*>& route, std::vector<StandardLinkImpl*>& back_route,
                            std::unordered_set<kernel::routing::NetZoneImpl*>& netzones) const;
   /** @brief Create network action for this communication */
   NetworkCm02Action* comm_action_create(s4u::Host* src, s4u::Host* dst, double size,
-                                        const std::vector<LinkImpl*>& route, bool failed);
+                                        const std::vector<StandardLinkImpl*>& route, bool failed);
   /** @brief Expand link contraint considering this new communication action */
   void comm_action_expand_constraints(const s4u::Host* src, const s4u::Host* dst, const NetworkCm02Action* action,
-                                      const std::vector<LinkImpl*>& route,
-                                      const std::vector<LinkImpl*>& back_route) const;
+                                      const std::vector<StandardLinkImpl*>& route,
+                                      const std::vector<StandardLinkImpl*>& back_route) const;
   /** @brief Set communication bounds for latency and bandwidth */
   void comm_action_set_bounds(const s4u::Host* src, const s4u::Host* dst, double size, NetworkCm02Action* action,
-                              const std::vector<LinkImpl*>& route,
+                              const std::vector<StandardLinkImpl*>& route,
                               const std::unordered_set<kernel::routing::NetZoneImpl*>& netzones, double rate);
   /** @brief Create maxmin variable in communication action */
-  void comm_action_set_variable(NetworkCm02Action* action, const std::vector<LinkImpl*>& route,
-                                const std::vector<LinkImpl*>& back_route);
+  void comm_action_set_variable(NetworkCm02Action* action, const std::vector<StandardLinkImpl*>& route,
+                                const std::vector<StandardLinkImpl*>& back_route);
 
 public:
   explicit NetworkCm02Model(const std::string& name);
-  LinkImpl* create_link(const std::string& name, const std::vector<double>& bandwidths) final;
-  LinkImpl* create_wifi_link(const std::string& name, const std::vector<double>& bandwidths) override;
+  StandardLinkImpl* create_link(const std::string& name, const std::vector<double>& bandwidths) final;
+  StandardLinkImpl* create_wifi_link(const std::string& name, const std::vector<double>& bandwidths) override;
   void update_actions_state_lazy(double now, double delta) override;
   void update_actions_state_full(double now, double delta) override;
   Action* communicate(s4u::Host* src, s4u::Host* dst, double size, double rate) override;
@@ -72,7 +73,7 @@ private:
  * Resource *
  ************/
 
-class NetworkCm02Link : public LinkImpl {
+class NetworkCm02Link : public StandardLinkImpl {
 public:
   NetworkCm02Link(const std::string& name, double bandwidth, lmm::System* system);
   void apply_event(kernel::profile::Event* event, double value) override;
index b786a20..b8e9606 100644 (file)
@@ -27,7 +27,7 @@ namespace simgrid {
 namespace kernel {
 namespace resource {
 
-LinkImpl* NetworkConstantModel::create_link(const std::string& name, const std::vector<double>& /*bandwidth*/)
+StandardLinkImpl* NetworkConstantModel::create_link(const std::string& name, const std::vector<double>& /*bandwidth*/)
 {
   xbt_die("Refusing to create the link %s: there is no link in the Constant network model. "
           "Please remove any link from your platform (and switch to routing='None')",
@@ -35,7 +35,7 @@ LinkImpl* NetworkConstantModel::create_link(const std::string& name, const std::
   return nullptr;
 }
 
-LinkImpl* NetworkConstantModel::create_wifi_link(const std::string& name, const std::vector<double>& bandwidths)
+StandardLinkImpl* NetworkConstantModel::create_wifi_link(const std::string& name, const std::vector<double>& bandwidths)
 {
   return create_link(name, bandwidths);
 }
index d0f733e..713c915 100644 (file)
@@ -6,7 +6,7 @@
 #ifndef NETWORK_CONSTANT_HPP_
 #define NETWORK_CONSTANT_HPP_
 
-#include "network_interface.hpp"
+#include "src/kernel/resource/LinkImpl.hpp"
 
 namespace simgrid {
 namespace kernel {
@@ -19,8 +19,8 @@ public:
   double next_occurring_event(double now) override;
   void update_actions_state(double now, double delta) override;
 
-  LinkImpl* create_link(const std::string& name, const std::vector<double>& bws) override;
-  LinkImpl* create_wifi_link(const std::string& name, const std::vector<double>& bws) override;
+  StandardLinkImpl* create_link(const std::string& name, const std::vector<double>& bws) override;
+  StandardLinkImpl* create_wifi_link(const std::string& name, const std::vector<double>& bws) override;
 };
 
 class NetworkConstantAction final : public NetworkAction {
index 900518a..f9c66af 100644 (file)
@@ -241,7 +241,7 @@ static void clusterCreation_cb(simgrid::kernel::routing::ClusterCreationArgs con
 static void routeCreation_cb(bool symmetrical, simgrid::kernel::routing::NetPoint* src,
                              simgrid::kernel::routing::NetPoint* dst, simgrid::kernel::routing::NetPoint* /*gw_src*/,
                              simgrid::kernel::routing::NetPoint* /*gw_dst*/,
-                             std::vector<simgrid::kernel::resource::LinkImpl*> const& link_list)
+                             std::vector<simgrid::kernel::resource::StandardLinkImpl*> const& link_list)
 {
   /* ignoring routes from StarZone, not supported */
   if (not src || not dst)
@@ -346,7 +346,7 @@ NetworkNS3Model::NetworkNS3Model(const std::string& name) : NetworkModel(name)
   s4u::NetZone::on_seal_cb(&zoneCreation_cb);
 }
 
-LinkImpl* NetworkNS3Model::create_link(const std::string& name, const std::vector<double>& bandwidths)
+StandardLinkImpl* NetworkNS3Model::create_link(const std::string& name, const std::vector<double>& bandwidths)
 {
   xbt_assert(bandwidths.size() == 1, "ns-3 links must use only 1 bandwidth.");
   auto* link = new LinkNS3(name, bandwidths[0]);
@@ -354,7 +354,7 @@ LinkImpl* NetworkNS3Model::create_link(const std::string& name, const std::vecto
   return link;
 }
 
-LinkImpl* NetworkNS3Model::create_wifi_link(const std::string& name, const std::vector<double>& bandwidths)
+StandardLinkImpl* NetworkNS3Model::create_wifi_link(const std::string& name, const std::vector<double>& bandwidths)
 {
   auto* link = create_link(name, bandwidths);
   link->set_sharing_policy(s4u::Link::SharingPolicy::WIFI, {});
@@ -420,7 +420,7 @@ void NetworkNS3Model::update_actions_state(double now, double delta)
     if (TRACE_is_enabled() && action->get_state() == kernel::resource::Action::State::STARTED) {
       double data_delta_sent = sgFlow->sent_bytes_ - action->last_sent_;
 
-      std::vector<LinkImpl*> route = std::vector<LinkImpl*>();
+      std::vector<StandardLinkImpl*> route = std::vector<StandardLinkImpl*>();
 
       action->get_src().route_to(&action->get_dst(), route, nullptr);
       for (auto const& link : route)
@@ -459,7 +459,7 @@ void NetworkNS3Model::update_actions_state(double now, double delta)
  * Resource *
  ************/
 
-LinkNS3::LinkNS3(const std::string& name, double bandwidth) : LinkImpl(name)
+LinkNS3::LinkNS3(const std::string& name, double bandwidth) : StandardLinkImpl(name)
 {
   bandwidth_.peak = bandwidth;
 }
@@ -558,7 +558,7 @@ void NetworkNS3Action::resume()
   THROW_UNIMPLEMENTED;
 }
 
-std::list<LinkImpl*> NetworkNS3Action::get_links() const
+std::list<StandardLinkImpl*> NetworkNS3Action::get_links() const
 {
   THROW_UNIMPLEMENTED;
 }
index 398de6e..e7a9f0a 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "xbt/base.h"
 
-#include "network_interface.hpp"
+#include "src/kernel/resource/StandardLinkImpl.hpp"
 
 namespace simgrid {
 namespace kernel {
@@ -17,8 +17,8 @@ namespace resource {
 class NetworkNS3Model : public NetworkModel {
 public:
   explicit NetworkNS3Model(const std::string& name);
-  LinkImpl* create_link(const std::string& name, const std::vector<double>& bandwidth) override;
-  LinkImpl* create_wifi_link(const std::string& name, const std::vector<double>& bandwidth) override;
+  StandardLinkImpl* create_link(const std::string& name, const std::vector<double>& bandwidth) override;
+  StandardLinkImpl* create_wifi_link(const std::string& name, const std::vector<double>& bandwidth) override;
   Action* communicate(s4u::Host* src, s4u::Host* dst, double size, double rate) override;
   double next_occurring_event(double now) override;
   bool next_occurring_event_is_idempotent() override { return false; }
@@ -28,7 +28,7 @@ public:
 /************
  * Resource *
  ************/
-class LinkNS3 : public LinkImpl {
+class LinkNS3 : public StandardLinkImpl {
 public:
   explicit LinkNS3(const std::string& name, double bandwidth);
   ~LinkNS3() override;
@@ -52,7 +52,7 @@ public:
 
   void suspend() override;
   void resume() override;
-  std::list<LinkImpl*> get_links() const override;
+  std::list<StandardLinkImpl*> get_links() const override;
   void update_remains_lazy(double now) override;
 
   // private:
index b6c4e5d..6d63a2a 100644 (file)
@@ -169,7 +169,7 @@ L07Action::L07Action(Model* model, const std::vector<s4u::Host*>& host_list, con
         continue;
 
       double lat = 0.0;
-      std::vector<LinkImpl*> route;
+      std::vector<StandardLinkImpl*> route;
       hostList_[k / host_list.size()]->route_to(hostList_[k % host_list.size()], route, &lat);
       latency = std::max(latency, lat);
 
@@ -200,7 +200,7 @@ L07Action::L07Action(Model* model, const std::vector<s4u::Host*>& host_list, con
     for (size_t k = 0; k < host_list.size() * host_list.size(); k++) {
       if (bytes_amount[k] <= 0.0)
         continue;
-      std::vector<LinkImpl*> route;
+      std::vector<StandardLinkImpl*> route;
       hostList_[k / host_list.size()]->route_to(hostList_[k % host_list.size()], route, nullptr);
 
       for (auto const& link : route)
@@ -234,7 +234,7 @@ CpuImpl* CpuL07Model::create_cpu(s4u::Host* host, const std::vector<double>& spe
   return (new CpuL07(host, speed_per_pstate))->set_model(this);
 }
 
-LinkImpl* NetworkL07Model::create_link(const std::string& name, const std::vector<double>& bandwidths)
+StandardLinkImpl* NetworkL07Model::create_link(const std::string& name, const std::vector<double>& bandwidths)
 {
   xbt_assert(bandwidths.size() == 1, "Non WIFI link must have only 1 bandwidth.");
   auto link = new LinkL07(name, bandwidths[0], get_maxmin_system());
@@ -242,7 +242,7 @@ LinkImpl* NetworkL07Model::create_link(const std::string& name, const std::vecto
   return link;
 }
 
-LinkImpl* NetworkL07Model::create_wifi_link(const std::string& name, const std::vector<double>& bandwidths)
+StandardLinkImpl* NetworkL07Model::create_wifi_link(const std::string& name, const std::vector<double>& bandwidths)
 {
   THROW_UNIMPLEMENTED;
 }
@@ -290,7 +290,7 @@ void CpuL07::on_speed_change()
   CpuImpl::on_speed_change();
 }
 
-LinkL07::LinkL07(const std::string& name, double bandwidth, lmm::System* system) : LinkImpl(name)
+LinkL07::LinkL07(const std::string& name, double bandwidth, lmm::System* system) : StandardLinkImpl(name)
 {
   this->set_constraint(system->constraint_new(this, bandwidth));
   bandwidth_.peak = bandwidth;
@@ -344,7 +344,7 @@ void LinkL07::apply_event(profile::Event* triggered, double value)
 void LinkL07::set_bandwidth(double value)
 {
   bandwidth_.peak = value;
-  LinkImpl::on_bandwidth_change();
+  StandardLinkImpl::on_bandwidth_change();
 
   get_model()->get_maxmin_system()->update_constraint_bound(get_constraint(), bandwidth_.peak * bandwidth_.scale);
 }
@@ -389,7 +389,7 @@ double L07Action::calculateNetworkBound()
     for (size_t j = 0; j < host_count; j++) {
       if (communicationAmount_[i * host_count + j] > 0) {
         double lat = 0.0;
-        std::vector<LinkImpl*> route;
+        std::vector<StandardLinkImpl*> route;
         hostList_.at(i)->route_to(hostList_.at(j), route, &lat);
 
         lat_current = std::max(lat_current, lat * communicationAmount_[i * host_count + j]);
index 7e39862..b663958 100644 (file)
@@ -65,8 +65,8 @@ public:
   NetworkL07Model(const NetworkL07Model&) = delete;
   NetworkL07Model& operator=(const NetworkL07Model&) = delete;
   ~NetworkL07Model() override;
-  LinkImpl* create_link(const std::string& name, const std::vector<double>& bandwidths) final;
-  LinkImpl* create_wifi_link(const std::string& name, const std::vector<double>& bandwidths) override;
+  StandardLinkImpl* create_link(const std::string& name, const std::vector<double>& bandwidths) final;
+  StandardLinkImpl* create_wifi_link(const std::string& name, const std::vector<double>& bandwidths) override;
 
   Action* communicate(s4u::Host* src, s4u::Host* dst, double size, double rate) override;
   void update_actions_state(double /*now*/, double /*delta*/) override{
@@ -101,7 +101,7 @@ protected:
   void on_speed_change() override;
 };
 
-class LinkL07 : public LinkImpl {
+class LinkL07 : public StandardLinkImpl {
 public:
   LinkL07(const std::string& name, double bandwidth, lmm::System* system);
   LinkL07(const LinkL07&) = delete;
index a7b5c95..526815a 100644 (file)
@@ -6,7 +6,7 @@
 #include <simgrid/s4u/Engine.hpp>
 
 #include "src/kernel/resource/CpuImpl.hpp"
-#include "src/surf/network_interface.hpp"
+#include "src/kernel/resource/LinkImpl.hpp"
 #include "src/surf/surf_interface.hpp"
 #include "src/surf/xml/platf.hpp"
 #include "src/surf/xml/platf_private.hpp"
index aabf032..e6608e8 100644 (file)
@@ -10,9 +10,9 @@
 #include <xbt/parse_units.hpp>
 
 #include "simgrid/sg_config.hpp"
+#include "src/kernel/resource/LinkImpl.hpp"
 #include "src/kernel/resource/profile/FutureEvtSet.hpp"
 #include "src/kernel/resource/profile/Profile.hpp"
-#include "src/surf/network_interface.hpp"
 #include "src/surf/surf_interface.hpp"
 #include "src/surf/xml/platf.hpp"
 #include "src/surf/xml/platf_private.hpp"
index 04f093a..814cca6 100644 (file)
@@ -7,7 +7,7 @@
 #include "xbt/config.hpp"
 #include "xbt/log.h"
 
-#include "src/surf/network_interface.hpp"
+#include "src/kernel/resource/WifiLinkImpl.hpp"
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(simulator, "[usage] wifi_usage <platform-file>");
 
index 8abfa03..ea39344 100644 (file)
@@ -7,7 +7,7 @@
 #include "xbt/config.hpp"
 #include "xbt/log.h"
 
-#include "src/surf/network_wifi.hpp"
+#include "src/kernel/resource/WifiLinkImpl.hpp"
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(simulator, "[usage] wifi_usage <platform-file>");
 
@@ -77,7 +77,7 @@ void run_ping_test(const char* src, const char* dest, int data_size)
   });
   simgrid::s4u::Actor::create("receiver", simgrid::s4u::Host::by_name(dest),
                               [mailbox]() { mailbox->get<std::string>(); });
-  auto* l = (simgrid::kernel::resource::NetworkWifiLink*)simgrid::s4u::Link::by_name("AP1")->get_impl();
+  auto* l = (simgrid::kernel::resource::WifiLinkImpl*)simgrid::s4u::Link::by_name("AP1")->get_impl();
   if (not l->toggle_decay_model())
     l->toggle_decay_model();
   l->set_host_rate(simgrid::s4u::Host::by_name("Station 1"), 0);
index 2ab089a..85c2aa3 100644 (file)
@@ -9,7 +9,7 @@
 #include "simgrid/s4u/Engine.hpp"
 #include "simgrid/s4u/Host.hpp"
 #include "simgrid/s4u/Link.hpp"
-#include "src/surf/network_interface.hpp"
+#include "src/kernel/resource/StandardLinkImpl.hpp"
 
 #include <algorithm>
 #include <cstring>
@@ -119,7 +119,7 @@ static void dump_routes()
   for (auto src_host : hosts) { // Routes from host
     const simgrid::kernel::routing::NetPoint* src = src_host->get_netpoint();
     for (auto dst_host : hosts) { // Routes to host
-      std::vector<simgrid::kernel::resource::LinkImpl*> route;
+      std::vector<simgrid::kernel::resource::StandardLinkImpl*> route;
       const simgrid::kernel::routing::NetPoint* dst = dst_host->get_netpoint();
       simgrid::kernel::routing::NetZoneImpl::get_global_route(src, dst, route, nullptr);
       if (route.empty())
@@ -134,7 +134,7 @@ static void dump_routes()
       if (not dst->is_router())
         continue;
       std::printf("  <route src=\"%s\" dst=\"%s\">\n  ", src_host->get_cname(), dst->get_cname());
-      std::vector<simgrid::kernel::resource::LinkImpl*> route;
+      std::vector<simgrid::kernel::resource::StandardLinkImpl*> route;
       simgrid::kernel::routing::NetZoneImpl::get_global_route(src, dst, route, nullptr);
       for (auto const& link : route)
         std::printf("<link_ctn id=\"%s\"/>", link->get_cname());
@@ -148,7 +148,7 @@ static void dump_routes()
     for (auto const& value2 : netpoints) { // to router
       if (not value2->is_router())
         continue;
-      std::vector<simgrid::kernel::resource::LinkImpl*> route;
+      std::vector<simgrid::kernel::resource::StandardLinkImpl*> route;
       simgrid::kernel::routing::NetZoneImpl::get_global_route(value1, value2, route, nullptr);
       if (route.empty())
         continue;
@@ -159,7 +159,7 @@ static void dump_routes()
     }
     for (auto dst_host : hosts) { // Routes to host
       std::printf("  <route src=\"%s\" dst=\"%s\">\n  ", value1->get_cname(), dst_host->get_cname());
-      std::vector<simgrid::kernel::resource::LinkImpl*> route;
+      std::vector<simgrid::kernel::resource::StandardLinkImpl*> route;
       const simgrid::kernel::routing::NetPoint* netcardDst = dst_host->get_netpoint();
       simgrid::kernel::routing::NetZoneImpl::get_global_route(value1, netcardDst, route, nullptr);
       for (auto const& link : route)
index 32f8006..30b6639 100644 (file)
@@ -11,7 +11,7 @@
 #include "simgrid/zone.h"
 #include "src/kernel/EngineImpl.hpp"
 #include "src/kernel/resource/CpuImpl.hpp"
-#include "src/surf/network_interface.hpp"
+#include "src/kernel/resource/LinkImpl.hpp"
 #include "xbt/config.hpp"
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(surf_test, "Messages specific for surf example");
index 846a2d7..74bdf88 100644 (file)
@@ -11,7 +11,7 @@
 #include "simgrid/zone.h"
 #include "src/kernel/EngineImpl.hpp"
 #include "src/kernel/resource/CpuImpl.hpp"
-#include "src/surf/network_interface.hpp"
+#include "src/kernel/resource/LinkImpl.hpp"
 #include "src/surf/surf_interface.hpp"
 #include "xbt/config.hpp"
 
index 26965c6..caf746e 100644 (file)
@@ -12,6 +12,10 @@ set(EXTRA_DIST
   src/include/xbt/xbt_modinter.h
   src/include/catch.hpp
   src/include/xxhash.hpp
+  src/kernel/resource/LinkImpl.hpp
+  src/kernel/resource/SplitDuplexLinkImpl.hpp
+  src/kernel/resource/StandardLinkImpl.hpp
+  src/kernel/resource/WifiLinkImpl.hpp
   src/mc/mc_mmu.hpp
   src/mc/mc_record.hpp
   src/msg/msg_private.hpp
@@ -36,14 +40,9 @@ set(EXTRA_DIST
   src/surf/cpu_ti.hpp
   src/surf/network_cm02.hpp
   src/surf/network_constant.hpp
-  src/surf/network_interface.hpp
-  src/surf/LinkImpl.hpp
-  src/surf/LinkImplIntf.hpp
-  src/surf/SplitDuplexLinkImpl.hpp
   src/surf/network_ns3.hpp
   src/surf/network_smpi.hpp
   src/surf/network_ib.hpp
-  src/surf/network_wifi.hpp
   src/surf/ns3/ns3_simulator.hpp
   src/surf/xml/simgrid.dtd
   src/surf/xml/simgrid_dtd.h
@@ -312,8 +311,12 @@ set(SURF_SRC
   src/kernel/resource/DiskImpl.hpp
   src/kernel/resource/Model.cpp
   src/kernel/resource/Resource.hpp
+  src/kernel/resource/LinkImpl.cpp
+  src/kernel/resource/SplitDuplexLinkImpl.cpp
+  src/kernel/resource/StandardLinkImpl.cpp
   src/kernel/resource/VirtualMachineImpl.hpp
   src/kernel/resource/VirtualMachineImpl.cpp
+  src/kernel/resource/WifiLinkImpl.cpp
 
   src/kernel/resource/profile/DatedValue.cpp
   src/kernel/resource/profile/DatedValue.hpp
@@ -351,10 +354,6 @@ set(SURF_SRC
   src/surf/disk_s19.cpp
   src/surf/network_cm02.cpp
   src/surf/network_constant.cpp
-  src/surf/network_interface.cpp
-  src/surf/LinkImpl.cpp
-  src/surf/SplitDuplexLinkImpl.cpp
-  src/surf/network_wifi.cpp
   src/surf/sg_platf.cpp
   src/surf/surf_interface.cpp
   src/surf/xml/platf.hpp
index c785782..a7a6558 100644 (file)
@@ -124,6 +124,7 @@ ENDIF()
 # New tests should use the Catch Framework
 set(UNIT_TESTS  src/xbt/unit-tests_main.cpp
                 src/kernel/resource/NetworkModelIntf_test.cpp
+                src/kernel/resource/SplitDuplexLinkImpl_test.cpp
                 src/kernel/resource/profile/Profile_test.cpp
                 src/kernel/routing/DijkstraZone_test.cpp
                 src/kernel/routing/DragonflyZone_test.cpp
@@ -132,7 +133,6 @@ set(UNIT_TESTS  src/xbt/unit-tests_main.cpp
                 src/kernel/routing/FullZone_test.cpp
                 src/kernel/routing/StarZone_test.cpp
                 src/kernel/routing/TorusZone_test.cpp
-                src/surf/SplitDuplexLinkImpl_test.cpp
                 src/xbt/config_test.cpp
                 src/xbt/dict_test.cpp
                 src/xbt/dynar_test.cpp