Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[surf] simgrid::surf::Host, add backlink and attach() method
[simgrid.git] / src / surf / host_interface.hpp
index 70b7c1c..ed143b8 100644 (file)
@@ -96,6 +96,8 @@ public:
  */
 class Host : public simgrid::surf::Resource {
 public:
+  static simgrid::xbt::FacetLevel<simgrid::Host, Host> LEVEL;
+  static void init();
   /**
    * @brief Host constructor
    *
@@ -127,6 +129,7 @@ public:
   /** @brief Host destructor */
   ~Host();
 
+  void attach(simgrid::Host* host);
   void setState(e_surf_resource_state_t state);
 
   /**
@@ -265,6 +268,7 @@ public:
   xbt_dynar_t p_storage;
   RoutingEdge *p_netElm;
   Cpu *p_cpu;
+  simgrid::Host* p_host = nullptr;
 
   /** @brief Get the list of virtual machines on the current Host */
   xbt_dynar_t getVms();