- Timestamp:
- 10/10/12 12:12:06 (13 years ago)
- Location:
- DCWoRMS/trunk/src/schedframe/resources/computing/profiles/energy/airthroughput/ui
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
DCWoRMS/trunk/src/schedframe/resources/computing/profiles/energy/airthroughput/ui/AirThroughputInterface.java
r477 r495 10 10 public String getAirThroughputState(); 11 11 12 public boolean setAirThroughputState(String airThroug putState);12 public boolean setAirThroughputState(String airThroughputState); 13 13 14 14 public boolean supportAirThroughputState(String powerState); -
DCWoRMS/trunk/src/schedframe/resources/computing/profiles/energy/airthroughput/ui/DefaultAirThroughputInterface.java
r477 r495 6 6 import schedframe.Parameters; 7 7 import schedframe.resources.computing.ComputingResource; 8 import schedframe.resources.computing.profiles.energy.EnergyEvent; 9 import schedframe.resources.computing.profiles.energy.EnergyEventType; 8 10 import schedframe.resources.computing.profiles.energy.airthroughput.AirThroughputProfile; 9 11 import schedframe.resources.computing.profiles.energy.airthroughput.AirThroughputState; 10 12 11 public class DefaultAirThroug putInterface implements AirThroughputInterface{13 public class DefaultAirThroughputInterface implements AirThroughputInterface{ 12 14 13 15 protected String currentAirThroughputState; 14 16 protected AirThroughputProfile airThroughputProfile; 15 17 protected ComputingResource resource; 18 19 public DefaultAirThroughputInterface(ComputingResource resource, AirThroughputProfile airThroughputProfile){ 20 this.resource = resource; 21 this.airThroughputProfile = airThroughputProfile; 22 } 16 23 17 24 public String getAirThroughputState() { … … 22 29 if(supportAirThroughputState(state)){ 23 30 currentAirThroughputState = state; 31 32 //TO DO - notifications should be called for all resources starting form the lowest layer 33 resource.handleEvent(new EnergyEvent(EnergyEventType.AIRFLOW_STATE_CHANGED, resource.getName())); 34 24 35 return true; 25 36 } … … 28 39 29 40 public boolean supportAirThroughputState(String state) { 30 31 41 for(AirThroughputState airFlowState: airThroughputProfile.getAirThroughputStates()){ 32 42 if(airFlowState.getName().equals(state)){
Note: See TracChangeset
for help on using the changeset viewer.