From: SUTER Frederic Date: Thu, 21 Oct 2021 13:49:12 +0000 (+0200) Subject: remove Link::on_communicate (use CommImpl::on_start instead) X-Git-Tag: v3.30~319 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/a538238bad76a1c2cfa458b67e3cb7f0ece9ae8d remove Link::on_communicate (use CommImpl::on_start instead) --- diff --git a/docs/source/Plugins.rst b/docs/source/Plugins.rst index 2530e77f5f..a1285739c8 100644 --- a/docs/source/Plugins.rst +++ b/docs/source/Plugins.rst @@ -98,7 +98,6 @@ Partial list of existing signals in s4u: :cpp:member:`Link::on_destruction ` :cpp:member:`Link::on_state_change ` :cpp:member:`Link::on_speed_change ` - :cpp:member:`Link::on_communicate ` :cpp:member:`Link::on_communication_state_change ` - :cpp:member:`NetZone::on_creation ` :cpp:member:`NetZone::on_seal ` diff --git a/docs/source/app_s4u.rst b/docs/source/app_s4u.rst index b8b784978b..a28efe8941 100644 --- a/docs/source/app_s4u.rst +++ b/docs/source/app_s4u.rst @@ -1579,7 +1579,6 @@ Signals .. group-tab:: C++ .. doxygenvariable:: simgrid::s4u::Link::on_bandwidth_change - .. doxygenvariable:: simgrid::s4u::Link::on_communicate .. doxygenvariable:: simgrid::s4u::Link::on_communication_state_change .. doxygenvariable:: simgrid::s4u::Link::on_creation .. doxygenvariable:: simgrid::s4u::Link::on_destruction diff --git a/include/simgrid/s4u/Link.hpp b/include/simgrid/s4u/Link.hpp index 8e144d917f..5d89a0b3c5 100644 --- a/include/simgrid/s4u/Link.hpp +++ b/include/simgrid/s4u/Link.hpp @@ -147,9 +147,6 @@ public: /** @brief Callback signal fired when the bandwidth of a Link changes */ static xbt::signal on_bandwidth_change; - /** @brief Callback signal fired when a communication starts */ - static xbt::signal on_communicate; - /** @brief Callback signal fired when a communication changes it state (ready/done/cancel) */ static xbt::signal on_communication_state_change; diff --git a/src/s4u/s4u_Link.cpp b/src/s4u/s4u_Link.cpp index 63b1dac35b..83919625a3 100644 --- a/src/s4u/s4u_Link.cpp +++ b/src/s4u/s4u_Link.cpp @@ -24,7 +24,6 @@ xbt::signal Link::on_creation; xbt::signal Link::on_destruction; xbt::signal Link::on_state_change; xbt::signal Link::on_bandwidth_change; -xbt::signal Link::on_communicate; xbt::signal Link::on_communication_state_change; diff --git a/src/surf/network_cm02.cpp b/src/surf/network_cm02.cpp index 753f2a62fc..817f809b84 100644 --- a/src/surf/network_cm02.cpp +++ b/src/surf/network_cm02.cpp @@ -438,7 +438,6 @@ Action* NetworkCm02Model::communicate(s4u::Host* src, s4u::Host* dst, double siz comm_action_expand_constraints(src, dst, action, route, back_route); XBT_OUT(); - simgrid::s4u::Link::on_communicate(*action); return action; } diff --git a/src/surf/network_constant.cpp b/src/surf/network_constant.cpp index fa25c6678e..b786a20b97 100644 --- a/src/surf/network_constant.cpp +++ b/src/surf/network_constant.cpp @@ -75,10 +75,7 @@ void NetworkConstantModel::update_actions_state(double /*now*/, double delta) Action* NetworkConstantModel::communicate(s4u::Host* src, s4u::Host* dst, double size, double /*rate*/) { - auto* action = new NetworkConstantAction(this, *src, *dst, size); - - s4u::Link::on_communicate(*action); - return action; + return (new NetworkConstantAction(this, *src, *dst, size)); } /********** diff --git a/src/surf/network_ns3.cpp b/src/surf/network_ns3.cpp index c339b66e1a..4ff24bea16 100644 --- a/src/surf/network_ns3.cpp +++ b/src/surf/network_ns3.cpp @@ -542,8 +542,6 @@ NetworkNS3Action::NetworkNS3Action(Model* model, double totalBytes, s4u::Host* s port_number = 1 + (port_number % UINT16_MAX); if (port_number == 1) XBT_WARN("Too many connections! Port number is saturated. Trying to use the oldest ports."); - - s4u::Link::on_communicate(*this); } void NetworkNS3Action::suspend()