GreenCloud Simulator
resourcespec.h
Go to the documentation of this file.
1 /*
2  * resourcespec.h
3  *
4  * @date Feb 27, 2013
5  * @author Guzek:Mateusz
6  */
7 
8 #ifndef RESOURCESPEC_H_
9 #define RESOURCESPEC_H_
10 
11 #include "resource.h"
12 #include "powermodel/powermodel.h"
13 
14 #include <stdlib.h>
15 #include <vector>
16 #include <tclcl.h>
17 
18 #include <iostream>
19 #include <string>
20 
21 
22 
23 
24 class ResourceSpec : public TclObject, public Resource {
25 public:
26  friend class DcResource;
27  ResourceSpec();
28  virtual ~ResourceSpec();
29 
30  virtual int command(int argc, const char*const* argv);
31 
32 public:
33  /* Name of the component*/
34  std::string name_;
35  /*Power states, to be extended */
36  std::vector <int> power_states;
37 
38  void print();
39 
40  int addCapacity(double cap);
41  int addPowerState(int ps);
42  int setName(const char* name);
43  int setArch(const char* name);
45 
46 private:
48  void setPowerModel(PowerModel* model);
49 };
50 
51 #endif /* RESOURCESPEC_H_ */
virtual int command(int argc, const char *const *argv)
Definition: resourcespec.cc:74
virtual ~ResourceSpec()
Definition: resourcespec.cc:25
std::string name_
Definition: resourcespec.h:34
PowerModel * getPowerModel()
Definition: resourcespec.cc:53
int setArch(const char *name)
Definition: resourcespec.cc:44
int addCapacity(double cap)
Definition: resourcespec.cc:29
std::vector< int > power_states
Definition: resourcespec.h:36
int setName(const char *name)
Definition: resourcespec.cc:39
void setPowerModel(PowerModel *model)
Definition: resourcespec.cc:49
PowerModel * res_model_
Definition: resourcespec.h:47
int addPowerState(int ps)
Definition: resourcespec.cc:33