4 * Created on: Nov 12, 2013
7 #include "vm_workstation_interface.hpp"
8 #include "workstation_clm03.hpp"
10 #ifndef VM_WORKSTATION_HPP_
11 #define VM_WORKSTATION_HPP_
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.
16 void surf_vm_workstation_model_init(void);
22 class WorkstationVMHL13Model;
23 typedef WorkstationVMHL13Model *WorkstationVMHL13ModelPtr;
25 class WorkstationVMHL13Lmm;
26 typedef WorkstationVMHL13Lmm *WorkstationVMHL13LmmPtr;
35 class WorkstationVMHL13Model : public WorkstationVMModel, public WorkstationCLM03Model {
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);
50 class WorkstationVMHL13Lmm : public WorkstationVMLmm, public WorkstationCLM03Lmm {
52 WorkstationVMHL13Lmm(WorkstationVMModelPtr model, const char* name, xbt_dict_t props, surf_resource_t ind_phys_workstation);
53 ~WorkstationVMHL13Lmm();
61 void migrate(surf_resource_t ind_dst_pm);
63 e_surf_resource_state_t getState();
64 void setState(e_surf_resource_state_t state);
66 surf_resource_t getPm(); // will be vm_ws_get_pm()
68 void setBound(double bound);
69 void setAffinity(CpuLmmPtr cpu, unsigned long mask);
72 void updateState(tmgr_trace_event_t event_type, double value, double date) {
73 WorkstationCLM03Lmm::updateState(event_type, value, date);
76 return WorkstationCLM03Lmm::isUsed();
78 xbt_dict_t getProperties() {
79 return WorkstationCLM03Lmm::getProperties();
81 ActionPtr execute(double size);
89 #endif /* VM_WORKSTATION_HPP_ */