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
RevLine 
[477]1package simulator.stats.implementation;
2
3import schedframe.resources.ResourceType;
4import simulator.stats.implementation.out.StatsSerializer;
5
[496]6public class ResourcePowerStats extends ResourceDynamicStats implements StatsInterface{
[477]7
[496]8        protected double sumValue;
9
10        private String[] headers = { "resourceName", "timestamp", "consumption" };
[477]11       
[496]12        public ResourcePowerStats (String resourceName, ResourceType resourceType, String usageType) {
13                super(resourceName, resourceType, usageType);
[477]14        }
15
[496]16        public void setSumValue(double sumValue) {
17                this.sumValue = sumValue;
[477]18        }
19
[496]20        public double getSumValue() {
21                return sumValue;
[477]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.