#include <xbt/base.h>
-#include <boost/unordered_map.hpp>
+#include <unordered_map>
#include "xbt/fifo.h"
#include "xbt/dict.h"
* unlimited.
* @return The action representing the communication
*/
- virtual Action *communicate(routing::NetCard *src, routing::NetCard *dst, double size, double rate)=0;
+ virtual Action* communicate(simgrid::s4u::Host* src, simgrid::s4u::Host* dst, double size, double rate) = 0;
/** @brief Function pointer to the function to use to solve the lmm_system_t
*
* @return The new bandwidth.
*/
virtual double bandwidthConstraint(double rate, double bound, double size);
- double next_occuring_event_full(double now) override;
+ double nextOccuringEventFull(double now) override;
};
/************
public:
/** @brief Callback signal fired when a new Link is created.
* Signature: void(Link*) */
- static simgrid::xbt::signal<void(simgrid::surf::Link*)> onCreation;
+ static simgrid::xbt::signal<void(surf::Link*)> onCreation;
/** @brief Callback signal fired when a Link is destroyed.
* Signature: void(Link*) */
- static simgrid::xbt::signal<void(simgrid::surf::Link*)> onDestruction;
+ static simgrid::xbt::signal<void(surf::Link*)> onDestruction;
/** @brief Callback signal fired when the state of a Link changes (when it is turned on or off)
* Signature: `void(Link*)` */
- static simgrid::xbt::signal<void(simgrid::surf::Link*)> onStateChange;
+ static simgrid::xbt::signal<void(surf::Link*)> onStateChange;
/** @brief Callback signal fired when a communication starts
- * Signature: `void(NetworkAction *action, RoutingEdge *src, RoutingEdge *dst)` */
- static simgrid::xbt::signal<void(simgrid::surf::NetworkAction*, simgrid::routing::NetCard *src, simgrid::routing::NetCard *dst)> onCommunicate;
-
-
+ * Signature: `void(NetworkAction *action, host *src, host *dst)` */
+ static simgrid::xbt::signal<void(surf::NetworkAction*, s4u::Host* src, s4u::Host* dst)> onCommunicate;
/** @brief Get the bandwidth in bytes per second of current Link */
virtual double getBandwidth();
private:
void *userData = nullptr;
- /* List of all links */
+ /* List of all links. FIXME: should move to the Engine */
private:
- static boost::unordered_map<std::string, Link *> *links;
+ static std::unordered_map<std::string, Link *> *links;
public:
static Link *byName(const char* name);
static int linksCount();