} s_surf_model_extension_workstation_t;
-
-
+typedef struct surf_vm_workstation_model_extension_public {
+ s_surf_model_extension_workstation_t basic;
+ 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
* \brief Model datatype
s_surf_model_extension_network_t network;
s_surf_model_extension_storage_t storage;
s_surf_model_extension_workstation_t workstation;
+ // TODO Implement the corresponding model
+ s_surf_model_extension_vm_workstation_t vm_workstation;
/*******************************************/
/* TUTORIAL: New model */
s_surf_model_extension_new_model_t new_model;
*/
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
*