X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/79f4c4c467150b3bea841b968cabd629e9d9282a..ea74f5d95928a521a588737e81f1de94eef25d19:/src/surf/disk_s19.hpp diff --git a/src/surf/disk_s19.hpp b/src/surf/disk_s19.hpp index 5b537ef58a..414ca8b555 100644 --- a/src/surf/disk_s19.hpp +++ b/src/surf/disk_s19.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2019. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2013-2022. 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. */ @@ -28,9 +28,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_occuring_event(double now) override; + using DiskModel::DiskModel; + DiskImpl* create_disk(const std::string& name, double read_bandwidth, double write_bandwidth) override; + + DiskAction* io_start(const DiskImpl* disk, sg_size_t size, s4u::Io::OpType type) override; + void update_actions_state(double now, double delta) override; }; @@ -40,12 +42,11 @@ public: class DiskS19 : public DiskImpl { public: - DiskS19(DiskModel* model, const std::string& name, kernel::lmm::System* maxminSystem, double read_bw, - double write_bw); - virtual ~DiskS19() = default; - 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; + using DiskImpl::DiskImpl; + void set_read_bandwidth(double value) override; + void set_write_bandwidth(double value) override; + void set_readwrite_bandwidth(double value) override; + void apply_event(kernel::profile::Event* triggered, double value) override; }; /********** @@ -54,12 +55,7 @@ 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; + DiskS19Action(Model* model, double cost, bool failed); void update_remains_lazy(double now) override; };