GreenCloud Simulator
dcresource.h
Go to the documentation of this file.
1 /*
2  * dcresource.h
3  *
4  * @date Feb 27, 2013
5  * @author Guzek:Mateusz
6  */
7 
8 #ifndef DCRESOURCE_H_
9 #define DCRESOURCE_H_
10 
11 #include <stdlib.h>
12 #include <vector>
13 #include <string>
14 
15 #include "resourcespec.h"
16 #include "powermodel/powermodel.h"
17 
18 
19 /*The Resource fields represent the free capacities of DcResource.*/
20 class DcResource : public TclObject, public Resource {
21 public:
22  DcResource();
23  virtual ~DcResource();
24 
25  virtual int command(int argc, const char*const* argv);
26 
27  virtual int setSpecification(ResourceSpec* resspec);
28 
29  virtual double getUtilization();
30  virtual double getPower();
31  virtual double getMaxPower();
32 
33  virtual void print();
35 private:
37  double total_cap;
38 
39 
40 };
41 
42 
43 #endif /* DCRESOURCE_H_ */
ResourceSpec * specification
Definition: dcresource.h:34
int used_power_state_
Definition: dcresource.h:36
double total_cap
Definition: dcresource.h:37
virtual double getPower()
Definition: dcresource.cc:58
virtual int command(int argc, const char *const *argv)
Definition: dcresource.cc:98
virtual void print()
Definition: dcresource.cc:81
virtual double getUtilization()
Definition: dcresource.cc:46
virtual ~DcResource()
Definition: dcresource.cc:23
virtual double getMaxPower()
Definition: dcresource.cc:68
virtual int setSpecification(ResourceSpec *resspec)
Definition: dcresource.cc:28