Ignore:
Timestamp:
01/07/13 14:53:57 (12 years ago)
Author:
wojtekp
Message:
 
File:
1 edited

Legend:

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

    r495 r755  
    1111import schedframe.resources.computing.extensions.ExtensionException; 
    1212import schedframe.resources.computing.extensions.ExtensionType; 
     13import schedframe.resources.computing.profiles.energy.airthroughput.AirThroughputInterfaceFactory; 
    1314import schedframe.resources.computing.profiles.energy.airthroughput.AirThroughputProfile; 
    1415import schedframe.resources.computing.profiles.energy.airthroughput.ui.AirThroughputInterface; 
     16import schedframe.resources.computing.profiles.energy.power.PowerInterfaceFactory; 
    1517import schedframe.resources.computing.profiles.energy.power.PowerProfile; 
    1618import schedframe.resources.computing.profiles.energy.power.ui.PowerInterface; 
     
    4244                this.airFlowProfile = airFlowProfile; 
    4345        } 
     46         
     47        public EnergyExtension(ComputingResource computingResource, PowerProfile powerProfile, 
     48                        AirThroughputProfile airFlowProfile) { 
     49                super(); 
     50                this.computingResource = computingResource; 
     51                this.powerProfile = powerProfile; 
     52                this.powerInterface = PowerInterfaceFactory.createPowerInterface(computingResource, powerProfile); 
     53                this.airFlowProfile = airFlowProfile; 
     54                this.airFlowInterface = AirThroughputInterfaceFactory.createAirThroughputInterface(computingResource, airFlowProfile); 
     55        } 
    4456 
    4557        public boolean supportsEvent(Event event) { 
     
    6274                 
    6375                else return false; 
    64  
    6576        } 
    6677 
     
    105116                        break; 
    106117                case AIRFLOW_STATE_CHANGED: 
    107                         System.out.println("====="); 
     118                        System.out.println("=====" + computingResource.getName()); 
    108119                        double airFlow = powerProfile.getEnergyEstimationPlugin().estimateAirThroughput(enEvent, new JobRegistryImpl(computingResource.getName()), computingResource); 
    109120                        airFlowProfile.addToPowerUsageHistory(airFlow); 
     
    122133        } 
    123134 
    124         public ComputingResource getResource() { 
     135        /*public ComputingResource getResource() { 
    125136                return computingResource; 
    126137        } 
     
    128139        public void setResource(ComputingResource compRes){ 
    129140                this.computingResource = compRes; 
    130         } 
     141        }*/ 
    131142 
    132143        public PowerInterface getPowerInterface() { 
Note: See TracChangeset for help on using the changeset viewer.