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. */
7 #include "storage_interface.hpp"
9 #ifndef STORAGE_N11_HPP_
10 #define STORAGE_N11_HPP_
16 class StorageN11Model;
18 class StorageN11Action;
24 class StorageN11Model : public StorageModel {
28 Storage *createStorage(const char* id, const char* type_id,
29 const char* content_name, const char* content_type, xbt_dict_t properties, const char* attach);
30 void addTraces(){DIE_IMPOSSIBLE;}
31 double shareResources(double now);
32 void updateActionsState(double now, double delta);
39 class StorageN11 : public Storage {
41 StorageN11(StorageModel *model, const char* name, xbt_dict_t properties,
42 lmm_system_t maxminSystem, double bread, double bwrite, double bconnection,
43 const char* type_id, char *content_name, char *content_type, sg_size_t size, char *attach);
45 StorageAction *open(const char* mount, const char* path);
46 StorageAction *close(surf_file_t fd);
47 StorageAction *ls(const char *path);
48 StorageAction *read(surf_file_t fd, sg_size_t size);//FIXME:why we have a useless param *??
49 StorageAction *write(surf_file_t fd, sg_size_t size);//FIXME:why we have a useless param *??
50 void rename(const char *src, const char *dest);
52 lmm_constraint_t p_constraintWrite; /* Constraint for maximum write bandwidth*/
53 lmm_constraint_t p_constraintRead; /* Constraint for maximum write bandwidth*/
60 class StorageN11Action : public StorageAction {
62 StorageN11Action(Model *model, double cost, bool failed, Storage *storage, e_surf_action_storage_type_t type);
68 void setMaxDuration(double duration);
69 void setPriority(double priority);
73 #endif /* STORAGE_N11_HPP_ */