Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
remove Link::on_communicate (use CommImpl::on_start instead)
authorSUTER Frederic <frederic.suter@cc.in2p3.fr>
Thu, 21 Oct 2021 13:49:12 +0000 (15:49 +0200)
committerSUTER Frederic <frederic.suter@cc.in2p3.fr>
Thu, 21 Oct 2021 13:49:12 +0000 (15:49 +0200)
docs/source/Plugins.rst
docs/source/app_s4u.rst
include/simgrid/s4u/Link.hpp
src/s4u/s4u_Link.cpp
src/surf/network_cm02.cpp
src/surf/network_constant.cpp
src/surf/network_ns3.cpp

index 2530e77..a128573 100644 (file)
@@ -98,7 +98,6 @@ Partial list of existing signals in s4u:
   :cpp:member:`Link::on_destruction <simgrid::s4u::Link::on_destruction>`
   :cpp:member:`Link::on_state_change <simgrid::s4u::Link::on_state_change>`
   :cpp:member:`Link::on_speed_change <simgrid::s4u::Link::on_bandwidth_change>`
-  :cpp:member:`Link::on_communicate <simgrid::s4u::Link::on_communicate>`
   :cpp:member:`Link::on_communication_state_change <simgrid::s4u::Link::on_communication_state_change>`
 - :cpp:member:`NetZone::on_creation <simgrid::s4u::NetZone::on_creation>`
   :cpp:member:`NetZone::on_seal <simgrid::s4u::NetZone::on_seal>`
index b8b7849..a28efe8 100644 (file)
@@ -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
index 8e144d9..5d89a0b 100644 (file)
@@ -147,9 +147,6 @@ public:
   /** @brief Callback signal fired when the bandwidth of a Link changes */
   static xbt::signal<void(Link const&)> on_bandwidth_change;
 
-  /** @brief Callback signal fired when a communication starts */
-  static xbt::signal<void(kernel::resource::NetworkAction&)> on_communicate;
-
   /** @brief Callback signal fired when a communication changes it state (ready/done/cancel) */
   static xbt::signal<void(kernel::resource::NetworkAction&, kernel::resource::Action::State)>
       on_communication_state_change;
index 63b1dac..8391962 100644 (file)
@@ -24,7 +24,6 @@ xbt::signal<void(Link&)> Link::on_creation;
 xbt::signal<void(Link const&)> Link::on_destruction;
 xbt::signal<void(Link const&)> Link::on_state_change;
 xbt::signal<void(Link const&)> Link::on_bandwidth_change;
-xbt::signal<void(kernel::resource::NetworkAction&)> Link::on_communicate;
 xbt::signal<void(kernel::resource::NetworkAction&, kernel::resource::Action::State)>
     Link::on_communication_state_change;
 
index 753f2a6..817f809 100644 (file)
@@ -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;
 }
 
index fa25c66..b786a20 100644 (file)
@@ -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));
 }
 
 /**********
index c339b66..4ff24be 100644 (file)
@@ -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()