Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add levels to lib host_lib, link_lib and as_router_lib
[simgrid.git] / src / include / surf / surf.h
index 1281eb6..a1a2837 100644 (file)
 #include "portable.h"
 #include "xbt/config.h"
 #include "surf/datatypes.h"
+#include "xbt/lib.h"
+
+xbt_lib_t host_lib;
+int ROUTING_HOST_LEVEL; //Routing level
+int    SURF_CPU_LEVEL;         //Surf cpu level
+int SURF_WKS_LEVEL;            //Surf workstation level
+int SIMIX_HOST_LEVEL;  //Simix level
+int    MSG_HOST_LEVEL;         //Msg level
+int    SD_HOST_LEVEL;          //Simdag level
+int    COORD_HOST_LEVEL;       //Coordinates level
+
+xbt_lib_t link_lib;
+int SD_LINK_LEVEL;             //Simdag level
+int SURF_LINK_LEVEL;   //Surf level
+
+xbt_lib_t as_router_lib;
+int ROUTING_ASR_LEVEL; //Routing level
+int COORD_ASR_LEVEL;   //Coordinates level
 
 SG_BEGIN_DECL()
 /* Actions and models are highly connected structures... */
@@ -762,6 +780,32 @@ XBT_PUBLIC(void) surf_add_host_traces(void);
 XBT_PUBLIC(void) surf_add_link_traces(void);
 XBT_PUBLIC(void) surf_wsL07_add_traces(void);
 
+/*
+ * init AS from lua console
+ * see surf_routing.c
+ */
+XBT_PUBLIC(void) routing_AS_init(const char *id, const char *mode);
+XBT_PUBLIC(void) routing_AS_end(const char *id);
+// add host to network element list
+XBT_PUBLIC(void) routing_add_host(const char *host_id);
+//Set a new link on the actual list of link for a route or ASroute
+XBT_PUBLIC(void) routing_add_link(const char *link_id);
+//Set the endpoints for a route
+XBT_PUBLIC(void) routing_set_route(const char *src_id, const char *dst_id);
+//Store the route
+XBT_PUBLIC(void) routing_store_route(void);
+
+/*
+ * interface between surf and lua bindings
+ * see surfxml_parse.c
+ */
+XBT_PUBLIC(void) surf_AS_new(const char *id, const char *mode);
+XBT_PUBLIC(void) surf_AS_finalize(const char *id);
+XBT_PUBLIC(void) surf_route_add_host(const char *id);
+XBT_PUBLIC(void) surf_routing_add_route(const char *src_id,
+                                        const char *dest_id,
+                                        xbt_dynar_t links_id);
+
 #include "surf/surf_resource.h"
 #include "surf/surf_resource_lmm.h"