Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'S4U'
[simgrid.git] / src / surf / host_clm03.hpp
1 /* Copyright (c) 2013-2015. The SimGrid Team.
2  * All rights reserved.                                                     */
3
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. */
6
7 #include <xbt/base.h>
8
9 #include "storage_interface.hpp"
10 #include "cpu_interface.hpp"
11 #include "host_interface.hpp"
12 #include "network_interface.hpp"
13
14 #ifndef SURF_HOST_CLM03_HPP_
15 #define SURF_HOST_CLM03_HPP_
16
17 /***********
18  * Classes *
19  ***********/
20
21 class XBT_PRIVATE HostCLM03Model;
22 class XBT_PRIVATE HostCLM03;
23 class XBT_PRIVATE HostCLM03Action;
24
25 /*********
26  * Model *
27  *********/
28
29 class HostCLM03Model : public HostModel {
30 public:
31   HostCLM03Model(): HostModel(){}
32   ~HostCLM03Model() {}
33   Host *createHost(const char *name);
34   double shareResources(double now);
35
36   void updateActionsState(double now, double delta);
37
38   Action *executeParallelTask(int host_nb,
39                               sg_host_t *host_list,
40                                                           double *flops_amount,
41                                                           double *bytes_amount,
42                                                           double rate);
43 };
44
45 /************
46  * Resource *
47  ************/
48
49 class HostCLM03 : public Host {
50 public:
51   HostCLM03(HostModel *model, const char* name, xbt_dict_t properties, xbt_dynar_t storage, RoutingEdge *netElm, Cpu *cpu);
52
53   void updateState(tmgr_trace_event_t event_type, double value, double date);
54
55   virtual Action *execute(double size);
56   virtual Action *sleep(double duration);
57   e_surf_resource_state_t getState();
58
59   bool isUsed();
60
61   xbt_dynar_t getVms();
62 };
63
64
65 /**********
66  * Action *
67  **********/
68
69
70
71 #endif /* SURF_HOST_CLM03_HPP_ */