Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright lines for 2023.
[simgrid.git] / include / simgrid / s4u / NetZone.hpp
index e974320..63a1c23 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2016-2022. The SimGrid Team. All rights reserved.               */
+/* Copyright (c) 2016-2023. 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. */
@@ -14,6 +14,7 @@
 #include <map>
 #include <string>
 #include <unordered_map>
+#include <unordered_set>
 #include <utility>
 #include <vector>
 
@@ -142,7 +143,7 @@ public:
   s4u::SplitDuplexLink* create_split_duplex_link(const std::string& name, const std::string& bandwidth);
   s4u::SplitDuplexLink* create_split_duplex_link(const std::string& name, double bandwidth);
 
-  kernel::resource::NetworkModelIntf* get_network_model() const;
+  kernel::resource::NetworkModel* get_network_model() const;
 
   /**
    * @brief Make a router within that NetZone
@@ -153,6 +154,15 @@ public:
 
   /** @brief Seal this netzone configuration */
   NetZone* seal();
+
+  void
+  set_latency_factor_cb(std::function<double(double size, const s4u::Host* src, const s4u::Host* dst,
+                                             const std::vector<s4u::Link*>& /*links*/,
+                                             const std::unordered_set<s4u::NetZone*>& /*netzones*/)> const& cb) const;
+  void
+  set_bandwidth_factor_cb(std::function<double(double size, const s4u::Host* src, const s4u::Host* dst,
+                                               const std::vector<s4u::Link*>& /*links*/,
+                                               const std::unordered_set<s4u::NetZone*>& /*netzones*/)> const& cb) const;
 };
 
 // External constructors so that the types (and the types of their content) remain hidden