X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ad0cb80ebff7603232ec1621d9b6cfa1ea3471f6..878020909e91d141e57373397d8dede76c5fde03:/include/simgrid/Host.hpp diff --git a/include/simgrid/Host.hpp b/include/simgrid/Host.hpp index e1d2999faa..d8d68c83fe 100644 --- a/include/simgrid/Host.hpp +++ b/include/simgrid/Host.hpp @@ -13,18 +13,30 @@ #include #include -#include #include +#include + namespace simgrid { -XBT_PUBLIC_CLASS Host : public simgrid::xbt::Facetable { +XBT_PUBLIC_CLASS Host : +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 id_; + simgrid::xbt::string name_ = "noname"; public: - Host(std::string const& id); + Host(std::string const& name); ~Host(); - simgrid::xbt::string const& id() const { return id_; } + simgrid::xbt::string const& getName() const { return name_; } + void on(); + void off(); static Host* by_name_or_null(const char* name); static Host* by_name_or_create(const char* name); };