source: DCWoRMS/trunk/src/simulator/stats/implementation/ResourcePowerStats.java @ 496

Revision 496, 765 bytes checked in by wojtekp, 13 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        }
15
16        public void setSumValue(double sumValue) {
17                this.sumValue = sumValue;
18        }
19
20        public double getSumValue() {
21                return sumValue;
22        }
23
24        public Object serialize(StatsSerializer serializer) {
25                return serializer.visit(this);
26        }
27
28        public String[] getHeaders() {
29                return headers;
30        }
31
32}
Note: See TracBrowser for help on using the repository browser.