X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/b436ba9314c04c457c9d258057c2e85d7c6c5f0b..952402db6d0f3eade16684d4b044c4ed5282abef:/src/kernel/resource/models/disk_s19.hpp diff --git a/src/kernel/resource/models/disk_s19.hpp b/src/kernel/resource/models/disk_s19.hpp new file mode 100644 index 0000000000..8da736c81c --- /dev/null +++ b/src/kernel/resource/models/disk_s19.hpp @@ -0,0 +1,58 @@ +/* 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. */ + +#include + +#include "src/kernel/resource/DiskImpl.hpp" + +#ifndef DISK_S19_HPP_ +#define DISK_S19_HPP_ + +namespace simgrid::kernel::resource { + +/*********** + * Classes * + ***********/ + +class XBT_PRIVATE DiskS19Model; +class XBT_PRIVATE DiskS19; +class XBT_PRIVATE DiskS19Action; + +/********* + * Model * + *********/ + +class DiskS19Model : public DiskModel { +public: + 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; +}; + +/************ + * Resource * + ************/ + +class DiskS19 : public DiskImpl { +public: + 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; +}; + +/********** + * Action * + **********/ + +class DiskS19Action : public DiskAction { +public: + DiskS19Action(Model* model, double cost, bool failed); +}; + +} // namespace simgrid::kernel::resource +#endif /* DISK_S19_HPP_ */