]> rtime.felk.cvut.cz Git - frescor/frsh.git/blob - fres/resmng/frm.idl
Merge branch 'master' of rtime.felk.cvut.cz:/var/git/frescor/frsh_forb.git
[frescor/frsh.git] / fres / resmng / frm.idl
1 /**
2  * @file   frm.idl
3  * @author Michal Sojka <sojkam1@fel.cvut.cz>
4  * @date   Sat Oct 25 21:57:56 2008
5  * 
6  * @brief  FORB interface of resource manager
7  * 
8  * 
9  */
10 #ifndef _FRM_IDL
11 #define _FRM_IDL
12
13 #include "../contract/fres_contract_idl.idl"
14
15 module fres {
16         /** Resource manager */
17         interface resource_manager {
18                 /** 
19                  * Executes admission test and if the contracts are
20                  * accepted, they are put to "reserved" state.
21                  *
22                  * @todo If a contract is in the "reserved" state, and
23                  * reserve_contracts() is called again with the same
24                  * contract, the previously reserved contract should
25                  * be replaced with the new one.
26                  * 
27                  * @param contracts New contracts to be reserved.
28                  * 
29                  * @return
30                  * - Zero if reservation (admisson test) was successfull,
31                  * - one if admission test was not successfull and
32                  * - negative error code if an error occured.
33                  */
34                 long reserve_contracts(in contract::ptr_seq contracts);
35
36                 /** 
37                  * Puts contracts with given IDs to the "commited"
38                  * state and sends back the changes to VRESes to reach
39                  * the new state.
40                  *
41                  * @param[in] ids IDs of contracts to be commited.
42                  * 
43                  * @param[out] schedulable_contracts Schedulable
44                  * contracts, for new or changed VRESes. These
45                  * contract may be extened by one or more data blocks
46                  * for use by the scheduler. The scheduler receives
47                  * the contracts in the same order as they are
48                  * returned.
49                  */
50                 void commit_contracts(in contract::id_seq ids,
51                                       out contract::ptr_seq schedulable_contracts);
52                 void cancel_contracts(in contract::id_seq ids);
53         };
54 };
55
56 #endif