/* Hook for the different tags. All the functions which pointer to are push into here are run when the tag is encountered */
XBT_PUBLIC_DATA(xbt_dynar_t) STag_surfxml_platform_cb_list;
XBT_PUBLIC_DATA(xbt_dynar_t) ETag_surfxml_platform_cb_list;
-XBT_PUBLIC_DATA(xbt_dynar_t) ETag_surfxml_host_cb_list;
XBT_PUBLIC_DATA(xbt_dynar_t) ETag_surfxml_router_cb_list;
XBT_PUBLIC_DATA(xbt_dynar_t) STag_surfxml_link_cb_list;
XBT_PUBLIC_DATA(xbt_dynar_t) ETag_surfxml_link_cb_list;
}
}
-static void parse_E_host(void)
-{
- xbt_dict_cursor_t cursor = NULL;
- char *key;
- char *elem;
-
- xbt_dict_foreach(current_property_set, cursor, key, elem) {
- XBT_DEBUG("property : %s = %s",key,elem);
- }
-}
-
/*
* \brief Add a host to the network element list from XML
*/
{
parse_S_host(h->V_host_id, h->V_host_coord);
}
-static void parse_E_host_XML(void)
-{
- parse_E_host();
-}
-
-/*
- * \brief Add a host to the network element list from lua script
- */
-static void parse_S_host_lua(const char *host_id, const char *coord)
-{
- parse_S_host(host_id, coord);
-}
-
/**
* \brief Add a "router" to the network element list
/* parse generic elements */
sg_platf_host_add_cb(parse_S_host_XML);
- surfxml_add_callback(ETag_surfxml_host_cb_list, &parse_E_host_XML);
sg_platf_router_add_cb(parse_S_router);
surfxml_add_callback(STag_surfxml_route_cb_list,
}
surf_parse_link();
- ETag_surfxml_host();
ETag_surfxml_link();
surf_parsing_link_up_down_t info = xbt_new0(s_surf_parsing_link_up_down_t, 1);
}
surf_parse_link();
- ETag_surfxml_host();
ETag_surfxml_link();
surf_parsing_link_up_down_t info = xbt_new0(s_surf_parsing_link_up_down_t, 1);
void routing_add_host(const char *host_id)
{
- parse_S_host_lua((char *) host_id, (char*)""); // FIXME propagate coordinate system to lua
+ parse_S_host(host_id, ""); // FIXME propagate coordinate system to lua
}
/*
xbt_dict_t dict_autonomous_systems;
} s_routing_component_cluster_t, *routing_component_cluster_t;
-/* Parse routing model functions */
-
-static route_extended_t cluster_get_route(routing_component_t rc,
- const char *src,
- const char *dst);
-
/* Business methods */
static route_extended_t cluster_get_route(routing_component_t rc,
const char *src,
- const char *dst)
-{
- xbt_assert(rc && src
- && dst,
- "Invalid params for \"get_route\" function at AS \"%s\"",
- rc->name);
-
+ const char *dst) {
xbt_dynar_t links_list = xbt_dynar_new(global_routing->size_of_link, NULL);
//xbt_dynar_t STag_surfxml_host_cb_list = NULL;
xbt_dynar_t STag_surfxml_platform_cb_list = NULL;
xbt_dynar_t ETag_surfxml_platform_cb_list = NULL;
-xbt_dynar_t ETag_surfxml_host_cb_list = NULL;
xbt_dynar_t ETag_surfxml_router_cb_list = NULL;
xbt_dynar_t STag_surfxml_link_cb_list = NULL;
xbt_dynar_t ETag_surfxml_link_cb_list = NULL;
xbt_dynar_new(sizeof(void_f_void_t), NULL);
sg_platf_init();
- ETag_surfxml_host_cb_list = xbt_dynar_new(sizeof(void_f_void_t), NULL);
ETag_surfxml_router_cb_list = xbt_dynar_new(sizeof(void_f_void_t), NULL);
STag_surfxml_link_cb_list = xbt_dynar_new(sizeof(void_f_void_t), NULL);
ETag_surfxml_link_cb_list = xbt_dynar_new(sizeof(void_f_void_t), NULL);
xbt_dynar_free(&STag_surfxml_platform_cb_list);
xbt_dynar_free(&ETag_surfxml_platform_cb_list);
- xbt_dynar_free(&ETag_surfxml_host_cb_list);
xbt_dynar_free(&ETag_surfxml_router_cb_list);
xbt_dynar_free(&STag_surfxml_link_cb_list);
xbt_dynar_free(&ETag_surfxml_link_cb_list);
host.V_host_coord = A_surfxml_host_coordinates;
sg_platf_new_host(&host);
-}
-void ETag_surfxml_host(void){
+
current_property_set = NULL;
- surfxml_call_cb_functions(ETag_surfxml_host_cb_list);
}
+void ETag_surfxml_host(void){ /* ignored -- do not add content here */ }
void STag_surfxml_router(void){