1 /* Copyright (c) 2013-2014. 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;
17 typedef StorageN11Model *StorageN11ModelPtr;
20 typedef StorageN11 *StorageN11Ptr;
23 typedef StorageN11 *StorageN11Ptr;
25 class StorageN11Action;
26 typedef StorageN11Action *StorageN11ActionPtr;
28 class StorageN11Action;
29 typedef StorageN11Action *StorageN11ActionPtr;
36 class StorageN11Model : public StorageModel {
40 StoragePtr createResource(const char* id, const char* type_id,
41 const char* content_name, const char* content_type, xbt_dict_t properties, const char* attach);
42 double shareResources(double now);
43 void updateActionsState(double now, double delta);
50 class StorageN11 : public Storage {
52 StorageN11(StorageModelPtr model, const char* name, xbt_dict_t properties,
53 lmm_system_t maxminSystem, double bread, double bwrite, double bconnection,
54 const char* type_id, char *content_name, char *content_type, sg_size_t size, char *attach);
56 StorageActionPtr open(const char* mount, const char* path);
57 StorageActionPtr close(surf_file_t fd);
58 StorageActionPtr ls(const char *path);
59 StorageActionPtr read(surf_file_t fd, sg_size_t size);//FIXME:why we have a useless param ptr ??
60 StorageActionPtr write(surf_file_t fd, sg_size_t size);//FIXME:why we have a useless param ptr ??
61 void rename(const char *src, const char *dest);
63 lmm_constraint_t p_constraintWrite; /* Constraint for maximum write bandwidth*/
64 lmm_constraint_t p_constraintRead; /* Constraint for maximum write bandwidth*/
71 class StorageN11Action : public StorageAction {
73 StorageN11Action() {}; //FIXME:REMOVE
74 StorageN11Action(ModelPtr model, double cost, bool failed, StoragePtr storage, e_surf_action_storage_type_t type);
78 //FIXME:??void recycle();
81 void setMaxDuration(double duration);
82 void setPriority(double priority);
86 #endif /* STORAGE_N11_HPP_ */