std::vector<NetZone*> get_children() const;
std::vector<Host*> get_all_hosts() const;
- int get_host_count() const;
+ size_t get_host_count() const;
kernel::routing::NetZoneImpl* get_impl() const { return pimpl_; }
return s4u::Link::SharingPolicy::WIFI;
}
-int WifiLinkImpl::get_host_count() const
+size_t WifiLinkImpl::get_host_count() const
{
- return static_cast<int>(host_rates_.size());
+ return host_rates_.size();
}
void WifiLinkImpl::refresh_decay_bandwidths()
{
// Compute number of STAtion on the Access Point
- int nSTA = get_host_count();
+ size_t nSTA = get_host_count();
std::vector<Metric> new_bandwidths;
for (auto const& bandwidth : bandwidths_) {
void set_latency(double) override;
void refresh_decay_bandwidths();
bool toggle_decay_model();
- int get_host_count() const;
+ size_t get_host_count() const;
};
class WifiLinkAction : public NetworkCm02Action {
eDyn_ += duration * control_duration_ * wifi_link->get_host_count() * pRx_;
eStat_ += (duration - (duration * control_duration_)) * pIdle_ * (wifi_link->get_host_count() + 1);
- XBT_DEBUG("finish eStat_ += %f * %f * (%d+1) | eStat = %f", duration, pIdle_, wifi_link->get_host_count(), eStat_);
+ XBT_DEBUG("finish eStat_ += %f * %f * (%zu+1) | eStat = %f", duration, pIdle_, wifi_link->get_host_count(), eStat_);
}
void LinkEnergyWifi::update()
if (link_->get_usage() != 0.0) {
eDyn_ += /*duration * */ durUsage * ((wifi_link->get_host_count() * pRx_) + pTx_);
eStat_ += (duration - durUsage) * pIdle_ * (wifi_link->get_host_count() + 1);
- XBT_DEBUG("eDyn += %f * ((%d * %f) + %f) | eDyn = %f (durusage =%f)", durUsage, wifi_link->get_host_count(), pRx_,
+ XBT_DEBUG("eDyn += %f * ((%zu * %f) + %f) | eDyn = %f (durusage =%f)", durUsage, wifi_link->get_host_count(), pRx_,
pTx_, eDyn_, durUsage);
dur_TxRx_ += duration;
} else {
eStat_ += (duration - (duration * control_duration_)) * pIdle_ * (wifi_link->get_host_count() + 1);
}
- XBT_DEBUG("eStat_ += %f * %f * (%d+1) | eStat = %f", duration, pIdle_, wifi_link->get_host_count(), eStat_);
+ XBT_DEBUG("eStat_ += %f * %f * (%zu+1) | eStat = %f", duration, pIdle_, wifi_link->get_host_count(), eStat_);
}
void LinkEnergyWifi::init_watts_range_list()