X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c4c51bdbf0da9491133f9d42f16b11da211b664b..219810d5f28a3f177c7d9341b0fd227cbf651082:/src/surf/network_interface.hpp diff --git a/src/surf/network_interface.hpp b/src/surf/network_interface.hpp index cb59af1720..a46e10b573 100644 --- a/src/surf/network_interface.hpp +++ b/src/surf/network_interface.hpp @@ -35,14 +35,10 @@ namespace simgrid { /** @brief Callback signal fired when the state of a NetworkAction changes - * Signature: `void(NetworkAction *action, e_surf_action_state_t old, e_surf_action_state_t current)` */ - XBT_PUBLIC_DATA(simgrid::xbt::signal) networkActionStateChangedCallbacks; + * Signature: `void(NetworkAction *action, simgrid::surf::Action::State old, simgrid::surf::Action::State current)` */ + XBT_PUBLIC_DATA(simgrid::xbt::signal) networkActionStateChangedCallbacks; - /** @brief Callback signal fired when a NetworkAction is created (when a communication starts) - * Signature: `void(NetworkAction *action, RoutingEdge *src, RoutingEdge *dst, double size, double rate)` */ - XBT_PUBLIC_DATA(simgrid::xbt::signal) networkCommunicateCallbacks; - - } + } } /********* @@ -68,12 +64,9 @@ namespace simgrid { /** @brief Destructor */ ~NetworkModel() { - if (p_maxminSystem) - lmm_system_free(p_maxminSystem); - if (p_actionHeap) - xbt_heap_free(p_actionHeap); - if (p_modifiedSet) - delete p_modifiedSet; + lmm_system_free(maxminSystem_); + xbt_heap_free(actionHeap_); + delete modifiedSet_; } /** @@ -101,8 +94,7 @@ namespace simgrid { * unlimited. * @return The action representing the communication */ - virtual Action *communicate(NetCard *src, NetCard *dst, - double size, double rate)=0; + virtual Action *communicate(NetCard *src, NetCard *dst, double size, double rate)=0; /** @brief Function pointer to the function to use to solve the lmm_system_t * @@ -199,6 +191,11 @@ namespace simgrid { * Signature: `void(Link*)` */ static simgrid::xbt::signal onStateChange; + /** @brief Callback signal fired when a communication starts + * Signature: `void(NetworkAction *action, RoutingEdge *src, RoutingEdge *dst)` */ + static simgrid::xbt::signal onCommunicate; + + /** @brief Get the bandwidth in bytes per second of current Link */ virtual double getBandwidth(); @@ -276,15 +273,15 @@ namespace simgrid { NetworkAction(simgrid::surf::Model *model, double cost, bool failed, lmm_variable_t var) : simgrid::surf::Action(model, cost, failed, var) {}; - void setState(e_surf_action_state_t state); + void setState(simgrid::surf::Action::State state) override; - double m_latency; - double m_latCurrent; - double m_weight; - double m_rate; - const char* p_senderLinkName; - double m_senderSize; - xbt_fifo_item_t p_senderFifoItem; + double latency_; + double latCurrent_; + double weight_; + double rate_; + const char* senderLinkName_; + double senderSize_; + xbt_fifo_item_t senderFifoItem_; }; } }