Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
nicer API to the Netcard type
[simgrid.git] / src / surf / surf_routing_cluster.cpp
index b5732dc..81848c2 100644 (file)
@@ -5,7 +5,6 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "surf_routing_cluster.hpp"
-#include "surf_routing_private.hpp"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_cluster, surf, "Routing part of surf");
 
@@ -25,7 +24,7 @@ void AsCluster::getRouteAndLatency(NetCard *src, NetCard *dst, sg_platf_route_cb
   XBT_VERB("cluster_get_route_and_latency from '%s'[%d] to '%s'[%d]",
             src->name(), src->id(), dst->name(), dst->id());
 
-  if (src->getRcType() != SURF_NETWORK_ELEMENT_ROUTER) {    // No specific link for router
+  if (! src->isRouter()) {    // No specific link for router
 
     if((src->id() == dst->id()) && has_loopback_  ){
       info = xbt_dynar_get_as(upDownLinks, src->id() * nb_links_per_node_, s_surf_parsing_link_up_down_t);
@@ -57,7 +56,7 @@ void AsCluster::getRouteAndLatency(NetCard *src, NetCard *dst, sg_platf_route_cb
       *lat += backbone_->getLatency();
   }
 
-  if (dst->getRcType() != SURF_NETWORK_ELEMENT_ROUTER) {    // No specific link for router
+  if (! dst->isRouter()) {    // No specific link for router
     info = xbt_dynar_get_as(upDownLinks, dst->id() * nb_links_per_node_ + has_loopback_ + has_limiter_, s_surf_parsing_link_up_down_t);
 
     if (info.link_down) {       // link down
@@ -97,7 +96,7 @@ void AsCluster::getGraph(xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges)
   for (isrc = 0; isrc < table_size; isrc++) {
     src = xbt_dynar_get_as(vertices_, isrc, NetCard*);
 
-    if (src->getRcType() != SURF_NETWORK_ELEMENT_ROUTER) {
+    if (! src->isRouter()) {
       previous = new_xbt_graph_node(graph, src->name(), nodes);
 
       info = xbt_dynar_get_as(upDownLinks, src->id(), s_surf_parsing_link_up_down_t);