2 * @file frescan_bwres_analysis.h
4 * @brief FRESCAN bandwith reservation layer: sched analysis
10 * @author Daniel Sangorrin <daniel.sangorrin@unican.es>
14 * This module contains the scheduling analysis functions for the
15 * admission tests and spare capacity distribution of the bandwith
16 * reservation (bwres) layer.
18 * The module "frescan_bwres_mode_change" must be used to apply finally this
19 * new parameters to the sporadic servers following an appropriate mode
24 //----------------------------------------------------------------------
25 // Copyright (C) 2006 - 2009 by the FRESCOR consortium:
27 // Universidad de Cantabria, SPAIN
28 // University of York, UK
29 // Scuola Superiore Sant'Anna, ITALY
30 // Kaiserslautern University, GERMANY
31 // Univ. Politecnica Valencia, SPAIN
32 // Czech Technical University in Prague, CZECH REPUBLIC
34 // Thales Communication S.A. FRANCE
35 // Visual Tools S.A. SPAIN
36 // Rapita Systems Ltd UK
39 // See http://www.frescor.org
41 // The FRESCOR project (FP6/2005/IST/5-034026) is funded
42 // in part by the European Union Sixth Framework Programme
43 // The European Union is not liable of any use that may be
47 // based on previous work (FSF) done in the FIRST project
49 // Copyright (C) 2005 Mälardalen University, SWEDEN
50 // Scuola Superiore S.Anna, ITALY
51 // Universidad de Cantabria, SPAIN
52 // University of York, UK
54 // This file is part of FNA (Frescor Network Adaptation)
56 // FNA is free software; you can redistribute it and/or modify it
57 // under terms of the GNU General Public License as published by the
58 // Free Software Foundation; either version 2, or (at your option) any
59 // later version. FNA is distributed in the hope that it will be
60 // useful, but WITHOUT ANY WARRANTY; without even the implied warranty
61 // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
62 // General Public License for more details. You should have received a
63 // copy of the GNU General Public License along with FNA; see file
64 // COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
65 // Cambridge, MA 02139, USA.
67 // As a special exception, including FNA header files in a file,
68 // instantiating FNA generics or templates, or linking other files
69 // with FNA objects to produce an executable application, does not
70 // by itself cause the resulting executable application to be covered
71 // by the GNU General Public License. This exception does not
72 // however invalidate any other reasons why the executable file might be
73 // covered by the GNU Public License.
74 // -----------------------------------------------------------------------
78 #ifndef _FRESCAN_BWRES_ANALYSIS_H_
79 #define _FRESCAN_BWRES_ANALYSIS_H_
81 #include "frescan_types.h"
84 * frescan_bwres_sa_init() - init the scenario
86 * @scenario: the scenario (in out)
87 * @params: init params (in)
90 extern int frescan_bwres_sa_init
91 (frescan_bwres_sa_scenario_t *scenario,
92 const frescan_bwres_sa_init_params_t *params);
95 * frescan_bwres_sa_add_contract() - add a contract to the scenario
97 * @scenario: the scenario (in out)
98 * @ss: the preallocated ss identificator (in)
99 * @node: the node this contract belongs to (in)
100 * @contract: the new contract (in)
103 extern int frescan_bwres_sa_add_contract
104 (frescan_bwres_sa_scenario_t *scenario,
107 const frsh_contract_t *contract);
110 * frescan_bwres_sa_update_contract() - update a contract in the scenario
112 * @scenario: the scenario (in out)
113 * @ss: the ss identificator (in)
114 * @node: the node this contract belongs to (in)
115 * @contract: the values to update the contract (in)
116 * @old_contract: the values of the previous contract. if NULL
117 * no contract is returned (out)
120 extern int frescan_bwres_sa_update_contract
121 (frescan_bwres_sa_scenario_t *scenario,
124 const frsh_contract_t *contract,
125 frsh_contract_t *old_contract);
128 * frescan_bwres_sa_remove_contract() - remove a contract from the scenario
130 * @scenario: the scenario (in out)
131 * @ss: the ss to remove (in)
132 * @node: the node this contract belongs to (in)
133 * @contract: if not null, returns a copy of the contract (out)
136 extern int frescan_bwres_sa_remove_contract
137 (frescan_bwres_sa_scenario_t *scenario,
140 frsh_contract_t *contract);
143 * frescan_bwres_sa_sched_test() - perform a scheduling test on the scenario
145 * @scenario: the scenario (in out)
146 * @is_schedulable: if the scenario is schedulable or not (out)
149 extern int frescan_bwres_sa_sched_test(frescan_bwres_sa_scenario_t *scenario,
150 bool *is_schedulable);
153 * frescan_bwres_sa_spare_capacity() - distribute the spare capacity
155 * @scenario: the scenario (in out)
158 extern int frescan_bwres_sa_spare_capacity
159 (frescan_bwres_sa_scenario_t *scenario);
161 #endif // _FRESCAN_BWRES_ANALYSIS_H_