* @param size The size of the message.
* @return The new bandwidth.
*/
- virtual double get_bandwidth_constraint(double rate, double /*bound*/, double /*size*/) { return rate; }
+ double get_bandwidth_constraint(double rate, double bound, double size) const;
double next_occurring_event_full(double now) override;
- virtual void set_lat_factor_cb(const std::function<NetworkFactorCb>& cb) override { THROW_UNIMPLEMENTED; }
- virtual void set_bw_factor_cb(const std::function<NetworkFactorCb>& cb) override { THROW_UNIMPLEMENTED; }
+ 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;
};
* Profile must contain absolute values */
virtual LinkImpl* set_latency_profile(kernel::profile::Profile* profile);
- Metric latency_ = {0.0, 0, nullptr};
- Metric bandwidth_ = {1.0, 0, nullptr};
+ Metric latency_ = {0.0, 1, nullptr};
+ Metric bandwidth_ = {1.0, 1, nullptr};
};
/**********