X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/54e35ebda7e4ffacd769653b8ebb8ba93c7298bf..d89d9da3b19df5523db58584607c0c6a2859d7ab:/src/surf/vm_hl13.hpp diff --git a/src/surf/vm_hl13.hpp b/src/surf/vm_hl13.hpp index 41b06ef800..3bcd9b85c3 100644 --- a/src/surf/vm_hl13.hpp +++ b/src/surf/vm_hl13.hpp @@ -1,11 +1,13 @@ -/* Copyright (c) 2013-2014. The SimGrid Team. +/* Copyright (c) 2013-2015. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ +#include "xbt/base.h" + #include "host_clm03.hpp" -#include "vm_interface.hpp" +#include "virtual_machine.hpp" #ifndef SURF_VM_HPP_ #define SURF_VM_HPP_ @@ -13,12 +15,15 @@ #define GUESTOS_NOISE 100 // This value corresponds to the cost of the global action associated to the VM // It corresponds to the cost of a VM running no tasks. +namespace simgrid { +namespace surf { + /*********** * Classes * ***********/ -class VMHL13Model; -class VMHL13; +class XBT_PRIVATE VMHL13Model; +class XBT_PRIVATE VMHL13; /********* * Model * @@ -28,53 +33,38 @@ public: VMHL13Model(); ~VMHL13Model(){}; - VM *createVM(const char *name, surf_resource_t host_PM); - double shareResources(double now); - void adjustWeightOfDummyCpuActions() {}; - Action *communicate(Host *src, Host *dst, double size, double rate); - Action *executeParallelTask(int host_nb, - void **host_list, - double *flops_amount, - double *bytes_amount, - double rate); - void updateActionsState(double /*now*/, double /*delta*/); + VirtualMachine *createVM(const char *name, sg_host_t host_PM) override; + double next_occuring_event(double now) override; + void adjustWeightOfDummyCpuActions() override {}; + void updateActionsState(double /*now*/, double /*delta*/) override; }; /************ * Resource * ************/ -class VMHL13 : public VM { +class VMHL13 : public VirtualMachine { public: - VMHL13(VMModel *model, const char* name, xbt_dict_t props, surf_resource_t host_PM); + VMHL13(VMModel *model, const char* name, sg_host_t host_PM); ~VMHL13(); - void suspend(); - void resume(); - - void save(); - void restore(); - - void migrate(surf_resource_t ind_dst_pm); + void suspend() override; + void resume() override; - e_surf_resource_state_t getState(); - void setState(e_surf_resource_state_t state); + void save() override; + void restore() override; - surf_resource_t getPm(); // will be vm_ws_get_pm() + void migrate(sg_host_t ind_dst_pm) override; - void setBound(double bound); - void setAffinity(Cpu *cpu, unsigned long mask); - - //FIXME: remove - void updateState(tmgr_trace_event_t event_type, double value, double date); - bool isUsed(); - - Action *execute(double size); - Action *sleep(double duration); + void setBound(double bound) override; + void setAffinity(Cpu *cpu, unsigned long mask) override; }; /********** * Action * **********/ +} +} + #endif /* SURF_VM_HPP_ */