#include <xbt/string.hpp>
#include <xbt/Extendable.hpp>
+
namespace simgrid {
XBT_PUBLIC_CLASS Host :
- public simgrid::xbt::Extendable<Host> {
+public simgrid::xbt::Extendable<Host> {
- public:
- surf::Cpu *p_cpu;
+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 on();
+ void off();
static Host* by_name_or_null(const char* name);
static Host* by_name_or_create(const char* name);
};