Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Define const get_sharing_policy().
[simgrid.git] / src / surf / network_wifi.hpp
index 509db17..c5111e4 100644 (file)
@@ -25,20 +25,20 @@ class NetworkWifiLink : public LinkImpl {
   /** @brief Hold every rates association between host and links (host name, rates id) */
   std::map<xbt::string, int> host_rates_;
 
-  /** @brief A link can have several bandwith attach to it (mostly use by wifi model) */
+  /** @brief A link can have several bandwidths attached to it (mostly use by wifi model) */
   std::vector<Metric> bandwidths_;
 
   /** @brief Should we use the decay model ? */
   bool use_decay_model_=false;
-  /** @brief Wifi ns-3 802.11n average bit rate */
-  const double wifi_max_rate_=54*1e6 / 8;
-  /** @brief ns-3 802.11n minimum bit rate */
-  const double wifi_min_rate_=41.70837*1e6 / 8;
-  /** @brief Decay model calibration */
+  /** @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;
-  /** @brief Decay model calibration: bitrate when using model_n_ stations */
+  /** @brief Bit rate observed on ns3 at the reference point used for rescaling */
   const double model_rate_=42.61438*1e6 / 8;
-  /** @brief Decay model bandwidths */
+  /** @brief The bandwidth to use for each SNR level, corrected with the decay rescale mechanism */
   std::vector<Metric> decay_bandwidths_;
 
 public:
@@ -49,12 +49,13 @@ public:
   /** @brief Get the AP rate associated to the host (or -1 if not associated to the AP) */
   double get_host_rate(const s4u::Host* host);
 
-  s4u::Link::SharingPolicy get_sharing_policy() override;
+  s4u::Link::SharingPolicy get_sharing_policy() const override;
   void apply_event(kernel::profile::Event*, double) override { THROW_UNIMPLEMENTED; }
   void set_bandwidth(double) override { THROW_UNIMPLEMENTED; }
   void set_latency(double) override { THROW_UNIMPLEMENTED; }
   void refresh_decay_bandwidths();
   bool toggle_decay_model();
+  int get_host_count();
 };
 
 class NetworkWifiAction : public NetworkCm02Action {