Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
one more class in platform creation
[simgrid.git] / src / kernel / routing / VivaldiZone.hpp
index 2c84ac7..794fe7a 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2016. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2013-2017. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -30,33 +30,33 @@ namespace routing {
  *
  *  So, to go from an host A to an host B, the following links would be used:
  *  <tt>private(A)_UP, private(B)_DOWN</tt>, with the additional latency computed above.
+ *  The bandwidth of the UP and DOWN links is not symmetric (in contrary to usual SimGrid
+ *  links), but naturally correspond to the values provided when the peer was created.
+ *  More information in the relevant section of the XML reference guide: @ref pf_peer.
+ *
+ *  You can find some Coordinate-based platforms from the OptorSim project, as well as a
+ *  script to turn them into SimGrid platforms in examples/platforms/syscoord.
  *
  *  Such Network Coordinate systems were shown to provide rather good latency estimations
  *  in a compact way. Other systems, such as
  *  <a href="https://en.wikipedia.org/wiki/Phoenix_network_coordinates"Phoenix network coordinates</a>
  *  were shown superior to the Vivaldi system and could be also implemented in SimGrid.
- *
- *
- *  @todo: the third dimension of the coordinates could be dropped and integrated in the peer private links.
- *
- *  @todo: we should provide a script to compute the coordinates from a matrix of latency measurements,
- *  according to the corresponding publications.
  */
 
 class XBT_PRIVATE VivaldiZone : public ClusterZone {
 public:
-  explicit VivaldiZone(NetZone* father, const char* name);
+  explicit VivaldiZone(NetZone* father, std::string name);
 
-  void setPeerLink(NetCard* netcard, double bw_in, double bw_out, double lat, const char* coord);
-  void getLocalRoute(NetCard* src, NetCard* dst, sg_platf_route_cbarg_t into, double* latency) override;
+  void setPeerLink(NetPoint* netpoint, double bw_in, double bw_out, std::string coord);
+  void getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override;
 };
 
 namespace vivaldi {
 class XBT_PRIVATE Coords {
 public:
-  static simgrid::xbt::Extension<NetCard, Coords> EXTENSION_ID;
-  explicit Coords(NetCard* host, const char* str);
-  virtual ~Coords();
+  static simgrid::xbt::Extension<NetPoint, Coords> EXTENSION_ID;
+  explicit Coords(NetPoint* host, std::string str);
+  virtual ~Coords() = default;
 
   std::vector<double> coords;
 };