1 ////////////////////////////////////////////////////////////////////////////
2 // ---------------------------------------------------------------------- //
3 // Copyright (C) 2006 - 2008 FRESCOR consortium partners: //
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 //
12 // Thales Communication S.A. FRANCE //
13 // Visual Tools S.A. SPAIN //
14 // Rapita Systems Ltd UK //
17 // See http://www.frescor.org for a link to partners' websites //
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. //
25 // based on previous work (FSF) done in the FIRST project //
27 // Copyright (C) 2005 Mälardalen University, SWEDEN //
28 // Scuola Superiore S.Anna, ITALY //
29 // Universidad de Cantabria, SPAIN //
30 // University of York, UK //
32 // FSF API web pages: http:marte.unican.es/fsf/docs //
33 // http:shark.sssup.it/contrib/first/docs/ //
35 // This file is part of FORB (Frescor Object Request Broker) //
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. //
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 ////////////////////////////////////////////////////////////////////////////
59 * @author Michal Sojka <sojkam1@fel.cvut.cz>
60 * @date Thu Nov 13 14:05:39 2008
62 * @brief FORB interface to resource allocator
69 #include "../contract/fres_contract_idl.idl"
73 * Interface to the allocator
76 interface resource_allocator {
78 * Creates or changes VRESes.
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.
92 * @param schedulable_contracts Contracts for VRESes
93 * to be created or (if they already exist)
96 * @return Zero on success, non-zero error number in
99 long change_vreses(in contract::ptr_seq schedulable_contracts);
101 * Cancel VRESes given by their IDs.
105 * @return Zero on success, non-zero error code on error.
107 long cancel_vreses(in contract::id_seq ids);