simgrid::s4u::Link::on_creation(this->piface_);
}
-NetworkCm02Link::NetworkCm02Link(NetworkCm02Model* model, const std::string& name, std::vector<double> bandwidths,
- s4u::Link::SharingPolicy policy, lmm::System* system)
- : NetworkCm02Link(model, name, 0, 0, policy, system)
-{
- /* Setup Metrics for bandwidths_ */
- for (auto bandwidth : bandwidths) {
- bandwidths_.push_back({bandwidth, 1.0, nullptr});
- }
-}
-
void NetworkCm02Link::apply_event(kernel::profile::Event* triggered, double value)
{
/* Find out which of my iterators was triggered, and react accordingly */
public:
NetworkCm02Link(NetworkCm02Model* model, const std::string& name, double bandwidth, double latency,
s4u::Link::SharingPolicy policy, lmm::System* system);
- NetworkCm02Link(NetworkCm02Model* model, const std::string& name, std::vector<double> bandwidths,
- s4u::Link::SharingPolicy policy, lmm::System* system);
virtual ~NetworkCm02Link() = default;
void apply_event(kernel::profile::Event* event, double value) override;
void set_bandwidth(double value) override;
Metric latency_ = {1.0, 0, nullptr};
Metric bandwidth_ = {1.0, 0, nullptr};
- /** @brief A link can have several bandwith attach to it (mostly use by wifi model) */
- std::vector<Metric> bandwidths_;
};
/**********