Logo AND Algorithmique Numérique Distribuée

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