X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/81d7cef8216e2de0c091d47b34c404047fa8f183..3be0396ca83e510e42adc8e3eb12f4befb2f1fff:/src/kernel/resource/NetworkModel.hpp diff --git a/src/kernel/resource/NetworkModel.hpp b/src/kernel/resource/NetworkModel.hpp index bfe6aa3201..e507e0f1bb 100644 --- a/src/kernel/resource/NetworkModel.hpp +++ b/src/kernel/resource/NetworkModel.hpp @@ -7,14 +7,12 @@ #define SIMGRID_KERNEL_RESOURCE_NETWORKMODEL_HPP #include "simgrid/kernel/resource/Model.hpp" -#include "simgrid/kernel/resource/NetworkModelIntf.hpp" +#include "src/kernel/resource/NetworkModelFactors.hpp" #include "src/kernel/resource/StandardLinkImpl.hpp" #include -namespace simgrid { -namespace kernel { -namespace resource { +namespace simgrid::kernel::resource { /********* * Model * @@ -24,10 +22,11 @@ namespace resource { * @brief SURF network model interface class * @details A model is an object which handles the interactions between its Resources and its Actions */ -class NetworkModel : public Model, public NetworkModelIntf { +class NetworkModel : public Model, public NetworkModelFactors { public: static config::Flag cfg_tcp_gamma; static config::Flag cfg_crosstraffic; + static config::Flag cfg_weight_S_parameter; using Model::Model; NetworkModel(const NetworkModel&) = delete; @@ -54,35 +53,10 @@ public: * @param rate Allows to limit the transfer rate. Negative value means unlimited. * @return The action representing the communication */ - virtual Action* communicate(s4u::Host* src, s4u::Host* dst, double size, double rate) = 0; - - /** - * @brief Get the right multiplicative factor for the latency. - * @details Depending on the model, the effective latency when sending a message might be different from the - * theoretical latency of the link, in function of the message size. In order to account for this, this function gets - * this factor. - * - * @param size The size of the message. - * @return The latency factor. - */ - virtual double get_latency_factor(double /* size */) { return sg_latency_factor; } - - /** - * @brief Get the right multiplicative factor for the bandwidth. - * @details Depending on the model, the effective bandwidth when sending a message might be different from the - * theoretical bandwidth of the link, in function of the message size. In order to account for this, this function - * gets this factor. - * - * @param size The size of the message. - * @return The bandwidth factor. - */ - virtual double get_bandwidth_factor(double /* size*/) { return sg_bandwidth_factor; } + virtual Action* communicate(s4u::Host* src, s4u::Host* dst, double size, double rate, bool streamed) = 0; double next_occurring_event_full(double now) override; - void set_lat_factor_cb(const std::function& cb) override { THROW_UNIMPLEMENTED; } - void set_bw_factor_cb(const std::function& cb) override { THROW_UNIMPLEMENTED; } - std::unique_ptr loopback_; }; @@ -140,8 +114,6 @@ void add_link_latency(std::vector& result, const std::vector< void insert_link_latency(std::vector& result, const std::vector& links, double* latency); -} // namespace resource -} // namespace kernel -} // namespace simgrid +} // namespace simgrid::kernel::resource #endif /* SIMGRID_KERNEL_RESOURCE_NETWORKMODEL_HPP */