#include <xbt/dict.h>
#include <xbt/swag.h>
#include <xbt/string.hpp>
+#include <xbt/signal.hpp>
#include <xbt/Extendable.hpp>
#include <simgrid/datatypes.h>
int getCoreAmount();
/* FIXME: these should be protected, but it leads to many errors */
- surf::Cpu *p_cpu = nullptr;
- surf::NetCard *p_netcard = nullptr;
+ surf::Cpu *pimpl_cpu = nullptr;
+ surf::NetCard *pimpl_netcard = nullptr;
private:
simgrid::xbt::string name_ = "noname";
public:
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();
static Host* by_name_or_null(const char* name);
static Host* by_name_or_create(const char* name);
+
+ /*** Called on each newly created object */
+ static simgrid::xbt::signal<void(Host&)> onCreation;
+ /*** Called just before destructing an object */
+ static simgrid::xbt::signal<void(Host&)> onDestruction;
+ /*** Called when the machine is turned on or off */
+ static simgrid::xbt::signal<void(Host&)> onStateChange;
};
}