X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f5b4648bcb7aa3c1174e25c9f3cd28867b3b2871..8735a101c4a502473ba7381e88aec514ebe1b828:/include/simgrid/kernel/routing/NetZoneImpl.hpp diff --git a/include/simgrid/kernel/routing/NetZoneImpl.hpp b/include/simgrid/kernel/routing/NetZoneImpl.hpp index c9b6ea92fb..d530a4eb0f 100644 --- a/include/simgrid/kernel/routing/NetZoneImpl.hpp +++ b/include/simgrid/kernel/routing/NetZoneImpl.hpp @@ -73,9 +73,13 @@ class XBT_PUBLIC NetZoneImpl : public xbt::PropertyHolder { resource::NetworkModel* network_model_; resource::CpuModel* cpu_model_vm_; resource::CpuModel* cpu_model_pm_; + resource::DiskModel* disk_model_; + simgrid::surf::HostModel* host_model_; + /** @brief Perform sealing procedure for derived classes, if necessary */ + virtual void do_seal(){}; protected: - explicit NetZoneImpl(NetZoneImpl* father, const std::string& name, resource::NetworkModel* network_model); + explicit NetZoneImpl(const std::string& name); NetZoneImpl(const NetZoneImpl&) = delete; NetZoneImpl& operator=(const NetZoneImpl&) = delete; virtual ~NetZoneImpl(); @@ -110,6 +114,10 @@ public: resource::CpuModel* get_cpu_vm_model() const { return cpu_model_vm_; } /** @brief Retrieves the CPU model for physical machines associated to this NetZone */ resource::CpuModel* get_cpu_pm_model() const { return cpu_model_pm_; } + /** @brief Retrieves the disk model associated to this NetZone */ + resource::DiskModel* get_disk_model() const { return disk_model_; } + /** @brief Retrieves the host model associated to this NetZone */ + simgrid::surf::HostModel* get_host_model() const { return host_model_; } const s4u::NetZone* get_iface() const { return &piface_; } s4u::NetZone* get_iface() { return &piface_; } @@ -129,6 +137,8 @@ public: /** @brief Make a host within that NetZone */ s4u::Host* create_host(const std::string& name, const std::vector& speed_per_pstate, int core_amount); + /** @brief Create a disk with the disk model from this NetZone */ + s4u::Disk* create_disk(const std::string& name, double read_bandwidth, double write_bandwidth); /** @brief Make a link within that NetZone */ virtual s4u::Link* create_link(const std::string& name, const std::vector& bandwidths, s4u::Link::SharingPolicy policy); @@ -137,11 +147,15 @@ public: std::vector& link_list, bool symmetrical); /** @brief Seal your netzone once you're done adding content, and before routing stuff through it */ - virtual void seal() { sealed_ = true; }; + void seal(); virtual int add_component(kernel::routing::NetPoint* elm); /* A host, a router or a netzone, whatever */ virtual void add_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst, kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst, std::vector& link_list, bool symmetrical); + /** @brief Set parent of this Netzone */ + void set_parent(NetZoneImpl* parent); + /** @brief Set network model for this Netzone */ + void set_network_model(simgrid::kernel::resource::NetworkModel* netmodel); /* @brief get the route between two nodes in the full platform *