X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/6aff24ba47ceab30e29e122dc36c33995e6fc2dd..118d3f4ca3b1f74eb632dec688ca5c7dfab7f1ba:/src/surf/network_interface.hpp diff --git a/src/surf/network_interface.hpp b/src/surf/network_interface.hpp index 40fe146e85..c5522a8dcc 100644 --- a/src/surf/network_interface.hpp +++ b/src/surf/network_interface.hpp @@ -60,10 +60,9 @@ namespace simgrid { * @param bandwidth The initial bandwidth of the Link in bytes per second * @param latency The initial latency of the Link in seconds * @param policy The sharing policy of the Link - * @param props Dictionary of properties associated to this Link */ - virtual Link* createLink(const char *name, double bandwidth, double latency, - e_surf_link_sharing_policy_t policy, xbt_dict_t properties)=0; + virtual Link* createLink(const char* name, double bandwidth, double latency, + e_surf_link_sharing_policy_t policy) = 0; /** * @brief Create a communication between two hosts. @@ -120,6 +119,8 @@ namespace simgrid { */ virtual double bandwidthConstraint(double rate, double bound, double size); double nextOccuringEventFull(double now) override; + + Link* loopback_ = nullptr; }; /************ @@ -134,13 +135,11 @@ namespace simgrid { public simgrid::surf::PropertyHolder { public: - /** @brief Constructor of non-LMM links */ - Link(simgrid::surf::NetworkModel *model, const char *name, xbt_dict_t props); /** @brief Constructor of LMM links */ - Link(simgrid::surf::NetworkModel *model, const char *name, xbt_dict_t props, lmm_constraint_t constraint); + Link(simgrid::surf::NetworkModel* model, const char* name, lmm_constraint_t constraint); - /* Link destruction logic */ - /**************************/ + /* Link destruction logic */ + /**************************/ protected: ~Link() override; public: @@ -166,16 +165,16 @@ namespace simgrid { static simgrid::xbt::signal onCommunicate; /** @brief Get the bandwidth in bytes per second of current Link */ - virtual double getBandwidth(); + virtual double bandwidth(); /** @brief Update the bandwidth in bytes per second of current Link */ - virtual void updateBandwidth(double value)=0; + virtual void setBandwidth(double value) = 0; /** @brief Get the latency in seconds of current Link */ - virtual double getLatency(); + virtual double latency(); /** @brief Update the latency in seconds of current Link */ - virtual void updateLatency(double value)=0; + virtual void setLatency(double value) = 0; /** @brief The sharing policy is a @{link e_surf_link_sharing_policy_t::EType} (0: FATPIPE, 1: SHARED, 2: FULLDUPLEX) */ virtual int sharingPolicy(); @@ -190,9 +189,9 @@ namespace simgrid { virtual void setBandwidthTrace(tmgr_trace_t trace); /*< setup the trace file with bandwidth events (peak speed changes due to external load). Trace must contain percentages (value between 0 and 1). */ virtual void setLatencyTrace(tmgr_trace_t trace); /*< setup the trace file with latency events (peak latency changes due to external load). Trace must contain absolute values */ - tmgr_trace_iterator_t m_stateEvent = nullptr; - s_surf_metric_t m_latency = {1.0,0,nullptr}; - s_surf_metric_t m_bandwidth = {1.0,0,nullptr}; + tmgr_trace_iterator_t stateEvent_ = nullptr; + s_surf_metric_t latency_ = {1.0, 0, nullptr}; + s_surf_metric_t bandwidth_ = {1.0, 0, nullptr}; /* User data */ public: