Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
updating the dtd and some memory leacks
[simgrid.git] / src / include / surf / surf.h
index d81c773..8ac134c 100644 (file)
@@ -141,6 +141,9 @@ typedef struct surf_model_public {
   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 */
   const char *name; /**< Name of this model */
+
+  xbt_dict_t (*get_properties) (void* link); /**< Return the properties dictionary */
+
 } s_surf_model_public_t, *surf_model_public_t;
 
 /** \brief Private data available on all models
@@ -199,8 +202,8 @@ XBT_PUBLIC(void) surf_timer_model_init(const char *filename);
  *  \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
@@ -241,11 +244,11 @@ XBT_PUBLIC_DATA(surf_cpu_model_t) surf_cpu_model;
  */
 XBT_PUBLIC(void) surf_cpu_model_init_Cas01(const char *filename);
 
-extern XBT_PUBLIC_DATA(int) surf_cpu_model_description_size;
+XBT_PUBLIC_DATA(int) surf_cpu_model_description_size;
 /** \brief The list of all available cpu model models
  *  \ingroup SURF_models
  */
-extern XBT_PUBLIC_DATA(s_surf_model_description_t) surf_cpu_model_description[];
+XBT_PUBLIC_DATA(s_surf_model_description_t) surf_cpu_model_description[];
 
 /* Network model */
 
@@ -360,11 +363,11 @@ XBT_PUBLIC(void) surf_network_model_init_SDP(const char *filename);
 
 
 
-extern XBT_PUBLIC_DATA(int) surf_network_model_description_size;
+XBT_PUBLIC_DATA(int) surf_network_model_description_size;
 /** \brief The list of all available network model models
  *  \ingroup SURF_models
  */
-extern XBT_PUBLIC_DATA(s_surf_model_description_t) surf_network_model_description[];
+XBT_PUBLIC_DATA(s_surf_model_description_t) surf_network_model_description[];
 
 /** \brief Workstation model extension public
  *  \ingroup SURF_models
@@ -381,6 +384,7 @@ typedef struct surf_workstation_model_extension_public {
   surf_action_t(*communicate) (void *workstation_src,                  /**< Execute a communication amount between two workstations */
                               void *workstation_dst, double size,
                               double max_rate);
+
   surf_action_t(*execute_parallel_task) (int workstation_nb,           /**< Execute a parallel task on several workstations */
                                         void **workstation_list,
                                         double *computation_amount,
@@ -463,11 +467,11 @@ XBT_PUBLIC(void) surf_workstation_model_init_KCCFLN05(const char *filename);
  */
 XBT_PUBLIC(void) surf_workstation_model_init_ptask_L07(const char *filename);
 
-extern XBT_PUBLIC_DATA(int) surf_workstation_model_description_size;
+XBT_PUBLIC_DATA(int) surf_workstation_model_description_size;
 /** \brief The list of all available workstation model models
  *  \ingroup SURF_models
  */
-extern XBT_PUBLIC_DATA(s_surf_model_description_t) surf_workstation_model_description[];
+XBT_PUBLIC_DATA(s_surf_model_description_t) surf_workstation_model_description[];
 
 /** \brief The network links
  *  \ingroup SURF_models
@@ -476,14 +480,14 @@ extern XBT_PUBLIC_DATA(s_surf_model_description_t) surf_workstation_model_descri
  *
  *  \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;
 
@@ -540,6 +544,10 @@ XBT_PUBLIC(double)surf_get_clock(void);
  */
 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*);
 
 SG_END_DECL()