Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'torus'
[simgrid.git] / src / surf / vm_workstation_interface.hpp
index 7217b9f..ec334ac 100644 (file)
@@ -1,9 +1,9 @@
-/*
- * vm_workstation.hpp
- *
- *  Created on: Nov 12, 2013
- *      Author: bedaride
- */
+/* Copyright (c) 2004-2013. The SimGrid Team.
+ * All rights reserved.                                                     */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
 #include "workstation_interface.hpp"
 
 #ifndef VM_WORKSTATION_INTERFACE_HPP_
@@ -30,12 +30,32 @@ typedef WorkstationVMLmm *WorkstationVMLmmPtr;
 /*********
  * Model *
  *********/
-
+/** @ingroup SURF_vm_workstation_interface
+ * @brief SURF workstation VM model interface class
+ * @details A model is an object which handle the interactions between its Resources and its Actions
+ */
 class WorkstationVMModel : public WorkstationModel {
 public:
+  /**
+   * @brief WorkstationVMModel consrtuctor
+   */
   WorkstationVMModel();
+
+    /**
+   * @brief WorkstationVMModel consrtuctor
+   */
   ~WorkstationVMModel(){};
+
+  /**
+   * @brief Create a new WorkstationVM
+   * 
+   * @param name The name of the new WorkstationVM
+   * @param ind_phys_workstation The workstation hosting the VM
+   * 
+   */
   virtual void createResource(const char *name, void *ind_phys_workstation)=0;
+
+
   void adjustWeightOfDummyCpuActions() {};
 };
 
@@ -43,22 +63,62 @@ public:
  * Resource *
  ************/
 
+/** @ingroup SURF_vm_workstation_interface
+ * @brief SURF workstation VM interface class
+ * @details A workstation VM represent an virtual machine
+ */
 class WorkstationVM : public Workstation {
 public:
+  /**
+   * @brief WorkstationVM consrtructor
+   * 
+   * @param model WorkstationModel associated to this Workstation
+   * @param name The name of the Workstation
+   * @param props Dictionary of properties associated to this Workstation
+   * @param netElm The RoutingEdge associated to this Workstation
+   * @param cpu The Cpu associated to this Workstation
+   */
   WorkstationVM(ModelPtr model, const char *name, xbt_dict_t props,
                        RoutingEdgePtr netElm, CpuPtr cpu)
   : Workstation(model, name, props, NULL, netElm, cpu) {}
+
+  /**
+   * @brief WdorkstationVM estructor
+   */
   ~WorkstationVM();
 
+  /**
+   * @brief Suspend the VM
+   */
   virtual void suspend()=0;
+
+  /**
+   * @brief Resume the VM
+   */
   virtual void resume()=0;
 
+  /**
+   * @brief Save the VM (Not yet implemented)
+   */
   virtual void save()=0;
+
+  /**
+   * @brief Restore the VM (Not yet implemented)
+   */
   virtual void restore()=0;
 
-  virtual void migrate(surf_resource_t ind_vm_ws_dest)=0; // will be vm_ws_migrate()
+  /**
+   * @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;
 
-  virtual surf_resource_t getPm()=0; // will be vm_ws_get_pm()
+  /**
+   * @brief Get the physical machine hosting the VM
+   * @return The physical machine hosting the VM
+   */
+  virtual surf_resource_t getPm()=0;
 
   virtual void setBound(double bound)=0;
   virtual void setAffinity(CpuPtr cpu, unsigned long mask)=0;
@@ -69,7 +129,6 @@ public:
   e_surf_vm_state_t p_currentState;
 };
 
-
 /**********
  * Action *
  **********/