X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/347f9a2ca55bffc88bf965952b9be3a15535e908..be27c3513d2b7d273749db733659600b10dc0a54:/include/simgrid/Host.hpp diff --git a/include/simgrid/Host.hpp b/include/simgrid/Host.hpp index d4d211a04b..6e1f6c0784 100644 --- a/include/simgrid/Host.hpp +++ b/include/simgrid/Host.hpp @@ -13,19 +13,48 @@ #include #include +#include +#include #include #include +#include + namespace simgrid { XBT_PUBLIC_CLASS Host : - public simgrid::xbt::Extendable { +public simgrid::xbt::Extendable { + +public: + double getSpeed(); + int getCoreAmount(); + + /* FIXME: these should be protected, but it leads to many errors */ + surf::Cpu *p_cpu = nullptr; + surf::NetCard *p_netcard = nullptr; private: - simgrid::xbt::string name_; + simgrid::xbt::string name_ = "noname"; public: Host(std::string const& name); ~Host(); simgrid::xbt::string const& getName() const { return name_; } + void turnOn(); + void turnOff(); + bool isOn(); + bool isOff(); + xbt_dict_t getProperties(); + xbt_swag_t getProcessList(); + double getCurrentPowerPeak(); + double getPowerPeakAt(int pstate_index); + void setPState(int pstate_index); + int getPState(); + double getWattMinAt(int pstate); + double getWattMaxAt(int pstate); + void getParams(vm_params_t params); + void setParams(vm_params_t params); + xbt_dict_t getMountedStorageList(); + xbt_dynar_t getAttachedStorageList(); + static Host* by_name_or_null(const char* name); static Host* by_name_or_create(const char* name); };