X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/39c935d6d5ee86d153f6f7e6a10d723ae7c57f6f..5ed37babb2fa9097abe82df299c0aa259ed84d5a:/src/surf/disk_s19.hpp diff --git a/src/surf/disk_s19.hpp b/src/surf/disk_s19.hpp index 11ea111abc..c4a647366d 100644 --- a/src/surf/disk_s19.hpp +++ b/src/surf/disk_s19.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2021. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2013-2023. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -10,9 +10,7 @@ #ifndef DISK_S19_HPP_ #define DISK_S19_HPP_ -namespace simgrid { -namespace kernel { -namespace resource { +namespace simgrid::kernel::resource { /*********** * Classes * @@ -28,9 +26,11 @@ class XBT_PRIVATE DiskS19Action; class DiskS19Model : public DiskModel { public: - DiskS19Model(); - DiskImpl* createDisk(const std::string& id, double read_bw, double write_bw) override; - double next_occurring_event(double now) override; + explicit DiskS19Model(const std::string& name); + DiskS19Model(const DiskS19Model&) = delete; + DiskS19Model& operator=(const DiskS19Model&) = delete; + DiskImpl* create_disk(const std::string& name, double read_bandwidth, double write_bandwidth) override; + void update_actions_state(double now, double delta) override; }; @@ -40,12 +40,9 @@ public: class DiskS19 : public DiskImpl { public: - DiskS19(DiskModel* model, const std::string& name, kernel::lmm::System* maxminSystem, double read_bw, - double write_bw); - ~DiskS19() override = default; + using DiskImpl::DiskImpl; + void apply_event(kernel::profile::Event* triggered, double value) override; DiskAction* io_start(sg_size_t size, s4u::Io::OpType type) override; - DiskAction* read(sg_size_t size) override; - DiskAction* write(sg_size_t size) override; }; /********** @@ -54,16 +51,8 @@ public: class DiskS19Action : public DiskAction { public: - DiskS19Action(Model* model, double cost, bool failed, DiskImpl* disk, s4u::Io::OpType type); - void suspend() override; - void cancel() override; - void resume() override; - void set_max_duration(double duration) override; - void set_sharing_penalty(double sharing_penalty) override; - void update_remains_lazy(double now) override; + DiskS19Action(Model* model, double cost, bool failed); }; -} // namespace resource -} // namespace kernel -} // namespace simgrid +} // namespace simgrid::kernel::resource #endif /* DISK_S19_HPP_ */