X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/07f07c110338b034abedccf6fdb2d0dcbf6c7f3e..1943ca63ab0af58abc75c70054783d962737f3e9:/src/include/surf/surf.h diff --git a/src/include/surf/surf.h b/src/include/surf/surf.h index 1e3c36c80f..87fb6aac6a 100644 --- a/src/include/surf/surf.h +++ b/src/include/surf/surf.h @@ -82,7 +82,7 @@ typedef struct RoutingEdge RoutingEdge; typedef struct RoutingPlatf RoutingPlatf; #endif -/** \ingroup SURF_models +/** @ingroup SURF_c_bindings * \brief Model datatype * * Generic data structure for a model. The workstations, @@ -102,7 +102,7 @@ typedef WorkstationCLM03 *surf_workstation_CLM03_t; typedef NetworkCm02Link *surf_network_link_t; typedef Cpu *surf_cpu_t; -/** \ingroup SURF_actions +/** @ingroup SURF_c_bindings * \brief Action structure * * Never create s_surf_action_t by yourself ! The actions are created @@ -111,8 +111,6 @@ typedef Cpu *surf_cpu_t; * \see e_surf_action_state_t */ typedef Action *surf_action_t; -typedef ActionLmm *surf_action_lmm_t; -typedef StorageActionLmm *surf_storage_action_lmm_t; typedef As *AS_t; typedef RoutingEdge *routing_edge_t; @@ -188,6 +186,7 @@ typedef enum { /***************************/ /* Generic model object */ /***************************/ + //FIXME:REMOVE typedef struct s_routing_platf s_routing_platf_t, *routing_platf_t; XBT_PUBLIC_DATA(routing_platf_t) routing_platf; @@ -410,11 +409,10 @@ XBT_PUBLIC(surf_action_t) surf_workstation_sleep(surf_resource_t resource, doubl * @brief Open a file on a workstation * * @param workstation The surf workstation - * @param mount The mount point - * @param path The path to the file + * @param fullpath The path to the file * @return The surf action corresponding to the openning */ -XBT_PUBLIC(surf_action_t) surf_workstation_open(surf_resource_t workstation, const char* mount, const char* path); +XBT_PUBLIC(surf_action_t) surf_workstation_open(surf_resource_t workstation, const char* fullpath); /** * @brief Close a file descriptor on a workstation @@ -641,12 +639,20 @@ XBT_PUBLIC(void) surf_workstation_set_power_peak_at(surf_resource_t host, int ps XBT_PUBLIC(double) surf_workstation_get_consumed_energy(surf_resource_t host); /** - * @brief Get the list of storages of a workstation + * @brief Get the list of storages mounted on a workstation * * @param workstation The surf workstation * @return Dictionary of mount point, Storage */ -XBT_PUBLIC(xbt_dict_t) surf_workstation_get_storage_list(surf_resource_t workstation); +XBT_PUBLIC(xbt_dict_t) surf_workstation_get_mounted_storage_list(surf_resource_t workstation); + +/** + * @brief Get the list of storages attached to a workstation + * + * @param workstation The surf workstation + * @return Dictionary of storage + */ +XBT_PUBLIC(xbt_dynar_t) surf_workstation_get_attached_storage_list(surf_resource_t workstation); /** * @brief Unlink a file descriptor @@ -854,7 +860,7 @@ XBT_PUBLIC(e_surf_action_state_t) surf_action_get_state(surf_action_t action); * @param action The surf action * @return The cost of the action */ -XBT_PUBLIC(int) surf_action_get_cost(surf_action_t action); +XBT_PUBLIC(double) surf_action_get_cost(surf_action_t action); /** * @brief [brief desrciption] @@ -875,6 +881,14 @@ XBT_PUBLIC(void) surf_cpu_action_set_affinity(surf_action_t action, surf_resourc */ XBT_PUBLIC(void) surf_cpu_action_set_bound(surf_action_t action, double bound); +/** + * @brief [brief description] + * @details [long description] + * + * @param action The surf network action + */ +XBT_PUBLIC(double) surf_network_action_get_latency_limited(surf_action_t action); + /** * @brief Get the file associated to a storage action * @@ -891,6 +905,15 @@ XBT_PUBLIC(surf_file_t) surf_storage_action_get_file(surf_action_t action); */ XBT_PUBLIC(xbt_dict_t) surf_storage_action_get_ls_dict(surf_action_t action); + +/** + * @brief Get the host the storage is attached to + * + * @param resource The surf storage + * @return The host name + */ +XBT_PUBLIC(const char * ) surf_storage_get_host(surf_resource_t resource); + XBT_PUBLIC(surf_model_t) surf_resource_model(const void *host, int level); /** @} */ @@ -1258,6 +1281,9 @@ 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) */ +/* The same for model_prop set*/ +XBT_PUBLIC_DATA(xbt_dict_t) current_model_property_set; + /* surf parse file related (public because called from a test suite) */ XBT_PUBLIC(void) parse_platform_file(const char *file);