]> rtime.felk.cvut.cz Git - frescor/frsh-include.git/blobdiff - frsh_spare_capacity.h
Changing msec2timespec() and timespec2msec() functions to give their results
[frescor/frsh-include.git] / frsh_spare_capacity.h
index b4ae441449bc873e510eeba302ea62a8b2bc55f4..8bac8018a66742c140bf86062d71e63a55e0e54e 100644 (file)
  * parameters.
  *
  * @param contract  Contract object
- * @param remaining_stability_time Time in which FRSH guarantees that the
+ * @param stability_time Time in which FRSH guarantees that the
  *                   assigned budget and period will remain permanent
  *                   even across renegotiations.
  * @param budget_max The maximum budget that the vres aspires to
  * 
  **/
 int frsh_contract_set_reclamation_params(frsh_contract_t   *contract,
-                                         const struct timespec       *remaining_stability_time,
+                                         const struct timespec       *stability_time,
                                          const struct timespec       *budget_max,
                                          const struct timespec       *period_min,
                                          frsh_granularity_t            granularity,
@@ -220,7 +220,7 @@ int frsh_contract_set_reclamation_params(frsh_contract_t   *contract,
  **/
 int frsh_contract_get_reclamation_params
   (const frsh_contract_t *contract,
-   struct timespec                 *remaining_stability_time,
+   struct timespec                 *stability_time,
    struct timespec                 *budget_max,
    struct timespec                 *period_min,
    frsh_granularity_t               *granularity,
@@ -232,7 +232,7 @@ int frsh_contract_get_reclamation_params
 /**
  * frsh_vres_get_remaining_stability_time()
  *
- * This operation returns the remaining_stability_time for the vres.
+ * This operation returns the stability_time for the vres.
  *
  * @return 0 if successful \n
  *   FRSH_ERR_BAD_ARGUMENT : if the value of the vres argument is not in range or
@@ -246,10 +246,10 @@ int frsh_contract_get_reclamation_params
  * 
  **/
 int frsh_vres_get_remaining_stability_time(frsh_vres_id_t vres, 
-                                      struct timespec *remaining_stability_time);
+                                      struct timespec *stability_time);
 
 /**
- * frsh_spare_get_capacity()
+ * frsh_resource_get_capacity()
  *
  * This operation gets the spare capacity currently assigned to an
  * importance level.  The capacity is the number obtained divided by
@@ -267,13 +267,14 @@ int frsh_vres_get_remaining_stability_time(frsh_vres_id_t vres,
  *       is not valid \n
  * 
  **/
-int frsh_spare_get_capacity(const frsh_resource_id_t resource_id,
-                                     const int importance,
-                                     uint32_t *capacity);
+int frsh_resource_get_capacity(const frsh_resource_type_t resource_type,
+                               const frsh_resource_id_t resource_id,
+                               const int importance,
+                               uint32_t *capacity);
 
 
 /**
- * frsh_spare_get_total_weight()
+ * frsh_resource_get_total_weight()
  *
  * This operation calculates the sum of the weight parameters for all
  * vres in the system for a certain importance level at a specific
@@ -289,10 +290,11 @@ int frsh_spare_get_capacity(const frsh_resource_id_t resource_id,
  *    FRSH_ERR_NOT_CONTRACTED_VRES : if the vres has been cancelled or it
  *       is not valid \n
  **/
-int frsh_spare_get_total_weight 
-   (const frsh_resource_id_t resource_id,
+int frsh_resource_get_total_weight 
+   (const frsh_resource_type_t resource_type,
+    const frsh_resource_id_t resource_id,
     const int importance,
-    uint32_t *capacity);
+    uint32_t *total_weight);
 
 
 /**