+const char* SD_workstation_get_name(SD_workstation_t workstation) {
+ SD_CHECK_INIT_DONE();
+ xbt_assert0(workstation != NULL, "Invalid parameter");
+ return surf_workstation_model->common_public->get_resource_name(workstation->surf_workstation);
+}
+
+/**
+ * \brief Returns the value of a given workstation property
+ *
+ * \param workstation a workstation
+ * \param name a property name
+ * \return value of a property (or NULL if property not set)
+ */
+const char* SD_workstation_get_property_value(SD_workstation_t ws, const char* name)
+{
+ return xbt_dict_get_or_null(SD_workstation_get_properties(ws), name);
+}
+
+
+/**
+ * \brief Returns a #xbt_dict_t consisting of the list of properties assigned to this workstation
+ *
+ * \param workstation a workstation
+ * \return the dictionary containing the properties associated with the workstation
+ */
+xbt_dict_t SD_workstation_get_properties(SD_workstation_t workstation)
+{
+ SD_CHECK_INIT_DONE();
+ xbt_assert0((workstation != NULL), "Invalid parameters");
+
+ return (surf_workstation_model->common_public->get_properties(workstation->surf_workstation));
+
+}
+
+
+/**
+ * \brief Returns the route between two workstations
+ *
+ * Use SD_route_get_size() to know the array size.
+ *
+ * \param src a workstation
+ * \param dst another workstation
+ * \return a new array of \ref SD_link_t representating the route between these two workstations
+ * \see SD_route_get_size(), SD_link_t
+ */
+const SD_link_t* SD_route_get_list(SD_workstation_t src, SD_workstation_t dst) {
+ void *surf_src;
+ void *surf_dst;
+ const void **surf_route;
+ int route_size;
+ const char *link_name;
+ int i;
+
+ SD_CHECK_INIT_DONE();
+
+ if (sd_global->recyclable_route == NULL) {
+ /* first run */
+ sd_global->recyclable_route = xbt_new(SD_link_t, SD_link_get_number());
+ }
+
+ surf_src = src->surf_workstation;
+ surf_dst = dst->surf_workstation;
+
+ surf_route = surf_workstation_model->extension_public->get_route(surf_src, surf_dst);
+ route_size = surf_workstation_model->extension_public->get_route_size(surf_src, surf_dst);
+
+
+ for (i = 0; i < route_size; i++) {
+ link_name = surf_workstation_model->extension_public->get_link_name(surf_route[i]);
+ sd_global->recyclable_route[i] = xbt_dict_get(sd_global->links, link_name);
+ }
+
+ return sd_global->recyclable_route;
+}
+
+/**
+ * \brief Returns the number of links on the route between two workstations
+ *
+ * \param src a workstation
+ * \param dst another workstation
+ * \return the number of links on the route between these two workstations
+ * \see SD_route_get_list()
+ */
+int SD_route_get_size(SD_workstation_t src, SD_workstation_t dst) {
+ SD_CHECK_INIT_DONE();
+ return surf_workstation_model->extension_public->
+ get_route_size(src->surf_workstation, dst->surf_workstation);
+}
+
+/**
+ * \brief Returns the total power of a workstation
+ *
+ * \param workstation a workstation
+ * \return the total power of this workstation
+ * \see SD_workstation_get_available_power()
+ */
+double SD_workstation_get_power(SD_workstation_t workstation) {
+ SD_CHECK_INIT_DONE();
+ xbt_assert0(workstation != NULL, "Invalid parameter");
+ return surf_workstation_model->extension_public->get_speed(workstation->surf_workstation, 1.0);
+}
+
+/**
+ * \brief Returns the proportion of available power in a workstation
+ *
+ * \param workstation a workstation
+ * \return the proportion of power currently available in this workstation (normally a number between 0 and 1)
+ * \see SD_workstation_get_power()
+ */
+double SD_workstation_get_available_power(SD_workstation_t workstation) {
+ SD_CHECK_INIT_DONE();
+ xbt_assert0(workstation != NULL, "Invalid parameter");
+ return surf_workstation_model->extension_public->get_available_speed(workstation->surf_workstation);