Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Concatenate nested namespaces (sonar).
[simgrid.git] / src / surf / disk_s19.hpp
1 /* Copyright (c) 2013-2022. The SimGrid Team. All rights reserved.          */
2
3 /* This program is free software; you can redistribute it and/or modify it
4  * under the terms of the license (GNU LGPL) which comes with this package. */
5
6 #include <xbt/base.h>
7
8 #include "src/kernel/resource/DiskImpl.hpp"
9
10 #ifndef DISK_S19_HPP_
11 #define DISK_S19_HPP_
12
13 namespace simgrid::kernel::resource {
14
15 /***********
16  * Classes *
17  ***********/
18
19 class XBT_PRIVATE DiskS19Model;
20 class XBT_PRIVATE DiskS19;
21 class XBT_PRIVATE DiskS19Action;
22
23 /*********
24  * Model *
25  *********/
26
27 class DiskS19Model : public DiskModel {
28 public:
29   using DiskModel::DiskModel;
30   DiskImpl* create_disk(const std::string& name, double read_bandwidth, double write_bandwidth) override;
31
32   DiskAction* io_start(const DiskImpl* disk, sg_size_t size, s4u::Io::OpType type) override;
33
34   void update_actions_state(double now, double delta) override;
35 };
36
37 /************
38  * Resource *
39  ************/
40
41 class DiskS19 : public DiskImpl {
42 public:
43   using DiskImpl::DiskImpl;
44   void set_read_bandwidth(double value) override;
45   void set_write_bandwidth(double value) override;
46   void set_readwrite_bandwidth(double value) override;
47   void apply_event(kernel::profile::Event* triggered, double value) override;
48 };
49
50 /**********
51  * Action *
52  **********/
53
54 class DiskS19Action : public DiskAction {
55 public:
56   DiskS19Action(Model* model, double cost, bool failed);
57   void update_remains_lazy(double now) override;
58 };
59
60 } // namespace simgrid::kernel::resource
61 #endif /* DISK_S19_HPP_ */