1 /* Copyright (c) 2013-2018. The SimGrid Team. All rights reserved. */
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. */
8 #include "StorageImpl.hpp"
10 #ifndef STORAGE_N11_HPP_
11 #define STORAGE_N11_HPP_
20 class XBT_PRIVATE StorageN11Model;
21 class XBT_PRIVATE StorageN11;
22 class XBT_PRIVATE StorageN11Action;
28 class StorageN11Model : public StorageModel {
31 StorageImpl* createStorage(std::string id, std::string type_id, std::string content_name,
32 std::string attach) override;
33 double next_occuring_event(double now) override;
34 void update_actions_state(double now, double delta) override;
41 class StorageN11 : public StorageImpl {
43 StorageN11(StorageModel* model, std::string name, kernel::lmm::System* maxminSystem, double bread, double bwrite,
44 std::string type_id, std::string content_name, sg_size_t size, std::string attach);
45 virtual ~StorageN11() = default;
46 StorageAction* read(sg_size_t size);
47 StorageAction* write(sg_size_t size);
54 class StorageN11Action : public StorageAction {
56 StorageN11Action(kernel::resource::Model* model, double cost, bool failed, StorageImpl* storage,
57 e_surf_action_storage_type_t type);
58 void suspend() override;
59 void cancel() override;
60 void resume() override;
61 void set_max_duration(double duration) override;
62 void set_priority(double priority) override;
63 void update_remains_lazy(double now) override;
69 #endif /* STORAGE_N11_HPP_ */