/** @brief Add a "router" to the network element list */
void sg_platf_new_router(sg_platf_router_cbarg_t router)
{
+ using simgrid::routing::AsCluster;
simgrid::routing::AsImpl* current_routing = routing_get_current();
if (current_routing->hierarchy_ == simgrid::routing::AsImpl::RoutingMode::unset)
xbt_lib_set(as_router_lib, router->id, COORD_ASR_LEVEL, (void *) ctn);
}
+ auto cluster = dynamic_cast<AsCluster*>(current_routing);
+ if(cluster != nullptr)
+ cluster->router_ = static_cast<simgrid::routing::NetCard*>(xbt_lib_get_or_null(as_router_lib, router->id, ROUTING_ASR_LEVEL));
+
if (TRACE_is_enabled() && TRACE_needs_platform())
sg_instr_new_router(router);
}
router.id = router_id;
router.coord = peer->coord;
sg_platf_new_router(&router);
- static_cast<AsCluster*>(current_routing)->router_ = static_cast<NetCard*>(xbt_lib_get_or_null(as_router_lib, router.id, ROUTING_ASR_LEVEL));
XBT_DEBUG("</AS>");
sg_platf_new_AS_seal();