*
* @brief FRESCAN bandwith reservation layer: sched analysis
*
- * This module contains the scheduling analysis data and functions for the
- * admission tests and spare capacity distribution of the negotiation layer.
- * It provides an easy API easy to understand and in the implementation part
- * it makes call to the general sched analysis module of FRSH which is shared
- * with the CPU contracts layer in FRSH.
- *
- * EXAMPLE of utilization:
- *
- * INITIALIZATION
- * --------------
- * params.min_prio = 0;
- * params.max_prio = 16;
- * params.overhead = ...;
- * frescan_sa_init(&scenario, ¶ms);
- *
- * NEGOTIATE
- * ---------
- * fadt_freelist_alloc(&freelist_contracts, &id);
- * frescan_sa_add_contract(&scenario, &contracts[id], id);
- * frescan_sa_sched_test(&scenario, &success);
- *
- * if (!success) {
- * frescan_sa_remove_contract(&scenario, id);
- * } else {
- * frescan_sa_spare_capacity(&scenario);
- * vres_id = to_vres(resource_type, resource_id, id);
- * create vres runtime structures;
- *
- * for vres_id in active_vres_id {
- * frescan_sa_get_final_values(&scenario,
- * to_index(vres_id),
- * &final_values);
- * update vres runtime structures if necessary;
- * }
- * }
- *
- * RENEGOTIATE
- * -----------
- * copy old_contract
- * frescan_sa_update_contract(&scenario, to_index(vres_id), &contract);
- * frescan_sa_sched_test(&scenario, &success);
- *
- * if (!success) {
- * frescan_sa_update_contract(&sa_data,
- * to_index(vres_id),
- * &old_contract);
- * } else {
- * frescan_sa_spare_capacity(&scenario);
- * for vres_id in active_vres_id {
- * frescan_sa_get_final_values(&scenario,
- * to_index(vres_id),
- * &final_values);
- * update vres runtime structures if necessary;
- * }
- * }
- *
- * CANCEL
- * ------
- * frescan_sa_remove_contract(&scenario, to_index(vres_id));
- * frescan_sa_spare_capacity(&scenario);
- *
- * @version 0.01
- *
- * @date 15-Apr-2008
+ * @version 0.02
+ *
+ * @date 3-Jul-2008
*
* @author Daniel Sangorrin <daniel.sangorrin@unican.es>
*
+ * @comments
+ *
+ * This module contains the scheduling analysis functions for the
+ * admission tests and spare capacity distribution of the bandwith
+ * reservation (bwres) layer.
+ *
+ * The module "frescan_bwres_mode_change" must be used to apply finally this
+ * new parameters to the sporadic servers following an appropriate mode
+ * change protocol.
+ *
* @license
*
* -----------------------------------------------------------------------
* frescan_sa_add_contract() - add a contract to the scenario
*
* @scenario: the scenario (in out)
- * @contract: the new contract (in)
* @ss: the preallocated ss identificator (in)
* @node: the node this contract belongs to (in)
+ * @contract: the new contract (in)
*/
-extern int frescan_sa_add_contract(frescan_sa_scenario_t *scenario,
- const frescan_contract_t *contract,
- frescan_ss_t ss,
- frescan_node_t node);
+extern int frescan_sa_add_contract(frescan_sa_scenario_t *scenario,
+ frescan_ss_t ss,
+ frescan_node_t node,
+ const frsh_contract_t *contract);
/**
* frescan_sa_update_contract() - update a contract in the scenario
* @ss: the ss identificator (in)
* @node: the node this contract belongs to (in)
* @contract: the values to update the contract (in)
- * @old_contract: the values of the previous contract. Can be NULL (out)
+ * @old_contract: the values of the previous contract. if NULL
+ * no contract is returned (out)
*/
-extern int frescan_sa_update_contract(frescan_sa_scenario_t *scenario,
- frescan_ss_t ss,
- frescan_node_t node,
- const frescan_contract_t *contract,
- frescan_contract_t *old_contract);
+extern int frescan_sa_update_contract(frescan_sa_scenario_t *scenario,
+ frescan_ss_t ss,
+ frescan_node_t node,
+ const frsh_contract_t *contract,
+ frsh_contract_t *old_contract);
/**
* frescan_sa_remove_contract() - remove a contract from the scenario
* frescan_sa_sched_test() - perform a scheduling test on the scenario
*
* @scenario: the scenario (in out)
- * @success: if the scenario is schedulable or not (out)
+ * @is_schedulable: if the scenario is schedulable or not (out)
*/
extern int frescan_sa_sched_test(frescan_sa_scenario_t *scenario,
- bool *success);
+ bool *is_schedulable);
/**
- * frescan_sa_spare_capacity() - distribute the remaining spare capacity
+ * frescan_sa_spare_capacity() - distribute the spare capacity
*
* @scenario: the scenario (in out)
*/
extern int frescan_sa_spare_capacity(frescan_sa_scenario_t *scenario);
-/**
- * frescan_sa_get_final_values() - get the final values
- *
- * @scenario: the scenario (in)
- * @ss: the ss from which we want the final values (in)
- * @node: the node this contract belongs to (in)
- * @final_values: the final values (out)
- */
-
-extern int frescan_sa_get_final_values(const frescan_sa_scenario_t *scenario,
- frescan_ss_t ss,
- frescan_node_t node,
- frescan_sa_final_values_t *final_values);
-
#endif // _FRESCAN_BWRES_ANALYSIS_H_