#include "src/surf/surf_routing_full.hpp"
#include "src/surf/surf_routing_vivaldi.hpp"
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route, surf, "Routing part of surf");
namespace simgrid {
namespace surf {
As::~As()
{
xbt_dict_free(&sons_);
- xbt_dynar_free(&p_indexNetworkElm);
+ xbt_dynar_free(&vertices_);
xbt_dynar_free(&upDownLinks);
xbt_free(name_);
if (netcard_)
delete netcard_;
}
+ sg_platf_route_cbarg_t As::getBypassRoute(NetCard * /*src*/, NetCard * /*dst*/, double * /*lat*/) {
+ return NULL;
+ }
+
+
+ int As::addComponent(NetCard *elm) {
+ XBT_DEBUG("Load component \"%s\"", elm->getName());
+ xbt_dynar_push_as(vertices_, NetCard*, elm);
+ return xbt_dynar_length(vertices_)-1;
+ }
+
+ void As::parseRoute(sg_platf_route_cbarg_t /*route*/){
+ THROW_IMPOSSIBLE; /* No. */
+ }
+ void As::parseASroute(sg_platf_route_cbarg_t /*route*/){
+ THROW_IMPOSSIBLE;
+ }
+ void As::parseBypassroute(sg_platf_route_cbarg_t /*e_route*/){
+ THROW_IMPOSSIBLE;
+ }
+
}} // namespace simgrid::surf
/**
/* Global vars */
simgrid::surf::RoutingPlatf *routing_platf = NULL;
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route, surf, "Routing part of surf");
/** The current AS in the parsing */
static simgrid::surf::As *current_routing = NULL;
xbt_dict_set(current_routing->sons_, AS->id,
(void *) new_as, NULL);
/* add to the father element list */
- netcard->setId(current_routing->parseAS(netcard));
+ netcard->setId(current_routing->addComponent(netcard));
} else {
THROWF(arg_error, 0, "All defined components must belong to a AS");
}
xbt_dynar_t surf_AS_get_hosts(simgrid::surf::As *as)
{
- xbt_dynar_t elms = as->p_indexNetworkElm;
+ xbt_dynar_t elms = as->vertices_;
int count = xbt_dynar_length(elms);
xbt_dynar_t res = xbt_dynar_new(sizeof(sg_host_t), NULL);
for (int index = 0; index < count; index++) {