1 /* Copyright (c) 2013-2015. The SimGrid Team.
2 * All rights reserved. */
4 /* This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package. */
9 #include "FileImpl.hpp"
10 #include "StorageImpl.hpp"
12 #ifndef STORAGE_N11_HPP_
13 #define STORAGE_N11_HPP_
22 class XBT_PRIVATE StorageN11Model;
23 class XBT_PRIVATE StorageN11;
24 class XBT_PRIVATE StorageN11Action;
30 class StorageN11Model : public StorageModel {
32 StorageImpl* createStorage(const char* id, const char* type_id, const char* content_name,
33 const char* attach) override;
34 double nextOccuringEvent(double now) override;
35 void updateActionsState(double now, double delta) override;
42 class StorageN11 : public StorageImpl {
44 StorageN11(StorageModel* model, const char* name, lmm_system_t maxminSystem, double bread, double bwrite,
45 const char* type_id, char* content_name, sg_size_t size, char* attach);
46 virtual ~StorageN11() = default;
47 StorageAction *open(const char* mount, const char* path);
48 StorageAction *ls(const char *path);
49 StorageAction* read(sg_size_t size);
50 StorageAction* write(sg_size_t size);
51 void rename(const char *src, const char *dest);
58 class StorageN11Action : public StorageAction {
60 StorageN11Action(Model* model, double cost, bool failed, StorageImpl* storage, e_surf_action_storage_type_t type);
66 void setMaxDuration(double duration);
67 void setSharingWeight(double priority);
73 #endif /* STORAGE_N11_HPP_ */