source: DCWoRMS/branches/coolemall/src/simulator/stats/implementation/ResourcePowerStats.java @ 1207

Revision 1207, 823 bytes checked in by wojtekp, 11 years ago (diff)
  • Property svn:mime-type set to text/plain
Line 
1package simulator.stats.implementation;
2
3import schedframe.resources.ResourceType;
4import simulator.stats.implementation.out.StatsSerializer;
5
6public class ResourcePowerStats extends ResourceDynamicStats implements StatsInterface{
7
8        protected double sumValue;
9
10        private String[] headers = { "resourceName", "timestamp", "consumption" };
11       
12        public ResourcePowerStats (String resourceName, ResourceType resourceType, String usageType) {
13                super(resourceName, resourceType, usageType);
14                if(usageType == null){
15                        this.usageType = "power";
16                }
17        }
18
19        public void setSumValue(double sumValue) {
20                this.sumValue = sumValue;
21        }
22
23        public double getSumValue() {
24                return sumValue;
25        }
26
27        public Object serialize(StatsSerializer serializer) {
28                return serializer.visit(this);
29        }
30
31        public String[] getHeaders() {
32                return headers;
33        }
34
35}
Note: See TracBrowser for help on using the repository browser.