Ignore:
Timestamp:
06/26/14 14:18:01 (11 years ago)
Author:
wojtekp
Message:
 
Location:
DCWoRMS/branches/coolemall/src/schedframe/resources/computing
Files:
2 added
8 edited
11 moved

Legend:

Unmodified
Added
Removed
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/ComputingResource.java

    r1392 r1396  
    5757                initCharacteristics(resDesc); 
    5858                accept(new LoadExtension(resDesc.getLoadProfile(), this)); 
    59                 accept(new EnergyExtension.Builder().resource(this).powerProfile(resDesc.getPowerProfile()).airFlowProfile(resDesc.getAirThroughputProfile()).thermalProfile(resDesc.getThermalProfile()).build());      
     59                accept(new EnergyExtension.Builder().resource(this).powerProfile(resDesc.getPowerProfile()).airflowProfile(resDesc.getAirflowProfile()).thermalProfile(resDesc.getThermalProfile()).build());    
    6060        } 
    6161 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/EnergyExtension.java

    r1389 r1396  
    1010import schedframe.resources.computing.extensions.ExtensionException; 
    1111import schedframe.resources.computing.extensions.ExtensionType; 
    12 import schedframe.resources.computing.profiles.energy.airthroughput.AirThroughputInterfaceFactory; 
    13 import schedframe.resources.computing.profiles.energy.airthroughput.AirThroughputProfile; 
    14 import schedframe.resources.computing.profiles.energy.airthroughput.ui.AirThroughputInterface; 
     12import schedframe.resources.computing.profiles.energy.airthroughput.AirflowInterfaceFactory; 
     13import schedframe.resources.computing.profiles.energy.airthroughput.AirflowProfile; 
     14import schedframe.resources.computing.profiles.energy.airthroughput.ui.AirflowInterface; 
    1515import schedframe.resources.computing.profiles.energy.power.PowerInterfaceFactory; 
    1616import schedframe.resources.computing.profiles.energy.power.PowerProfile; 
     
    3030        protected PowerProfile powerProfile; 
    3131         
    32         protected AirThroughputInterface airFlowInterface; 
    33         protected AirThroughputProfile airFlowProfile; 
     32        protected AirflowInterface airflowInterface; 
     33        protected AirflowProfile airflowProfile; 
    3434         
    3535        protected ThermalInterface thermalInterface; 
     
    7474                protected PowerProfile powerProfile; 
    7575                 
    76                 protected AirThroughputInterface airFlowInterface; 
    77                 protected AirThroughputProfile airFlowProfile; 
     76                protected AirflowInterface airflowInterface; 
     77                protected AirflowProfile airflowProfile; 
    7878                 
    7979                protected ThermalInterface thermalInterface; 
     
    8484                public Builder powerProfile(PowerProfile pp){this.powerProfile = pp; this.powerInterface = PowerInterfaceFactory.createPowerInterface(resource, powerProfile); return this; } 
    8585 
    86         public Builder airFlowProfile(AirThroughputProfile atp){this.airFlowProfile = atp; this.airFlowInterface = AirThroughputInterfaceFactory.createAirThroughputInterface(resource, airFlowProfile); return this; } 
     86        public Builder airflowProfile(AirflowProfile atp){this.airflowProfile = atp; this.airflowInterface = AirflowInterfaceFactory.createAirflowInterface(resource, airflowProfile); return this; } 
    8787 
    8888        public Builder thermalProfile(ThermalProfile tp){this.thermalProfile = tp; this.thermalInterface = ThermalInterfaceFactory.createThermalInterface(resource, thermalProfile); return this; } 
     
    9898                this.powerProfile = builder.powerProfile; 
    9999                 
    100                 this.airFlowInterface = builder.airFlowInterface ; 
    101                 this.airFlowProfile = builder.airFlowProfile; 
     100                this.airflowInterface = builder.airflowInterface ; 
     101                this.airflowProfile = builder.airflowProfile; 
    102102                 
    103103                this.thermalInterface = builder.thermalInterface; 
     
    163163                                 
    164164                        case AIRFLOW_STATE_CHANGED: 
    165                                 double airFlow = powerProfile.getEnergyEstimationPlugin().estimateAirThroughput(enEvent, new JobRegistryImpl(resource.getFullName()), resource); 
    166                                 airFlowProfile.addToAirFlowHistory(airFlow); 
     165                                double airflow = powerProfile.getEnergyEstimationPlugin().estimateAirflow(enEvent, new JobRegistryImpl(resource.getFullName()), resource); 
     166                                airflowProfile.addToAirFlowHistory(airflow); 
    167167                                break; 
    168168                                 
     
    204204        } 
    205205 
    206         public AirThroughputInterface getAirThroughputInterface() { 
    207                 return airFlowInterface; 
    208         } 
    209  
    210         public AirThroughputProfile getAirFlowProfile() { 
    211                 return airFlowProfile; 
     206        public AirflowInterface getAirflowInterface() { 
     207                return airflowInterface; 
     208        } 
     209 
     210        public AirflowProfile getAirFlowProfile() { 
     211                return airflowProfile; 
    212212        } 
    213213         
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/airthroughput/AirFlowValue.java

    r495 r1396  
    33import schedframe.resources.computing.profiles.energy.MeasurementHistory; 
    44 
    5 public class AirFlowValue extends MeasurementHistory{ 
     5public class AirflowValue extends MeasurementHistory{ 
    66 
    7         public AirFlowValue(long timestamp, double value){ 
     7        public AirflowValue(long timestamp, double value){ 
    88                super(timestamp, value); 
    99        } 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/airthroughput/AirflowInterfaceFactory.java

    r1318 r1396  
    33import schedframe.resources.StandardResourceType; 
    44import schedframe.resources.computing.ComputingResource; 
    5 import schedframe.resources.computing.profiles.energy.airthroughput.ui.AirThroughputInterface; 
    6 import schedframe.resources.computing.profiles.energy.airthroughput.ui.ComputingResourceAirThroughputInterface; 
     5import schedframe.resources.computing.profiles.energy.airthroughput.ui.AirflowInterface; 
     6import schedframe.resources.computing.profiles.energy.airthroughput.ui.ComputingResourceAirflowInterface; 
    77import schedframe.resources.devices.PhysicalResource; 
    8 import schedframe.resources.devices.DeviceAirThroughputInterface; 
    9 import schedframe.resources.devices.coolemall.FanAirThroughputInterface; 
     8import schedframe.resources.devices.DeviceAirflowInterface; 
     9import schedframe.resources.devices.coolemall.FanAirflowInterface; 
    1010 
    11 public class AirThroughputInterfaceFactory { 
     11public class AirflowInterfaceFactory { 
    1212         
    13         public static AirThroughputInterface createAirThroughputInterface(PhysicalResource resource, AirThroughputProfile atp){ 
     13        public static AirflowInterface createAirflowInterface(PhysicalResource resource, AirflowProfile atp){ 
    1414                if(atp == null) 
    1515                        return null; 
    16                 AirThroughputInterface airThroughputInterface = null; 
     16                AirflowInterface airflowInterface = null; 
    1717                if(resource.getType().getName().equals(StandardResourceType.CRAH.getName())) 
    18                         airThroughputInterface = new DeviceAirThroughputInterface(resource, atp); 
     18                        airflowInterface = new DeviceAirflowInterface(resource, atp); 
    1919                else if(resource.getType().getName().equals(StandardResourceType.Fan.getName())) 
    20                         airThroughputInterface = new FanAirThroughputInterface(resource, atp); 
     20                        airflowInterface = new FanAirflowInterface(resource, atp); 
    2121                else if(resource.getType().getName().equals(StandardResourceType.Inlet.getName())) 
    22                         airThroughputInterface = new FanAirThroughputInterface(resource, atp); 
     22                        airflowInterface = new FanAirflowInterface(resource, atp); 
    2323                else if(resource.getType().getName().equals(StandardResourceType.Outlet.getName())) 
    24                         airThroughputInterface = new FanAirThroughputInterface(resource, atp); 
     24                        airflowInterface = new FanAirflowInterface(resource, atp); 
    2525                else if(resource.getType().getName().equals(StandardResourceType.CoolingDevice.getName())) 
    26                         airThroughputInterface = new DeviceAirThroughputInterface(resource, atp); 
     26                        airflowInterface = new DeviceAirflowInterface(resource, atp); 
    2727                else 
    28                         airThroughputInterface = new ComputingResourceAirThroughputInterface((ComputingResource)resource, atp); 
    29                 return airThroughputInterface; 
     28                        airflowInterface = new ComputingResourceAirflowInterface((ComputingResource)resource, atp); 
     29                return airflowInterface; 
    3030        } 
    3131} 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/airthroughput/AirflowProfile.java

    r1207 r1396  
    77 
    88import schedframe.Parameters; 
    9 import schedframe.resources.computing.profiles.energy.airthroughput.plugin.AirThroughputEstimationPlugin; 
     9import schedframe.resources.computing.profiles.energy.airthroughput.plugin.AirflowEstimationPlugin; 
    1010 
    11 public class AirThroughputProfile { 
     11public class AirflowProfile { 
    1212         
    13         protected List<AirFlowValue> airFlowHistory; 
     13        protected List<AirflowValue> airflowHistory; 
    1414         
    15         protected AirThroughputEstimationPlugin airThroughputEstimationPlugin; 
    16         protected List <AirThroughputState> airThroughputStates; 
     15        protected AirflowEstimationPlugin airflowEstimationPlugin; 
     16        protected List <AirflowState> airflowStates; 
    1717        protected Parameters parameters; 
    1818 
    19         public AirThroughputProfile(AirThroughputEstimationPlugin airThroughputEstimationPlugin, List<AirThroughputState> airThroughputStates) { 
     19        public AirflowProfile(AirflowEstimationPlugin airflowEstimationPlugin, List<AirflowState> airflowStates) { 
    2020                super(); 
    21                 this.airThroughputEstimationPlugin = airThroughputEstimationPlugin; 
    22                 this.airThroughputStates = airThroughputStates; 
    23                 this.airFlowHistory = new ArrayList<AirFlowValue>(); 
     21                this.airflowEstimationPlugin = airflowEstimationPlugin; 
     22                this.airflowStates = airflowStates; 
     23                this.airflowHistory = new ArrayList<AirflowValue>(); 
    2424        } 
    2525 
    26         public List<AirThroughputState> getAirThroughputStates() { 
    27                 return airThroughputStates; 
     26        public List<AirflowState> getAirflowStates() { 
     27                return airflowStates; 
    2828        } 
    2929         
    30         public void addToAirFlowHistory(double airFlow) { 
     30        public void addToAirFlowHistory(double airflow) { 
    3131 
    32                 if (airFlowHistory.size() == 0) { 
    33                         AirFlowValue usage = new AirFlowValue(DateTimeUtils.currentTimeMillis(), airFlow); 
    34                         airFlowHistory.add(usage); 
     32                if (airflowHistory.size() == 0) { 
     33                        AirflowValue usage = new AirflowValue(DateTimeUtils.currentTimeMillis(), airflow); 
     34                        airflowHistory.add(usage); 
    3535                        return; 
    3636                } 
    3737 
    38                 int lastIdx = airFlowHistory.size() - 1; 
    39                 double lastAirFlow = airFlowHistory.get(lastIdx).getValue(); 
    40                 if (lastAirFlow != airFlow) { 
    41                         AirFlowValue usage = airFlowHistory.get(lastIdx); 
     38                int lastIdx = airflowHistory.size() - 1; 
     39                double lastAirflow = airflowHistory.get(lastIdx).getValue(); 
     40                if (lastAirflow != airflow) { 
     41                        AirflowValue usage = airflowHistory.get(lastIdx); 
    4242                        long currentTime = DateTimeUtils.currentTimeMillis(); 
    4343                        if (usage.getTimestamp() == currentTime) { 
    44                                 usage.setValue(airFlow); 
    45                                 if(lastIdx > 0 && airFlowHistory.get(lastIdx - 1).getValue() == airFlow) 
    46                                         airFlowHistory.remove(usage); 
     44                                usage.setValue(airflow); 
     45                                if(lastIdx > 0 && airflowHistory.get(lastIdx - 1).getValue() == airflow) 
     46                                        airflowHistory.remove(usage); 
    4747                        } else { 
    48                                 usage = new AirFlowValue(DateTimeUtils.currentTimeMillis(), airFlow); 
    49                                 airFlowHistory.add(usage); 
     48                                usage = new AirflowValue(DateTimeUtils.currentTimeMillis(), airflow); 
     49                                airflowHistory.add(usage); 
    5050                        } 
    5151                } 
    5252        } 
    5353 
    54         public List<AirFlowValue> getAirThroughputHistory() { 
    55                 return airFlowHistory; 
     54        public List<AirflowValue> getAirflowHistory() { 
     55                return airflowHistory; 
    5656        } 
    5757         
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/airthroughput/AirflowState.java

    r477 r1396  
    33import schedframe.Parameters; 
    44 
    5 public class AirThroughputState { 
     5public class AirflowState { 
    66 
    7         protected String name; 
     7        protected AirflowStateName name; 
    88        protected double value; 
    99        protected double powerUsage; 
    1010         
    11         public AirThroughputState(String name, double value, double powerUsage) { 
     11        public AirflowState(AirflowStateName name, double value, double powerUsage) { 
    1212                super(); 
    1313                this.name = name; 
     
    1616        } 
    1717         
    18         public String getName() { 
     18        public AirflowStateName getName() { 
    1919                return name; 
    2020        } 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/airthroughput/AirflowStateName.java

    r753 r1396  
    11package schedframe.resources.computing.profiles.energy.airthroughput; 
    22 
    3 public interface AirThroughputStateName { 
     3public interface AirflowStateName { 
    44 
    5         public String getName(); 
     5        public String getLabel(); 
    66 
    77} 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/airthroughput/CustomAirflowStateName.java

    r753 r1396  
    22 
    33 
    4 public class UserAirThroughputStateName implements AirThroughputStateName{ 
     4public class CustomAirflowStateName implements AirflowStateName{ 
    55 
    66        protected String name; 
    77 
    8         public UserAirThroughputStateName(String name) { 
     8        public CustomAirflowStateName(String name) { 
    99                this.name = name; 
    1010        } 
    1111 
    12         public String getName() { 
     12        public String getLabel() { 
    1313                return name; 
    1414        } 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/airthroughput/StandardAirflowStateName.java

    r1207 r1396  
    11package schedframe.resources.computing.profiles.energy.airthroughput; 
    22 
    3 public enum  StandardAirThroughputStateName implements AirThroughputStateName{ 
     3public enum  StandardAirflowStateName implements AirflowStateName{ 
    44 
    55        ON, 
    66        OFF; 
    77 
    8         public String getName() { 
     8        public String getLabel() { 
    99                return toString(); 
    1010        } 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/airthroughput/plugin/AirflowEstimationPlugin.java

    r748 r1396  
    66import schedframe.scheduling.manager.tasks.JobRegistry; 
    77 
    8 public interface AirThroughputEstimationPlugin extends Plugin { 
     8public interface AirflowEstimationPlugin extends Plugin { 
    99         
    10         public double estimateAirThroughput(Event event, JobRegistry jobRegistry, ComputingResource resource); 
     10        public double estimateAirflow(Event event, JobRegistry jobRegistry, ComputingResource resource); 
    1111} 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/airthroughput/plugin/DefaultAirflowEstimationPlugin.java

    r770 r1396  
    77import schedframe.scheduling.manager.tasks.JobRegistry; 
    88 
    9 public class DefaultAirThroughputEstimationPlugin implements AirThroughputEstimationPlugin { 
     9public class DefaultAirflowEstimationPlugin implements AirflowEstimationPlugin { 
    1010 
    1111        @Override 
     
    2828 
    2929        @Override 
    30         public double estimateAirThroughput(Event event, JobRegistry jobRegistry, ComputingResource resource) { 
     30        public double estimateAirflow(Event event, JobRegistry jobRegistry, ComputingResource resource) { 
    3131                throw new RuntimeException("This interface is depracated. For air throughput estimation please use the estimateAirThroughput method form EnergyEstimationPlugin interface."); 
    3232        } 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/airthroughput/ui/AirflowInterface.java

    r1380 r1396  
    44 
    55import schedframe.Parameters; 
    6 import schedframe.resources.computing.profiles.energy.airthroughput.AirFlowValue; 
    7 import schedframe.resources.computing.profiles.energy.airthroughput.AirThroughputState; 
    8 import schedframe.resources.computing.profiles.energy.airthroughput.AirThroughputStateName; 
     6import schedframe.resources.computing.profiles.energy.airthroughput.AirflowValue; 
     7import schedframe.resources.computing.profiles.energy.airthroughput.AirflowState; 
     8import schedframe.resources.computing.profiles.energy.airthroughput.AirflowStateName; 
    99 
    10 public interface AirThroughputInterface { 
     10public interface AirflowInterface { 
    1111         
    12         public AirThroughputStateName getAirThroughputState(); 
     12        public AirflowStateName getAirflowState(); 
    1313         
    14         public boolean setAirThroughputState(AirThroughputStateName airThroughputState); 
     14        public boolean setAirflowState(AirflowStateName airflowState); 
    1515         
    16         public boolean supportAirThroughputState(AirThroughputStateName powerState); 
     16        public boolean supportAirflowState(AirflowStateName powerState); 
    1717         
    18         public List<AirThroughputState> getSupportedAirThroughputStates(); 
     18        public List<AirflowState> getSupportedAirflowStates(); 
    1919         
    20         public double getAirFlow(AirThroughputStateName state) throws NoSuchFieldException; 
     20        public double getAirflow(AirflowStateName state) throws NoSuchFieldException; 
    2121         
    22         public double getPowerConsumption(AirThroughputStateName state) throws NoSuchFieldException; 
     22        public double getPowerConsumption(AirflowStateName state) throws NoSuchFieldException; 
    2323         
    24         public AirFlowValue getRecentAirFlow(); 
     24        public AirflowValue getRecentAirflow(); 
    2525         
    26         List<AirFlowValue> getAirFlowHistory(); 
     26        List<AirflowValue> getAirflowHistory(); 
    2727         
    2828        public Parameters getParameters(); 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/airthroughput/ui/ComputingResourceAirflowInterface.java

    r1380 r1396  
    1010import schedframe.resources.computing.profiles.energy.EnergyEvent; 
    1111import schedframe.resources.computing.profiles.energy.EnergyEventType; 
    12 import schedframe.resources.computing.profiles.energy.airthroughput.AirFlowValue; 
    13 import schedframe.resources.computing.profiles.energy.airthroughput.AirThroughputProfile; 
    14 import schedframe.resources.computing.profiles.energy.airthroughput.AirThroughputState; 
    15 import schedframe.resources.computing.profiles.energy.airthroughput.AirThroughputStateName; 
    16 import schedframe.resources.computing.profiles.energy.airthroughput.StandardAirThroughputStateName; 
     12import schedframe.resources.computing.profiles.energy.airthroughput.AirflowValue; 
     13import schedframe.resources.computing.profiles.energy.airthroughput.AirflowProfile; 
     14import schedframe.resources.computing.profiles.energy.airthroughput.AirflowState; 
     15import schedframe.resources.computing.profiles.energy.airthroughput.AirflowStateName; 
     16import schedframe.resources.computing.profiles.energy.airthroughput.StandardAirflowStateName; 
    1717 
    18 public class ComputingResourceAirThroughputInterface implements AirThroughputInterface{ 
     18public class ComputingResourceAirflowInterface implements AirflowInterface{ 
    1919 
    20         protected AirThroughputStateName currentAirThroughputState; 
    21         protected AirThroughputProfile airThroughputProfile; 
     20        protected AirflowStateName currentAirflowState; 
     21        protected AirflowProfile airflowProfile; 
    2222        protected ComputingResource resource; 
    2323         
    24         public ComputingResourceAirThroughputInterface(ComputingResource resource, AirThroughputProfile airThroughputProfile){ 
     24        public ComputingResourceAirflowInterface(ComputingResource resource, AirflowProfile airflowProfile){ 
    2525                this.resource = resource; 
    26                 this.airThroughputProfile = airThroughputProfile; 
    27                 this.currentAirThroughputState = StandardAirThroughputStateName.ON; 
     26                this.airflowProfile = airflowProfile; 
     27                this.currentAirflowState = StandardAirflowStateName.ON; 
    2828        } 
    2929         
    30         public AirThroughputStateName getAirThroughputState() { 
    31                 return currentAirThroughputState; 
     30        public AirflowStateName getAirflowState() { 
     31                return currentAirflowState; 
    3232        } 
    3333 
    34         public boolean setAirThroughputState(AirThroughputStateName state) { 
    35                 if(supportAirThroughputState(state)){ 
    36                         currentAirThroughputState = state; 
     34        public boolean setAirflowState(AirflowStateName state) { 
     35                if(supportAirflowState(state)){ 
     36                        currentAirflowState = state; 
    3737                         
    3838                        //TO DO - notifications should be called for all resources starting form the lowest layer 
     
    4444        } 
    4545 
    46         public boolean supportAirThroughputState(AirThroughputStateName state) { 
    47                 for(AirThroughputState airFlowState: airThroughputProfile.getAirThroughputStates()){ 
    48                         if(airFlowState.getName().equals(state.getName())){ 
     46        public boolean supportAirflowState(AirflowStateName state) { 
     47                for(AirflowState airflowState: airflowProfile.getAirflowStates()){ 
     48                        if(airflowState.getName().equals(state.getLabel())){ 
    4949                                return true; 
    5050                        } 
     
    5353        } 
    5454 
    55         public List<AirThroughputState> getSupportedAirThroughputStates() { 
    56                 List<AirThroughputState> airThroughputStates = new ArrayList<AirThroughputState>(); 
    57                 for(AirThroughputState airFlowState: airThroughputProfile.getAirThroughputStates()){ 
    58                         airThroughputStates.add(airFlowState); 
     55        public List<AirflowState> getSupportedAirflowStates() { 
     56                List<AirflowState> airflowStates = new ArrayList<AirflowState>(); 
     57                for(AirflowState airflowState: airflowProfile.getAirflowStates()){ 
     58                        airflowStates.add(airflowState); 
    5959                } 
    60                 return airThroughputStates; 
     60                return airflowStates; 
    6161        } 
    6262 
    63         public double getAirFlow(AirThroughputStateName state) throws NoSuchFieldException { 
    64                 double airThroughput = 0; 
    65                 if(supportAirThroughputState(state)){ 
    66                         for(AirThroughputState airFlowState: airThroughputProfile.getAirThroughputStates()){ 
    67                                 if(airFlowState.getName().equals(state.getName())){ 
    68                                         airThroughput = airFlowState.getValue(); 
     63        public double getAirflow(AirflowStateName state) throws NoSuchFieldException { 
     64                double airflow = 0; 
     65                if(supportAirflowState(state)){ 
     66                        for(AirflowState airflowState: airflowProfile.getAirflowStates()){ 
     67                                if(airflowState.getName().equals(state.getLabel())){ 
     68                                        airflow = airflowState.getValue(); 
    6969                                        break; 
    7070                                } 
    7171                        } 
    7272                } 
    73                 return airThroughput; 
     73                return airflow; 
    7474        } 
    7575 
    76         public double getPowerConsumption(AirThroughputStateName state) throws NoSuchFieldException { 
     76        public double getPowerConsumption(AirflowStateName state) throws NoSuchFieldException { 
    7777                double powerConsumption = 0; 
    78                 if(supportAirThroughputState(state)){ 
    79                         for(AirThroughputState airFlowState: airThroughputProfile.getAirThroughputStates()){ 
    80                                 if(airFlowState.getName().equals(state.getName())){ 
    81                                         powerConsumption = airFlowState.getPowerUsage(); 
     78                if(supportAirflowState(state)){ 
     79                        for(AirflowState airflowState: airflowProfile.getAirflowStates()){ 
     80                                if(airflowState.getName().equals(state.getLabel())){ 
     81                                        powerConsumption = airflowState.getPowerUsage(); 
    8282                                        break; 
    8383                                } 
     
    8787        } 
    8888         
    89         public AirFlowValue getRecentAirFlow() { 
    90                 AirFlowValue airFlow = null; 
    91                 int lastIdx = getAirFlowHistory().size() - 1; 
     89        public AirflowValue getRecentAirflow() { 
     90                AirflowValue airflow = null; 
     91                int lastIdx = getAirflowHistory().size() - 1; 
    9292                if(lastIdx >= 0) 
    93                         airFlow = getAirFlowHistory().get(lastIdx); 
     93                        airflow = getAirflowHistory().get(lastIdx); 
    9494                else {   
    9595                        try { 
    96                                 airFlow = new AirFlowValue(DateTimeUtils.currentTimeMillis(), getAirFlow(currentAirThroughputState)); 
     96                                airflow = new AirflowValue(DateTimeUtils.currentTimeMillis(), getAirflow(currentAirflowState)); 
    9797                        } catch (NoSuchFieldException e) { 
    9898                        } 
    9999                } 
    100                 return airFlow; 
     100                return airflow; 
    101101        } 
    102102         
    103         public List<AirFlowValue> getAirFlowHistory(){ 
    104                 return airThroughputProfile.getAirThroughputHistory(); 
     103        public List<AirflowValue> getAirflowHistory(){ 
     104                return airflowProfile.getAirflowHistory(); 
    105105        } 
    106106         
    107107         
    108108        public Parameters getParameters() { 
    109                 return airThroughputProfile.getParameters(); 
     109                return airflowProfile.getParameters(); 
    110110        } 
    111111 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/power/CustomPowerStateName.java

    r477 r1396  
    11package schedframe.resources.computing.profiles.energy.power; 
    22 
    3 public class UserPowerStateName implements PowerStateName { 
     3public class CustomPowerStateName implements PowerStateName { 
    44 
    55        protected String name; 
    66 
    7         public UserPowerStateName(String name) { 
     7        public CustomPowerStateName(String name) { 
    88                this.name = name; 
    99        } 
    1010 
    11         public String getName() { 
     11        public String getLabel() { 
    1212                return name; 
    1313        } 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/power/PowerStateName.java

    r477 r1396  
    33public interface PowerStateName { 
    44         
    5         public String getName(); 
     5        public String getLabel(); 
    66 
    77} 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/power/PowerStateNameFactory.java

    r477 r1396  
    66        public static PowerStateName createPowerStateName (String powerStateName){ 
    77                 
    8                 if(powerStateName.equals(StandardPowerStateName.ON.getName())) 
     8                if(powerStateName.equals(StandardPowerStateName.ON.getLabel())) 
    99                        return StandardPowerStateName.ON; 
    1010                 
    11                 else if(powerStateName.equals(StandardPowerStateName.OFF.getName())) 
     11                else if(powerStateName.equals(StandardPowerStateName.OFF.getLabel())) 
    1212                        return StandardPowerStateName.OFF; 
    1313                 
    14                 else if(powerStateName.equals(StandardPowerStateName.HIBERNATE.getName())) 
     14                else if(powerStateName.equals(StandardPowerStateName.HIBERNATE.getLabel())) 
    1515                        return StandardPowerStateName.HIBERNATE; 
    1616                 
    17                 else if(powerStateName.equals(StandardPowerStateName.SLEEP.getName())) 
     17                else if(powerStateName.equals(StandardPowerStateName.SLEEP.getLabel())) 
    1818                        return StandardPowerStateName.SLEEP; 
    1919                 
    20                 else if(powerStateName.equals(StandardPowerStateName.SUSPEND.getName())) 
     20                else if(powerStateName.equals(StandardPowerStateName.SUSPEND.getLabel())) 
    2121                        return StandardPowerStateName.SUSPEND; 
    2222                 
    23                 else return new UserPowerStateName(powerStateName); 
     23                else return new CustomPowerStateName(powerStateName); 
    2424        } 
    2525} 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/power/StandardPowerStateName.java

    r477 r1396  
    1010        HIBERNATE; 
    1111 
    12         public String getName() { 
     12        public String getLabel() { 
    1313                return toString(); 
    1414        } 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/power/plugin/EnergyEstimationPlugin.java

    r1207 r1396  
    1010        public double estimatePowerConsumption(EnergyEvent event, JobRegistry jobRegistry, PhysicalResource resource); 
    1111 
    12         public double estimateAirThroughput(EnergyEvent event, JobRegistry jobRegistry, PhysicalResource resource); 
     12        public double estimateAirflow(EnergyEvent event, JobRegistry jobRegistry, PhysicalResource resource); 
    1313 
    1414        public double estimateTemperature(EnergyEvent event, JobRegistry jobRegistry, PhysicalResource resource); 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/power/ui/ComputingResourcePowerInterface.java

    r1374 r1396  
    7474        public boolean supportPowerState(PowerStateName state) { 
    7575                for(PowerState powerState: powerProfile.getSupportedPowerStates()){ 
    76                         if(powerState.getName().getName().equals(state.getName())){ 
     76                        if(powerState.getName().getLabel().equals(state.getLabel())){ 
    7777                                return true; 
    7878                        } 
     
    8686                if(supportPowerState(state)){ 
    8787                        for(PowerState powerState: powerProfile.getSupportedPowerStates()){ 
    88                                 if(powerState.getName().getName().equals(state.getName())){ 
     88                                if(powerState.getName().getLabel().equals(state.getLabel())){ 
    8989                                        powerConsumption = powerState.getPowerUsage(); 
    9090                                        break; 
Note: See TracChangeset for help on using the changeset viewer.