Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Get ride of ???Ptr types in C++: make pointers explicit
[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();
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  Action *communicate(Host *src, Host *dst, double size, double rate);
42 };
43
44 /************
45  * Resource *
46  ************/
47
48 class HostCLM03 : public Host {
49 public:
50   HostCLM03(HostModel *model, const char* name, xbt_dict_t properties, xbt_dynar_t storage, RoutingEdge *netElm, Cpu *cpu);
51
52   void updateState(tmgr_trace_event_t event_type, double value, double date);
53
54   virtual Action *execute(double size);
55   virtual Action *sleep(double duration);
56   e_surf_resource_state_t getState();
57
58   bool isUsed();
59
60   xbt_dynar_t getVms();
61
62   /* common with vm */
63   void getParams(ws_params_t params);
64   void setParams(ws_params_t params);
65 };
66
67
68 /**********
69  * Action *
70  **********/
71
72
73
74 #endif /* SURF_HOST_CLM03_HPP_ */