#include "storage_interface.hpp"
#include "cpu_interface.hpp"
#include "network_interface.hpp"
+#include "src/surf/PropertyHolder.hpp"
#include <xbt/base.h>
HostModel() : Model() {}
~HostModel() {}
- virtual Host *createHost(const char *name, RoutingEdge *net, Cpu *cpu)=0;
+ virtual Host *createHost(const char *name, RoutingEdge *net, Cpu *cpu, xbt_dict_t props)=0;
void addTraces(){DIE_IMPOSSIBLE;}
virtual void adjustWeightOfDummyCpuActions();
* @brief SURF Host interface class
* @details An host represents a machine with a aggregation of a Cpu, a Link and a Storage
*/
-class Host : public simgrid::surf::Resource {
+class Host : public simgrid::surf::Resource, public simgrid::surf::PropertyHolder {
public:
static simgrid::xbt::FacetLevel<simgrid::Host, Host> LEVEL;
static void init();
void attach(simgrid::Host* host);
void setState(e_surf_resource_state_t state);
- /**
- * @brief Get the properties of the current Host
- *
- * @return The properties of the current Host
- */
- xbt_dict_t getProperties();
-
/**
* @brief Execute some quantity of computation
*
*/
virtual int fileMove(surf_file_t fd, const char* fullpath);
+protected:
+ void onDie() override;
+
+public:
xbt_dynar_t p_storage;
RoutingEdge *p_netElm;
Cpu *p_cpu;