SimGrid  3.11
Versatile Simulation of Distributed Systems
WorkstationVM Class Referenceabstract

SURF workstation VM interface class. More...

#include <vm_workstation_interface.hpp>

Inheritance diagram for WorkstationVM:
Workstation Resource

Public Member Functions

 WorkstationVM (ModelPtr model, const char *name, xbt_dict_t props, RoutingEdgePtr netElm, CpuPtr cpu)
 WorkstationVM consrtructor. More...
 
 ~WorkstationVM ()
 WdorkstationVM destructor.
 
void setState (e_surf_resource_state_t state)
 Set the state of the current Resource. More...
 
virtual void suspend ()=0
 Suspend the VM.
 
virtual void resume ()=0
 Resume the VM.
 
virtual void save ()=0
 Save the VM (Not yet implemented)
 
virtual void restore ()=0
 Restore the VM (Not yet implemented)
 
virtual void migrate (surf_resource_t ind_vm_ws_dest)=0
 Migrate the VM to the destination host. More...
 
virtual surf_resource_t getPm ()=0
 Get the physical machine hosting the VM. More...
 
- Public Member Functions inherited from Workstation
 Workstation ()
 Workstation consrtuctor.
 
 Workstation (ModelPtr model, const char *name, xbt_dict_t props, xbt_dynar_t storage, RoutingEdgePtr netElm, CpuPtr cpu)
 Workstation constructor. More...
 
 Workstation (ModelPtr model, const char *name, xbt_dict_t props, lmm_constraint_t constraint, xbt_dynar_t storage, RoutingEdgePtr netElm, CpuPtr cpu)
 Workstation constructor. More...
 
 ~Workstation ()
 Workstation destructor.
 
void setState (e_surf_resource_state_t state)
 Set the state of the current Resource. More...
 
xbt_dict_t getProperties ()
 Get the properties of the currenrt Workstation. More...
 
virtual ActionPtr execute (double size)=0
 Execute some quantity of computation. More...
 
virtual ActionPtr sleep (double duration)=0
 Make a process sleep for duration seconds. More...
 
virtual int getCore ()
 Get the number of cores of the associated Cpu. More...
 
virtual double getSpeed (double load)
 Get the speed of the associated Cpu. More...
 
virtual double getAvailableSpeed ()
 Get the available speed of the associated Cpu. More...
 
virtual double getCurrentPowerPeak ()
 Get the associated Cpu power peak. More...
 
virtual StoragePtr findStorageOnMountList (const char *storage)
 Return the storage of corresponding mount point. More...
 
virtual xbt_dict_t getMountedStorageList ()
 Get the xbt_dict_t of mount_point: Storage. More...
 
virtual xbt_dynar_t getAttachedStorageList ()
 Get the xbt_dynar_t of storages attached to the workstation. More...
 
virtual ActionPtr open (const char *fullpath)
 Open a file. More...
 
virtual ActionPtr close (surf_file_t fd)
 Close a file. More...
 
virtual int unlink (surf_file_t fd)
 Unlink a file. More...
 
virtual sg_size_t getSize (surf_file_t fd)
 Get the size in bytes of the file. More...
 
virtual ActionPtr read (surf_file_t fd, sg_size_t size)
 Read a file. More...
 
virtual ActionPtr write (surf_file_t fd, sg_size_t size)
 Write a file. More...
 
virtual xbt_dynar_t getInfo (surf_file_t fd)
 Get the informations of a file descriptor. More...
 
virtual sg_size_t fileTell (surf_file_t fd)
 Get the current position of the file descriptor. More...
 
virtual int fileSeek (surf_file_t fd, sg_offset_t offset, int origin)
 Set the position indicator associated with the file descriptor to a new position. More...
 
virtual int fileMove (surf_file_t fd, const char *fullpath)
 Move a file to another location on the same mount point. More...
 
xbt_dynar_t getVms ()
 Get the list of virtual machines on the current Workstation. More...
 
void getParams (ws_params_t params)
 [brief description] More...
 
void setParams (ws_params_t params)
 [brief description] More...
 
- Public Member Functions inherited from Resource
 Resource ()
 Resource constructor.
 
 Resource (ModelPtr model, const char *name, xbt_dict_t props)
 Resource constructor. More...
 
 Resource (ModelPtr model, const char *name, xbt_dict_t props, lmm_constraint_t constraint)
 Resource constructor. More...
 
 Resource (ModelPtr model, const char *name, xbt_dict_t props, e_surf_resource_state_t stateInit)
 Resource constructor. More...
 
virtual ~Resource ()
 Resource destructor.
 
ModelPtr getModel ()
 Get the Model of the current Resource. More...
 
const char * getName ()
 Get the name of the current Resource. More...
 
virtual void updateState (tmgr_trace_event_t event_type, double value, double date)=0
 Update the state of the current Resource. More...
 
virtual bool isUsed ()=0
 Check if the current Resource is used. More...
 
bool isOn ()
 Check if the current Resource is active. More...
 
void turnOn ()
 Turn on the current Resource.
 
void turnOff ()
 Turn off the current Resource.
 
virtual e_surf_resource_state_t getState ()
 Get the state of the current Resource. More...
 
lmm_constraint_t getConstraint ()
 Get the lmm constraint associated to this Resource if it is part of a LMM component. More...
 

Detailed Description

SURF workstation VM interface class.

A workstation VM represent an virtual machine

Constructor & Destructor Documentation

WorkstationVM::WorkstationVM ( ModelPtr  model,
const char *  name,
xbt_dict_t  props,
RoutingEdgePtr  netElm,
CpuPtr  cpu 
)

WorkstationVM consrtructor.

Parameters
modelWorkstationModel associated to this Workstation
nameThe name of the Workstation
propsDictionary of properties associated to this Workstation
netElmThe RoutingEdge associated to this Workstation
cpuThe Cpu associated to this Workstation

Member Function Documentation

void WorkstationVM::setState ( e_surf_resource_state_t  state)
virtual

Set the state of the current Resource.

Parameters
stateThe new state of the current Resource

Reimplemented from Resource.

virtual void WorkstationVM::migrate ( surf_resource_t  ind_vm_ws_dest)
pure virtual

Migrate the VM to the destination host.

Parameters
ind_vm_ws_destThe destination host
surf_resource_t WorkstationVM::getPm ( )
pure virtual

Get the physical machine hosting the VM.

Returns
The physical machine hosting the VM

The documentation for this class was generated from the following files: