void (*set_priority) (surf_action_t action, double priority); /**< Set the priority of an action */
const char *name; /**< Name of this model */
- /*for the properties of the link*/
- xbt_dict_t (*get_link_properties) (void* link);
-
- /*for the properties of the cpu*/
- xbt_dict_t (*get_cpu_properties) (void* cpu);
+ xbt_dict_t (*get_properties) (void* link); /**< Return the properties dictionary */
} s_surf_model_public_t, *surf_model_public_t;
* \ingroup SURF_models
*/
typedef enum {
- SURF_CPU_ON = 1, /**< Ready */
- SURF_CPU_OFF = 0 /**< Running */
+ SURF_CPU_ON = 1, /**< Up & ready */
+ SURF_CPU_OFF = 0 /**< Down & broken */
} e_surf_cpu_state_t;
/** \brief CPU model extension public
*
* \see workstation_set
*/
-XBT_PUBLIC_DATA(xbt_dict_t) network_link_set;
+XBT_PUBLIC_DATA(xbt_dict_t) link_set;
/** \brief The workstations
* \ingroup SURF_models
*
* This dict contains all workstations.
*
- * \see network_link_set
+ * \see link_set
*/
XBT_PUBLIC_DATA(xbt_dict_t) workstation_set;
XBT_PUBLIC(void) surf_exit(void);
/* Prototypes of the functions that handle the properties */
+XBT_PUBLIC_DATA(xbt_dict_t) current_property_set; /* the prop set for the currently parsed element (also used in SIMIX) */
void parse_properties(void);
void free_string(void*);
-/*Add callback lists*/
-xbt_dynar_t STag_surfxml_platform_description_cb_list;
-xbt_dynar_t ETag_surfxml_platform_description_cb_list;
-xbt_dynar_t STag_surfxml_host_cb_list;
-xbt_dynar_t ETag_surfxml_host_cb_list;
-xbt_dynar_t STag_surfxml_router_cb_list;
-xbt_dynar_t ETag_surfxml_router_cb_list;
-xbt_dynar_t STag_surfxml_link_cb_list;
-xbt_dynar_t ETag_surfxml_link_cb_list;
-xbt_dynar_t STag_surfxml_route_cb_list;
-xbt_dynar_t ETag_surfxml_route_cb_list;
-xbt_dynar_t STag_surfxml_link_c_ctn_cb_list;
-xbt_dynar_t ETag_surfxml_link_c_ctn_cb_list;
-xbt_dynar_t STag_surfxml_process_cb_list;
-xbt_dynar_t ETag_surfxml_process_cb_list;
-xbt_dynar_t STag_surfxml_argument_cb_list;
-xbt_dynar_t ETag_surfxml_argument_cb_list;
-xbt_dynar_t STag_surfxml_prop_cb_list;
-xbt_dynar_t ETag_surfxml_prop_cb_list;
-
-XBT_PUBLIC(void) surfxml_add_callback(xbt_dynar_t cb_list, void_f_void_t function);
+/* Prototypes for functions handling routing and were factorized succesfully from the models */
+void init_data(void);
+void parse_route_elem(void);
+
+/* surf parse file related */
+void parse_platform_file(const char* file);
+
+/* Stores the sets */
+XBT_PUBLIC_DATA(xbt_dict_t) set_list;
+
+void parse_foreach(void);
+void parse_sets(void);
+void parse_route_multi_set_endpoints(void);
+void parse_route_multi_set_route(void);
+void parse_cluster(void);
+void parse_trace_init(void);
+void parse_trace_finalize(void);
+void parse_trace_c_connect(void);
+
+void manage_route(xbt_dict_t route_table, const char* route_name, int action, int isMultiRoute);
+int route_action;
+
+/* This is used by all models when creating the routing table while parsing */
+xbt_dict_t route_table, route_multi_table;
+xbt_dynar_t route_link_list;
+
+/* For the trace and trace:connect tag */
+xbt_dict_t traces_set_list;
+xbt_dynar_t traces_connect_list;
+
+double get_cpu_power(const char* power);
+void init_randomness(void);
+void add_randomness(void);
SG_END_DECL()