SimGrid  3.12
Versatile Simulation of Distributed Systems
VM Class Referenceabstract

SURF VM interface class. More...

#include <vm_interface.hpp>

Inheritance diagram for VM:
Host Resource

Public Member Functions

 VM (Model *model, const char *name, xbt_dict_t props, RoutingEdge *netElm, Cpu *cpu)
 Constructor. More...
 
 ~VM ()
 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 dest_PM)=0
 Migrate the VM to the destination host.
 
virtual surf_resource_t getPm ()=0
 Get the physical machine hosting the VM.
 
- Public Member Functions inherited from Host
 Host (Model *model, const char *name, xbt_dict_t props, xbt_dynar_t storage, RoutingEdge *netElm, Cpu *cpu)
 Host constructor. More...
 
 Host (Model *model, const char *name, xbt_dict_t props, lmm_constraint_t constraint, xbt_dynar_t storage, RoutingEdge *netElm, Cpu *cpu)
 Host constructor. More...
 
 ~Host ()
 Host destructor.
 
xbt_dict_t getProperties ()
 Get the properties of the current Host. More...
 
virtual Actionexecute (double flops_amount)=0
 Execute some quantity of computation. More...
 
virtual Actionsleep (double duration)=0
 Make a process sleep for duration seconds. More...
 
virtual StoragefindStorageOnMountList (const char *storage)
 Return the storage of corresponding mount point.
 
virtual xbt_dict_t getMountedStorageList ()
 Get the xbt_dict_t of mount_point: Storage.
 
virtual xbt_dynar_t getAttachedStorageList ()
 Get the xbt_dynar_t of storages attached to the Host.
 
virtual Actionopen (const char *fullpath)
 Open a file. More...
 
virtual Actionclose (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 Actionread (surf_file_t fd, sg_size_t size)
 Read a file. More...
 
virtual Actionwrite (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 Host.
 
void getParams (vm_params_t params)
 Retrieve a copy of the parameters of that VM/PM. More...
 
void setParams (vm_params_t params)
 Sets the params of that VM/PM.
 
- Public Member Functions inherited from Resource
 Resource ()
 Resource constructor.
 
 Resource (Model *model, const char *name, xbt_dict_t props)
 Resource constructor. More...
 
 Resource (Model *model, const char *name, xbt_dict_t props, lmm_constraint_t constraint)
 Resource constructor. More...
 
 Resource (Model *model, const char *name, xbt_dict_t props, e_surf_resource_state_t stateInit)
 Resource constructor. More...
 
virtual ~Resource ()
 Resource destructor.
 
ModelgetModel ()
 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 VM interface class.

A VM represent a virtual machine

Constructor & Destructor Documentation

VM::VM ( Model model,
const char *  name,
xbt_dict_t  props,
RoutingEdge netElm,
Cpu cpu 
)

Constructor.

Parameters
modelVMModel associated to this VM
nameThe name of the VM
propsDictionary of properties associated to this VM
netElmThe RoutingEdge associated to this VM
cpuThe Cpu associated to this VM

Member Function Documentation

void VM::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 Host.


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