Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
No vm when ptask on
[simgrid.git] / src / surf / surf_routing_vivaldi.hpp
1 #include "surf_routing_generic.hpp"
2 #include "network.hpp"
3
4 #ifndef SURF_ROUTING_VIVALDI_HPP_
5 #define SURF_ROUTING_VIVALDI_HPP_
6
7 /* ************************************************** */
8 /* **************  Vivaldi ROUTING   **************** */
9 AS_t model_vivaldi_create(void);      /* create structures for vivaldi routing model */
10 #define HOST_PEER(peername) bprintf("peer_%s", peername)
11 #define ROUTER_PEER(peername) bprintf("router_%s", peername)
12 #define LINK_PEER(peername) bprintf("link_%s", peername)
13
14 /***********
15  * Classes *
16  ***********/
17 class AsVivaldi;
18 typedef AsVivaldi *AsVivaldiPtr;
19
20 class AsVivaldi: public AsGeneric {
21 public:
22   sg_platf_route_cbarg_t *p_routingTable;
23
24   AsVivaldi() : AsGeneric() {};
25   ~AsVivaldi() {};
26
27   void getRouteAndLatency(RoutingEdgePtr src, RoutingEdgePtr dst, sg_platf_route_cbarg_t into, double *latency);
28   //void getGraph(xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges);
29   //sg_platf_route_cbarg_t getBypassRoute(RoutingEdgePtr src, RoutingEdgePtr dst, double *lat);
30
31   /* The parser calls the following functions to inform the routing models
32    * that a new element is added to the AS currently built.
33    *
34    * Of course, only the routing model of this AS is informed, not every ones */
35   int parsePU(RoutingEdgePtr elm); /* A host or a router, whatever */
36   //virtual int parseAS( RoutingEdgePtr elm)=0;
37
38   //virtual void parseBypassroute(sg_platf_route_cbarg_t e_route)=0;
39 };
40
41
42 #endif /* SURF_ROUTING_VIVALDI_HPP_ */