Logo AND Algorithmique Numérique Distribuée

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