the task is completed) */
double remains; /**< How much of that cost remains to
* be done in the currently running task */
+#ifdef HAVE_LATENCY_BOUND_TRACKING
int latency_limited; /**< Set to 1 if is limited by latency, 0 otherwise */
+#endif
double start; /**< start time */
double finish; /**< finish time : this is modified during the run
/***************************/
/* Generic model object */
/***************************/
-// typedef struct s_routing s_routing_t, *routing_t; // COMMENT BY DAVID
-//XBT_PUBLIC_DATA(routing_t) used_routing; // COMMENT BY DAVID
-
- typedef struct s_routing_global s_routing_global_t, *routing_global_t; // ADDED BY DAVID
-XBT_PUBLIC_DATA(routing_global_t) global_routing; // ADDED BY DAVID
+ typedef struct s_routing_global s_routing_global_t, *routing_global_t;
+XBT_PUBLIC_DATA(routing_global_t) global_routing;
/** \brief Private data available on all models
*/
typedef struct surf_network_model_extension_public {
surf_action_t(*communicate) (const char *src_name,
- const char *dst_name, int src, int dst,
+ const char *dst_name,
double size, double rate);
- xbt_dynar_t(*get_route) (int src, int dst);
+ xbt_dynar_t(*get_route) (const char *src_name, const char *dst_name);
double (*get_link_bandwidth) (const void *link);
double (*get_link_latency) (const void *link);
int (*link_shared) (const void *link);
void (*set_max_duration) (surf_action_t action, double duration);/**< Set the max duration of an action*/
void (*set_priority) (surf_action_t action, double priority);/**< Set the priority of an action */
double (*get_remains) (surf_action_t action);/**< Get the remains of an action */
+#ifdef HAVE_LATENCY_BOUND_TRACKING
int (*get_latency_limited) (surf_action_t action);/**< Return 1 if action is limited by latency, 0 otherwise */
+#endif
xbt_dict_t resource_set;
*
* see surf_routing.c && surfxml_parse.c
*/
-XBT_PUBLIC(void) surf_route_set_resource(char* src_id,char *dest_id,xbt_dynar_t links_id,int action);
+
XBT_PUBLIC(void) surf_set_routes(void);
-/**
- * add host to routing model ( xbt_dict )
- *
- */
-XBT_PUBLIC(void) surf_route_add_host(char * host_id);
+
/**
* add traces
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"