]> rtime.felk.cvut.cz Git - frescor/frsh-include.git/blob - frsh.h
442549b21a30cfd29fb9154ef8d34292cbb51df5
[frescor/frsh-include.git] / frsh.h
1 // -----------------------------------------------------------------------
2 //   Copyright (C) 2005  Mälardalen University, SWEDEN
3 //                       Scuola Superiore S.Anna, ITALY
4 //                       Universidad de Cantabria, SPAIN
5 //                       University of York, UK
6 //
7 //   FRSH API web pages: http://marte.unican.es/frsh/docs/
8 //                      http://shark.sssup.it/contrib/first/docs/
9 //
10 //  This file is part of FRSH API
11 //
12 //  FRSH API is free software; you can  redistribute it and/or  modify
13 //  it under the terms of  the GNU General Public License as published by
14 //  the Free Software Foundation;  either  version 2, or (at  your option)
15 //  any later version.
16 //
17 //  FRSH API  is distributed  in  the hope  that  it  will  be useful,  but
18 //  WITHOUT  ANY  WARRANTY;     without  even the   implied   warranty  of
19 //  MERCHANTABILITY  or  FITNESS FOR  A  PARTICULAR PURPOSE. See  the  GNU
20 //  General Public License for more details.
21 //
22 //  You should have  received a  copy of  the  GNU  General Public License
23 //  distributed  with  FRSH API;  see file COPYING.   If not,  write to the
24 //  Free Software  Foundation,  59 Temple Place  -  Suite 330,  Boston, MA
25 //  02111-1307, USA.
26 //
27 //  As a special exception, if you include this header file into source
28 //  files to be compiled, this header file does not by itself cause
29 //  the resulting executable to be covered by the GNU General Public
30 //  License.  This exception does not however invalidate any other
31 //  reasons why the executable file might be covered by the GNU General
32 //  Public License.
33 // -----------------------------------------------------------------------
34 //frsh.h
35
36 //==============================================
37 //  ******** *******    ******** **      **
38 //  **///// /**////**  **////// /**     /**
39 //  **      /**   /** /**       /**     /**
40 //  ******* /*******  /*********/**********
41 //  **////  /**///**  ////////**/**//////**
42 //  **      /**  //**        /**/**     /**
43 //  **      /**   //** ******** /**     /**
44 //  //       //     // ////////  //      // 
45 //
46 // FRSH(FRescor ScHeduler), pronounced "fresh"
47 //================================================
48 #ifndef _FRSH_H_
49 #define _FRSH_H_
50
51 /**
52  * @file frsh.h
53  *
54  * Intended to be used by API clients to get the interface
55  * requirements.
56  *
57  * It is also used by the library files to enforce the interface
58  * headings.
59  *
60  * However it is NOT used by any of the FRSH include files to avoid
61  * having include deadlocks.
62  **/
63
64 #include "frsh_configuration_parameters.h"
65
66 /* We include all the types because they are needed for the
67    frsh_contract_parameters_t */
68
69 #include "frsh_shared_objects_types.h"
70 #include "frsh_spare_capacity_types.h"
71 #include "frsh_hierarchical_types.h"
72 #include "frsh_distributed_types.h"
73 #include "frsh_implementation_specific_types.h"
74
75 #include "frsh_core.h"
76
77 // Configure these modules by commenting out the appropiate lines
78
79 #include "frsh_hierarchical.h"                 //
80 #include "frsh_shared_objects.h"
81 #include "frsh_dynamic_reclaiming.h"           //
82 #include "frsh_spare_capacity.h"
83 #include "frsh_distributed.h"                  //
84 #include "frsh_distributed_spare_capacity.h"   //
85
86
87
88 #ifndef FRSH_HIERARCHICAL_MODULE_SUPPORTED
89     #define FRSH_HIERARCHICAL_MODULE_SUPPORTED        0
90
91 #endif  //FRSH_HIERARCHICAL_MODULE_SUPPORTED
92
93 #ifndef FRSH_SHARED_OBJECTS_MODULE_SUPPORTED
94     #define FRSH_SHARED_OBJECTS_MODULE_SUPPORTED      0
95 #endif  //FRSH_SHARED_OBJECTS_MODULE_SUPPORTED
96
97 #ifndef FRSH_DYNAMIC_RECLAIMING_MODULE_SUPPORTED
98     #define FRSH_DYNAMIC_RECLAIMING_MODULE_SUPPORTED  0
99 #endif  //FRSH_DYNAMIC_RECLAIMING_MODULE_SUPPORTED
100
101 #ifndef FRSH_SPARE_CAPACITY_MODULE_SUPPORTED
102     #define FRSH_SPARE_CAPACITY_MODULE_SUPPORTED      0
103
104     //Return warnings if spare_capacity module is not included:
105  
106     #define frsh_set_contract_reclamation_parameters  \
107       (contract, budget_max, period_min, granularity,\
108        utilization_set, quality,  importance)        \
109        ( FRSH_WRN_MODULE_NOT SUPPORTED )
110     
111     #define frsh_get_contract_reclamation_parameters  \
112       (contract, budget_max, period_min, granularity,\
113        utilization_set, quality, importance)         \
114        ( FRSH_WRN_MODULE_NOT SUPPORTED )
115    
116     #define frsh_request_change_quality_and_importance\
117       (server, new_importance, new_quality)          \
118        ( FRSH_WRN_MODULE_NOT SUPPORTED )
119         
120     #define frsh_get_total_quality (server,total_quality)\
121        ( FRSH_WRN_MODULE_NOT SUPPORTED )
122
123 #endif  //FRSH_SPARE_CAPACITY_MODULE_SUPPORTED
124
125 #ifndef FRSH_DISTRIBUTED_MODULE_SUPPORTED
126     #define FRSH_DISTRIBUTED_MODULE_SUPPORTED 0
127 #endif  //FRSH_DISTRIBUTED_MODULE_SUPPORTED
128
129 #ifndef FRSH_DISTRIBUTED_SPARE_CAPACITY_MODULE_SUPPORTED
130     #define FRSH_DISTRIBUTED_SPARE_CAPACITY_MODULE_SUPPORTED 0
131    
132     //Return warnings if distributed_spare_capacity module is not included:
133
134     #define frsh_set_contract_granted_capacity_flag(contract,granted_capacity_flag)\
135        ( FRSH_WRN_MODULE_NOT SUPPORTED )
136  
137     #define frsh_get_contract_granted_capacity_flag(contract,granted_capacity_flag)\
138        ( FRSH_WRN_MODULE_NOT SUPPORTED )
139    
140     #definr frsh_set_server_capacity(server,new_period,new_budget)\
141        ( FRSH_WRN_MODULE_NOT SUPPORTED )
142
143 #endif  //FRSH_DISTRIBUTED_SPARE_CAPACITY_MODULE_SUPPORTED
144
145
146 #endif // _FRSH_H_