]> rtime.felk.cvut.cz Git - frescor/frsh.git/blob - fres/resalloc/fra.idl
Added license headers and authorship info
[frescor/frsh.git] / fres / resalloc / fra.idl
1 ////////////////////////////////////////////////////////////////////////////
2 // ---------------------------------------------------------------------- //
3 // Copyright (C) 2006 - 2008 FRESCOR consortium partners:                 //
4 //                                                                        //
5 //   Universidad de Cantabria,              SPAIN                         //
6 //   University of York,                    UK                            //
7 //   Scuola Superiore Sant'Anna,            ITALY                         //
8 //   Kaiserslautern University,             GERMANY                       //
9 //   Univ. Politécnica  Valencia,           SPAIN                        //
10 //   Czech Technical University in Prague,  CZECH REPUBLIC                //
11 //   ENEA                                   SWEDEN                        //
12 //   Thales Communication S.A.              FRANCE                        //
13 //   Visual Tools S.A.                      SPAIN                         //
14 //   Rapita Systems Ltd                     UK                            //
15 //   Evidence                               ITALY                         //
16 //                                                                        //
17 //   See http://www.frescor.org for a link to partners' websites          //
18 //                                                                        //
19 //          FRESCOR project (FP6/2005/IST/5-034026) is funded             //
20 //       in part by the European Union Sixth Framework Programme          //
21 //       The European Union is not liable of any use that may be          //
22 //       made of this code.                                               //
23 //                                                                        //
24 //                                                                        //
25 // based on previous work (FSF) done in the FIRST project                 //
26 //                                                                        //
27 //  Copyright (C) 2005  Mälardalen University, SWEDEN                    //
28 //                      Scuola Superiore S.Anna, ITALY                    //
29 //                      Universidad de Cantabria, SPAIN                   //
30 //                      University of York, UK                            //
31 //                                                                        //
32 //  FSF API web pages: http:marte.unican.es/fsf/docs                      //
33 //                     http:shark.sssup.it/contrib/first/docs/            //
34 //                                                                        //
35 //  This file is part of FORB (Frescor Object Request Broker)             //
36 //                                                                        //
37 // FORB is free software; you can redistribute it and/or modify it        //
38 // under terms of the GNU General Public License as published by the      //
39 // Free Software Foundation; either version 2, or (at your option) any    //
40 // later version.  FORB is distributed in the hope that it will be        //
41 // useful, but WITHOUT ANY WARRANTY; without even the implied warranty    //
42 // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU    //
43 // General Public License for more details. You should have received a    //
44 // copy of the GNU General Public License along with FORB; see file       //
45 // COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,  //
46 // Cambridge, MA 02139, USA.                                              //
47 //                                                                        //
48 // As a special exception, including FORB header files in a file,         //
49 // instantiating FORB generics or templates, or linking other files       //
50 // with FORB objects to produce an executable application, does not       //
51 // by itself cause the resulting executable application to be covered     //
52 // by the GNU General Public License. This exception does not             //
53 // however invalidate any other reasons why the executable file might be  //
54 // covered by the GNU Public License.                                     //
55 ////////////////////////////////////////////////////////////////////////////
56
57 /**
58  * @file   fra.idl
59  * @author Michal Sojka <sojkam1@fel.cvut.cz>
60  * @date   Thu Nov 13 14:05:39 2008
61  * 
62  * @brief  FORB interface to resource allocator
63  * 
64  * 
65  */
66 #ifndef _FRA_IDL
67 #define _FRA_IDL
68
69 #include "../contract/fres_contract_idl.idl"
70
71 module fres {
72         /**
73          * Interface to the allocator
74          * 
75          */
76         interface resource_allocator {
77                 /**
78                  * Creates or changes VRESes.
79                  * 
80                  * This method is called after the contracts are
81                  * negotiated with the resource manager. The manager
82                  * together with the contract broker ensure that the
83                  * state after applying the changes specified by @a
84                  * schedulable_contracts parameter is schedulable. It
85                  * is up to the allocator to apply the changes in such
86                  * way that schedulability is maintained during the
87                  * change. The changes are received in the same order
88                  * as returned by the manager, so if the manager
89                  * already prepares the order of aplying changes, the
90                  * allocator can use it.
91                  *
92                  * @param schedulable_contracts Contracts for VRESes
93                  * to be created or (if they already exist)
94                  * changed.
95                  * 
96                  * @return Zero on success, non-zero error number in
97                  * case of error.
98                  */
99                 long change_vreses(in contract::ptr_seq schedulable_contracts);
100                 /** 
101                  * Cancel VRESes given by their IDs.
102                  * 
103                  * @param ids
104                  *
105                  * @return Zero on success, non-zero error code on error.
106                  */
107                 long cancel_vreses(in contract::id_seq ids);
108         };
109 };
110
111 #endif