-
-/**
- * \brief Returns an approximative estimated time for the given
- * communication amount between two workstations
- *
- * \param src the first workstation
- * \param dst the second workstation
- * \param bytes_amount the communication amount you want to evaluate (in bytes)
- * \return an approximative estimated communication time for the given bytes amount
- * between the workstations (in seconds)
- */
-double SD_route_get_communication_time(sg_host_t src,
- sg_host_t dst,
- double bytes_amount)
-{
-
-
- /* total time = latency + transmission time of the slowest link
- transmission time of a link = communication amount / link bandwidth */
-
- const SD_link_t *links;
- xbt_dynar_t route = NULL;
- int nb_links;
- double bandwidth, min_bandwidth;
- double latency = 0;
- int i;
-
- xbt_assert(bytes_amount >= 0, "bytes_amount must be greater than or equal to zero");
-
-
- if (bytes_amount == 0.0)
- return 0.0;
-
- routing_platf->getRouteAndLatency(src->pimpl_netcard, dst->pimpl_netcard,
- &route, &latency);
-
- links = SD_route_get_list(src, dst);
- nb_links = SD_route_get_size(src, dst);
- min_bandwidth = -1.0;
-
- for (i = 0; i < nb_links; i++) {
- bandwidth = sg_link_bandwidth(links[i]);
- if (bandwidth < min_bandwidth || min_bandwidth == -1.0)
- min_bandwidth = bandwidth;
- }
-
- return latency + (bytes_amount / min_bandwidth);
-}
-
-/**
- * \brief Return the list of mounted storages on a workstation.
- *
- * \param workstation a workstation
- * \return a dynar containing all mounted storages on the workstation
- */
-/**
- * \brief Return the list of mounted storages on a workstation.
- *
- * \param workstation a workstation
- * \return a dynar containing all mounted storages on the workstation
- */
-/**
- * \brief Returns the host name the storage is attached to
- *
- * This functions checks whether a storage is a valid pointer or not and return its name.
- */
-const char *SD_storage_get_host(msg_storage_t storage) {
- xbt_assert((storage != NULL), "Invalid parameters");
- SD_storage_priv_t priv = SD_storage_priv(storage);
- return priv->host;
-}