#ifndef SIMGRID_HOST_HPP
#define SIMGRID_HOST_HPP
+#include <cstddef>
#include <memory>
#include <string>
#include <vector>
#include <xbt/base.h>
-#include <xbt/Facetable.hpp>
+#include <xbt/dict.h>
+#include <xbt/swag.h>
+#include <xbt/string.hpp>
+#include <xbt/Extendable.hpp>
+
+#include <simgrid/datatypes.h>
namespace simgrid {
-XBT_PUBLIC_CLASS Host : public simgrid::xbt::Facetable<Host> {
+XBT_PUBLIC_CLASS Host :
+public simgrid::xbt::Extendable<Host> {
+
+public:
+ double getSpeed();
+ int getCoreAmount();
+
+ /* FIXME: these should be protected, but it leads to many errors */
+ surf::Cpu *pimpl_cpu = nullptr;
+ surf::NetCard *pimpl_netcard = nullptr;
private:
- std::string id_;
+ simgrid::xbt::string name_ = "noname";
public:
- Host(std::string id);
+ Host(std::string const& name);
~Host();
- std::string const& id() const { return id_; }
+ 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();
+ 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);
};