typedef struct surf_vm_workstation_model_extension_public {
s_surf_model_extension_workstation_t basic;
- void* (*create) (const char *name, void *workstation); // First operation of the VM model
- void (*destroy) (const char *name); // destory the vm-specific data
+ void* (*create) (const char *name, void *ind_phys_workstation); // First operation of the VM model
+ // start does not appear here as it corresponds to turn the state from created to running (see smx_vm.c)
+ int (*get_state) (void *ind_phys_workstation);
+ void (*set_state) (void *ind_phys_workstation, int state);
+ void (*destroy) (void *ind_phys_workstation); // will be vm_ws_destroy(), which destroies the vm-specific data
} s_surf_model_extension_vm_workstation_t;
/** \ingroup SURF_models
*/
XBT_PUBLIC_DATA(surf_model_t) surf_workstation_model;
+/** \ingroup SURF_models
+ * \brief The vm_workstation model
+ *
+ * Note that when you create an API on top of SURF,
+ * the vm_workstation model should be the only one you use
+ * because depending on the platform model, the network model and the CPU model
+ * may not exist.
+ */
+XBT_PUBLIC_DATA(surf_model_t) surf_vm_workstation_model;
+
/** \ingroup SURF_models
* \brief Initializes the platform with a compound workstation model
*