X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/be25aefab9c2c610e764c6b3ddd0df1c2c9a4797..12bbde66e3131b5d56a34b9f86d9c43bf36cca8b:/src/simdag/sd_link.c diff --git a/src/simdag/sd_link.c b/src/simdag/sd_link.c index 4934b1bb12..9533ca4e3a 100644 --- a/src/simdag/sd_link.c +++ b/src/simdag/sd_link.c @@ -1,3 +1,9 @@ +/* Copyright (c) 2006, 2007, 2008, 2009, 2010. The SimGrid Team. + * All rights reserved. */ + +/* This program is free software; you can redistribute it and/or modify it + * under the terms of the license (GNU LGPL) which comes with this package. */ + #include "private.h" #include "simdag/simdag.h" #include "xbt/dict.h" @@ -113,8 +119,7 @@ const char *SD_link_get_name(SD_link_t link) { SD_CHECK_INIT_DONE(); xbt_assert0(link != NULL, "Invalid parameter"); - return surf_workstation_model->extension.workstation. - get_link_name(link->surf_link); + return surf_resource_name(link->surf_link); } /** @@ -128,34 +133,7 @@ double SD_link_get_current_bandwidth(SD_link_t link) SD_CHECK_INIT_DONE(); xbt_assert0(link != NULL, "Invalid parameter"); return surf_workstation_model->extension.workstation. - get_link_bandwidth(link->surf_link); -} - -/** - * \brief Returns the value of a given link property - * - * \param link the inspected link - * \param name a property name - * \return value of a property (or NULL if property not set) - */ -const char *SD_link_get_property_value(SD_link_t link, const char *name) -{ - return xbt_dict_get_or_null(SD_link_get_properties(link), name); -} - -/** - * \brief Returns a #xbt_dict_t consisting of the list of properties assigned to a link - * - * \param link a link - * \return the dictionary containing the properties associated with the link - */ -xbt_dict_t SD_link_get_properties(SD_link_t link) -{ - SD_CHECK_INIT_DONE(); - xbt_assert0((link != NULL), "Invalid parameters"); - - return (surf_workstation_model->get_properties(link->surf_link)); - + get_link_bandwidth(link->surf_link); } /** @@ -169,7 +147,7 @@ double SD_link_get_current_latency(SD_link_t link) SD_CHECK_INIT_DONE(); xbt_assert0(link != NULL, "Invalid parameter"); return surf_workstation_model->extension.workstation. - get_link_latency(link->surf_link); + get_link_latency(link->surf_link); } /**