*************/
/** @ingroup SURF_callbacks
- * @brief Callbacks handler which emit the callbacks after Host creation *
- * @details Callback functions have the following signature: `void(HostPtr)`
+ * @brief Callbacks fired after Host creation. Signature: `void(Host*)`
*/
XBT_PUBLIC_DATA(surf_callback(void, Host*)) hostCreatedCallbacks;
/** @ingroup SURF_callbacks
- * @brief Callbacks handler which emit the callbacks after Host destruction *
- * @details Callback functions have the following signature: `void(HostPtr)`
+ * @brief Callbacks fired Host destruction. Signature: `void(Host*)`
*/
XBT_PUBLIC_DATA(surf_callback(void, Host*)) hostDestructedCallbacks;
/** @ingroup SURF_callbacks
- * @brief Callbacks handler which emit the callbacks after Host State changed *
- * @details Callback functions have the following signature: `void(HostAction *action, e_surf_resource_state_t old, e_surf_resource_state_t current)`
+ * @brief Callbacks fired after Host State changed. Signature: `void(Host *, e_surf_resource_state_t old, e_surf_resource_state_t current)`
*/
XBT_PUBLIC_DATA(surf_callback(void, Host*, e_surf_resource_state_t, e_surf_resource_state_t)) hostStateChangedCallbacks;
/** @ingroup SURF_callbacks
- * @brief Callbacks handler which emit the callbacks after HostAction State changed *
- * @details Callback functions have the following signature: `void(HostAction *action, e_surf_resource_state_t old, e_surf_resource_state_t current)`
+ * @brief Callbacks fired HostAction State changed. Signature: `void(HostAction *, e_surf_action_state_t old, e_surf_action_state_t current)`
*/
XBT_PUBLIC_DATA(surf_callback(void, HostAction*, e_surf_action_state_t, e_surf_action_state_t)) hostActionStateChangedCallbacks;
*/
class HostModel : public Model {
public:
- /**
- * @brief HostModel constructor
- *
- * @param name the name of the model
- */
+ /** @brief Constructor */
HostModel(const char *name);
- /** @brief HostModel constructor */
+ /** @brief Constructor */
HostModel();
- /** @brief HostModel destructor */
+ /** @brief Destructor */
~HostModel();
virtual Host *createHost(const char *name)=0;
void addTraces(){DIE_IMPOSSIBLE;}
- /**
- * @brief [brief description]
- * @details [long description]
- */
virtual void adjustWeightOfDummyCpuActions();
-
- /**
- * @brief [brief description]
- * @details [long description]
- *
- * @param host_nb [description]
- * @param host_list [description]
- * @param flops_amount [description]
- * @param bytes_amount [description]
- * @param rate [description]
- * @return [description]
- */
virtual Action *executeParallelTask(int host_nb,
void **host_list,
double *flops_amount,
double *bytes_amount,
double rate)=0;
- /**
- * @brief [brief description]
- * @details [long description]
- *
- * @param src [description]
- * @param dst [description]
- * @param size [description]
- * @param rate [description]
- * @return [description]
- */
- virtual Action *communicate(Host *src, Host *dst, double size, double rate)=0;
-
- CpuModel *p_cpuModel;
+ virtual Action *communicate(Host *src, Host *dst, double size, double rate)=0;
+
+ CpuModel *p_cpuModel;
};
/************
xbt_lib_set(host_lib, name, SURF_HOST_LEVEL, wk);
- return wk;//FIXME:xbt_lib_get_elm_or_null(host_lib, name);
+ return wk;
}
Action *HostL07Model::communicate(Host *src, Host *dst,
tmgr_trace_t bw_trace,
double lat_initial,
tmgr_trace_t lat_trace,
- e_surf_resource_state_t
- state_initial,
+ e_surf_resource_state_t state_initial,
tmgr_trace_t state_trace,
e_surf_link_sharing_policy_t policy,
xbt_dict_t properties)
{
xbt_assert(!Link::byName(name),
- "Link '%s' declared several times in the platform file.",
- name);
+ "Link '%s' declared several times in the platform file.", name);
- LinkL07 *nw_link = new LinkL07(this, name, properties,
- bw_initial, bw_trace,
- lat_initial, lat_trace,
- state_initial, state_trace,
- policy);
-
- return nw_link;
+ return new LinkL07(this, name, properties,
+ bw_initial, bw_trace,
+ lat_initial, lat_trace,
+ state_initial, state_trace,
+ policy);
}
void HostL07Model::addTraces()
return;
}
-void LinkL07::updateState(tmgr_trace_event_t event_type, double value, double date){
+void LinkL07::updateState(tmgr_trace_event_t event_type, double value, double date) {
XBT_DEBUG("Updating link %s (%p) with value=%f for date=%g", getName(), this, value, date);
if (event_type == p_bwEvent) {
updateBandwidth(value, date);
return;
}
-e_surf_resource_state_t HostL07::getState()
-{
+e_surf_resource_state_t HostL07::getState() {
return p_cpu->getState();
}
*************/
/** @ingroup SURF_callbacks
- * @brief Callbacks handler which emit the callbacks after VM creation *
- * @details Callback functions have the following signature: `void(VMPtr)`
+ * @brief Callbacks fired after VM creation. Signature: `void(VM*)`
*/
extern surf_callback(void, VM*) VMCreatedCallbacks;
/** @ingroup SURF_callbacks
- * @brief Callbacks handler which emit the callbacks after VM destruction *
- * @details Callback functions have the following signature: `void(VMPtr)`
+ * @brief Callbacks fired after VM destruction. Signature: `void(VM*)`
*/
extern surf_callback(void, VM*) VMDestructedCallbacks;
/** @ingroup SURF_callbacks
- * @brief Callbacks handler which emit the callbacks after VM State changed *
- * @details Callback functions have the following signature: `void(VMActionPtr)`
+ * @brief Callbacks after VM State changes. Signature: `void(VMAction*)`
*/
extern surf_callback(void, VM*) VMStateChangedCallbacks;
virtual VM *createVM(const char *name, surf_resource_t host_PM)=0;
void adjustWeightOfDummyCpuActions() {};
- typedef boost::intrusive::list<VM,
- boost::intrusive::constant_time_size<false> >
- vm_list_t;
+ typedef boost::intrusive::list<VM, boost::intrusive::constant_time_size<false> > vm_list_t;
static vm_list_t ws_vms;
};
void setState(e_surf_resource_state_t state);
- /**
- * @brief Suspend the VM
- */
+ /** @brief Suspend the VM */
virtual void suspend()=0;
- /**
- * @brief Resume the VM
- */
+ /** @brief Resume the VM */
virtual void resume()=0;
- /**
- * @brief Save the VM (Not yet implemented)
- */
+ /** @brief Save the VM (Not yet implemented) */
virtual void save()=0;
- /**
- * @brief Restore the VM (Not yet implemented)
- */
+ /** @brief Restore the VM (Not yet implemented) */
virtual void restore()=0;
- /**
- * @brief Migrate the VM to the destination host
+ /** @brief Migrate the VM to the destination host
*
* @param ind_vm_ws_dest The destination host
*/
virtual void migrate(surf_resource_t ind_vm_ws_dest)=0;
- /**
- * @brief Get the physical machine hosting the VM
- * @return The physical machine hosting the VM
- */
+ /** @brief Get the physical machine hosting the VM */
virtual surf_resource_t getPm()=0;
virtual void setBound(double bound)=0;