X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f8890e934eccb4cc07766065689b885068d6bc65..93b7899156ac9fee75c4a6a8b65b92b265d61d4f:/src/surf/host_interface.hpp diff --git a/src/surf/host_interface.hpp b/src/surf/host_interface.hpp index ed143b8836..2ae6d5deef 100644 --- a/src/surf/host_interface.hpp +++ b/src/surf/host_interface.hpp @@ -8,6 +8,7 @@ #include "storage_interface.hpp" #include "cpu_interface.hpp" #include "network_interface.hpp" +#include "src/surf/PropertyHolder.hpp" #include @@ -74,7 +75,7 @@ public: 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(); @@ -94,7 +95,7 @@ public: * @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 LEVEL; static void init(); @@ -132,13 +133,6 @@ public: 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 * @@ -279,6 +273,7 @@ public: void getParams(vm_params_t params); /** @brief Sets the params of that VM/PM */ void setParams(vm_params_t params); + simgrid::Host* getHost() { return p_host; } private: s_vm_params_t p_params; };