+/**
+ * @file frm.idl
+ * @author Michal Sojka <sojkam1@fel.cvut.cz>
+ * @date Sat Oct 25 21:57:56 2008
+ *
+ * @brief FORB interface of resource manager
+ *
+ *
+ */
#ifndef _FRM_IDL
#define _FRM_IDL
#include "../contract/fres_contract_idl.idl"
module fres {
+ /** Resource manager */
interface resource_manager {
+ /**
+ * Executes admission test and if the contracts are
+ * accepted, they are put to "reserved" state.
+ *
+ * @todo If a contract is in the "reserved" state, and
+ * reserve_contracts() is called again with the same
+ * contract, the previously reserved contract should
+ * be replaced with the new one.
+ *
+ * @param contracts New contracts to be reserved.
+ *
+ * @return
+ * - Zero if reservation (admisson test) was successfull,
+ * - one if admission test was not successfull and
+ * - negative error code if an error occured.
+ */
long reserve_contracts(in contract::ptr_seq contracts);
+
+ /**
+ * Put contracts with gived IDs to "commited" state.
+ *
+ * @todo If some contract is in "commited" state, any
+ * change to this contract must go through mode chage
+ * protocol.
+ *
+ * @param[in] ids IDs of contracts to be commited.
+ *
+ * @param[out] contracts_with_scheduling_data Commited
+ * contracts with (possibly added data block(s) for
+ * scheduler).
+ */
void commit_contracts(in contract::id_seq ids,
- out contract::ptr_seq contract_with_scheduler_data);
+ out contract::ptr_seq contracts_with_scheduling_data);
void cancel_contracts(in contract::id_seq ids);
};
};