Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Comment unused functions.
[simgrid.git] / src / surf / vm_workstation_hl13.hpp
1 /*
2  * vm_workstation.hpp
3  *
4  *  Created on: Nov 12, 2013
5  *      Author: bedaride
6  */
7 #include "vm_workstation_interface.hpp"
8 #include "workstation_clm03.hpp"
9
10 #ifndef VM_WORKSTATION_HPP_
11 #define VM_WORKSTATION_HPP_
12
13 #define GUESTOS_NOISE 100 // This value corresponds to the cost of the global action associated to the VM
14                           // It corresponds to the cost of a VM running no tasks.
15
16 void surf_vm_workstation_model_init(void);
17
18 /***********
19  * Classes *
20  ***********/
21
22 class WorkstationVMHL13Model;
23 typedef WorkstationVMHL13Model *WorkstationVMHL13ModelPtr;
24
25 class WorkstationVMHL13Lmm;
26 typedef WorkstationVMHL13Lmm *WorkstationVMHL13LmmPtr;
27
28 /*********
29  * Tools *
30  *********/
31
32 /*********
33  * Model *
34  *********/
35 class WorkstationVMHL13Model : public WorkstationVMModel, public WorkstationCLM03Model {
36 public:
37   WorkstationVMHL13Model();
38   ~WorkstationVMHL13Model(){};
39   void createResource(const char *name, void *ind_phys_workstation);
40   double shareResources(double now);
41   void adjustWeightOfDummyCpuActions() {};
42   xbt_dynar_t getRoute(WorkstationPtr src, WorkstationPtr dst);
43   ActionPtr communicate(WorkstationPtr src, WorkstationPtr dst, double size, double rate);
44 };
45
46 /************
47  * Resource *
48  ************/
49
50 class WorkstationVMHL13Lmm : public WorkstationVMLmm, public WorkstationCLM03Lmm {
51 public:
52   WorkstationVMHL13Lmm(WorkstationVMModelPtr model, const char* name, xbt_dict_t props, surf_resource_t ind_phys_workstation);
53   ~WorkstationVMHL13Lmm();
54
55   void suspend();
56   void resume();
57
58   void save();
59   void restore();
60
61   void migrate(surf_resource_t ind_dst_pm);
62
63   e_surf_resource_state_t getState();
64   void setState(e_surf_resource_state_t state);
65
66   surf_resource_t getPm(); // will be vm_ws_get_pm()
67
68   void setBound(double bound);
69   void setAffinity(CpuLmmPtr cpu, unsigned long mask);
70
71   //FIXME: remove
72   void updateState(tmgr_trace_event_t event_type, double value, double date) {
73         WorkstationCLM03Lmm::updateState(event_type, value, date);
74   }
75   bool isUsed() {
76     return WorkstationCLM03Lmm::isUsed();
77   }
78   xbt_dict_t getProperties() {
79     return WorkstationCLM03Lmm::getProperties();
80   }
81   ActionPtr execute(double size);
82
83 };
84
85 /**********
86  * Action *
87  **********/
88
89 #endif /* VM_WORKSTATION_HPP_ */