S4U_VirtualMachine.h
1 
11 #ifndef WRENCH_S4U_VIRTUALMACHINE_H
12 #define WRENCH_S4U_VIRTUALMACHINE_H
13 
14 #include <simgrid/s4u/VirtualMachine.hpp>
15 
16 namespace wrench {
17 
18  /***********************/
20  /***********************/
21 
26 
27  public:
28  S4U_VirtualMachine(const std::string &vm_hostname,
29  const std::string &pm_hostname,
30  unsigned long num_cores,
31  double ram_memory);
32 
33  simgrid::s4u::VirtualMachine *get();
34 
35  simgrid::s4u::Host *getPm();
36 
37  void start();
38 
39  void suspend();
40 
41  void resume();
42 
43  void shutdown();
44 
45  void stop();
46 
47  bool isRunning();
48 
49  bool isSuspended();
50 
51  private:
53  simgrid::s4u::VirtualMachine *vm;
54  };
55 
56  /***********************/
58  /***********************/
59 }
60 
61 #endif //WRENCH_S4U_VIRTUALMACHINE_H
void stop()
Stop the virtual machine.
Definition: S4U_VirtualMachine.cpp:85
S4U_VirtualMachine(const std::string &vm_hostname, const std::string &pm_hostname, unsigned long num_cores, double ram_memory)
Constructor.
Definition: S4U_VirtualMachine.cpp:24
bool isRunning()
Check whether the VM is running.
Definition: S4U_VirtualMachine.cpp:93
simgrid::s4u::Host * getPm()
Get a pointer to the physical machine host.
Definition: S4U_VirtualMachine.cpp:50
void shutdown()
Shutdown the virtual machine.
Definition: S4U_VirtualMachine.cpp:78
A wrapper for the simgrid::s4u::VirtualMachine class.
Definition: S4U_VirtualMachine.h:25
void start()
Start the virtual machine.
Definition: S4U_VirtualMachine.cpp:57
void suspend()
Suspend the virtual machine.
Definition: S4U_VirtualMachine.cpp:64
void resume()
Resume the virtual machine.
Definition: S4U_VirtualMachine.cpp:71
bool isSuspended()
Check whether the VM is suspended.
Definition: S4U_VirtualMachine.cpp:101
Definition: TerminalOutput.cpp:15