Ignore:
Timestamp:
10/10/12 12:12:06 (13 years ago)
Author:
wojtekp
Message:
 
Location:
DCWoRMS/trunk/src/schedframe/resources/computing/profiles/energy/power
Files:
5 edited
2 moved

Legend:

Unmodified
Added
Removed
  • DCWoRMS/trunk/src/schedframe/resources/computing/profiles/energy/power/PowerInterfaceFactory.java

    r477 r495  
    55import schedframe.resources.computing.profiles.energy.power.ui.PowerInterface; 
    66 
    7 public class PowerProfileFactory { 
     7public class PowerInterfaceFactory { 
    88 
    99 
     
    3636                else if (resource.getType().getName().equals(StandardResourceType.Processor.getName())) 
    3737                        powerInterface = new schedframe.resources.computing.profiles.energy.power.ui.ProcessorPowerInterface(resource, pp); 
    38                 else throw new IllegalArgumentException("ResourceType " + resource.getType() + " is not supported."); 
     38                else  
     39                        powerInterface = new schedframe.resources.computing.profiles.energy.power.ui.ComputingResourcePowerInterface(resource, pp); 
    3940 
    4041                /*switch(resource.getType()){ 
  • DCWoRMS/trunk/src/schedframe/resources/computing/profiles/energy/power/PowerProfile.java

    r477 r495  
    2222         
    2323 
    24         public PowerProfile(EnergyEstimationPlugin energyEstimationPlugin, List<PowerState> supportedPowerStates) { 
     24        public PowerProfile(EnergyEstimationPlugin energyEstimationPlugin, List<PowerState> powerStates) { 
    2525                this.energyEstimationPlugin = energyEstimationPlugin; 
    2626                this.powerUsage = new ArrayList<PowerUsage>(); 
    27                 this.supportedPowerStates = supportedPowerStates; 
     27                this.supportedPowerStates = powerStates; 
    2828        } 
    2929         
    30         public PowerProfile(EnergyEstimationPlugin energyEstimationPlugin, List<PowerState> supportedPowerStates,  List<PState> pStates) { 
     30        public PowerProfile(EnergyEstimationPlugin energyEstimationPlugin, List<PowerState> powerStates,  List<PState> pStates) { 
    3131                this.energyEstimationPlugin = energyEstimationPlugin; 
    32                 this.supportedPowerStates = supportedPowerStates; 
     32                this.supportedPowerStates = powerStates; 
    3333                this.powerUsage = new ArrayList<PowerUsage>(); 
    3434                if(pStates.size() > 0) 
  • DCWoRMS/trunk/src/schedframe/resources/computing/profiles/energy/power/PowerUsage.java

    r477 r495  
    11package schedframe.resources.computing.profiles.energy.power; 
    22 
    3 public class PowerUsage { 
     3import schedframe.resources.computing.profiles.energy.MeasurementHistory; 
    44 
    5         protected long timestamp; 
    6         protected double value; 
     5public class PowerUsage extends MeasurementHistory{ 
    76 
    87        public PowerUsage(long timestamp, double value){ 
    9                 this.timestamp = timestamp; 
    10                 this.value = value; 
    11         } 
    12          
    13         public long getTimestamp() { 
    14                 return timestamp; 
    15         } 
    16  
    17         public double getValue() { 
    18                 return value; 
    19         } 
    20          
    21         public void setValue(double value) { 
    22                 this.value = value; 
     8                super(timestamp, value); 
    239        } 
    2410         
  • DCWoRMS/trunk/src/schedframe/resources/computing/profiles/energy/power/ui/ComputingNodePowerInterface.java

    r477 r495  
    1010import schedframe.resources.computing.profiles.energy.power.StandardPowerStateName; 
    1111 
    12 public class ComputingNodePowerInterface extends AbstractPowerInterface{ 
     12public class ComputingNodePowerInterface extends ComputingResourcePowerInterface{ 
    1313 
    1414        public static long START_TIME = 600000; 
  • DCWoRMS/trunk/src/schedframe/resources/computing/profiles/energy/power/ui/ComputingResourcePowerInterface.java

    r477 r495  
    1717import schedframe.resources.computing.profiles.energy.power.StandardPowerStateName; 
    1818 
    19 public abstract class AbstractPowerInterface implements PowerInterface{ 
     19public class ComputingResourcePowerInterface implements PowerInterface{ 
    2020 
    2121        protected PowerStateName currentPowerState; 
     
    2323        protected ComputingResource resource; 
    2424         
    25         public AbstractPowerInterface(ComputingResource resource, PowerProfile powerProfile){ 
     25        public ComputingResourcePowerInterface(ComputingResource resource, PowerProfile powerProfile){ 
    2626                this.resource = resource; 
    2727                this.powerProfile = powerProfile; 
  • DCWoRMS/trunk/src/schedframe/resources/computing/profiles/energy/power/ui/DataCenterPowerInterface.java

    r477 r495  
    77import schedframe.resources.computing.profiles.energy.power.StandardPowerStateName; 
    88 
    9 public class DataCenterPowerInterface extends AbstractPowerInterface{ 
     9public class DataCenterPowerInterface extends ComputingResourcePowerInterface{ 
    1010 
    11  
    12  
    13          
    1411        public DataCenterPowerInterface(ComputingResource resource, PowerProfile pp){ 
    1512                super(resource, pp); 
  • DCWoRMS/trunk/src/schedframe/resources/computing/profiles/energy/power/ui/ProcessorPowerInterface.java

    r494 r495  
    11package schedframe.resources.computing.profiles.energy.power.ui; 
    22 
    3 import gridsim.dcworms.DCWormsTags; 
    43 
    54import java.util.Map; 
     
    1615import schedframe.resources.units.StandardResourceUnitName; 
    1716 
    18 public class ProcessorPowerInterface extends AbstractPowerInterface { 
     17public class ProcessorPowerInterface extends ComputingResourcePowerInterface { 
    1918 
    2019        protected PState currentPState; 
Note: See TracChangeset for help on using the changeset viewer.