Index: xssim/trunk/src/test/rewolucja/energy/profile/CPUPowerProfileFactory.java
===================================================================
--- xssim/trunk/src/test/rewolucja/energy/profile/CPUPowerProfileFactory.java	(revision 104)
+++ xssim/trunk/src/test/rewolucja/energy/profile/CPUPowerProfileFactory.java	(revision 130)
@@ -1,4 +1,8 @@
 package test.rewolucja.energy.profile;
 
+import test.rewolucja.energy.profile.implementation.CPUPowerProfile;
+import test.rewolucja.energy.profile.implementation.CPU_A_PowerProfile;
+import test.rewolucja.energy.profile.implementation.CPU_B_PowerProfile;
+import test.rewolucja.energy.profile.implementation.CPU_C_PowerProfile;
 import test.rewolucja.resources.Category;
 
Index: xssim/trunk/src/test/rewolucja/energy/profile/PowerProfileFactory.java
===================================================================
--- xssim/trunk/src/test/rewolucja/energy/profile/PowerProfileFactory.java	(revision 125)
+++ xssim/trunk/src/test/rewolucja/energy/profile/PowerProfileFactory.java	(revision 130)
@@ -2,4 +2,7 @@
 
 import test.rewolucja.energy.extension.EnergyExtension;
+import test.rewolucja.energy.profile.implementation.CPU_A_PowerProfile;
+import test.rewolucja.energy.profile.implementation.ComputingNodePowerProfile;
+import test.rewolucja.energy.profile.implementation.DataCenterPowerProfile;
 import test.rewolucja.resources.Category;
 import test.rewolucja.resources.ResourceType;
Index: xssim/trunk/src/test/rewolucja/energy/profile/ProcessorFrequencyState.java
===================================================================
--- xssim/trunk/src/test/rewolucja/energy/profile/ProcessorFrequencyState.java	(revision 104)
+++ 	(revision )
@@ -1,26 +1,0 @@
-package test.rewolucja.energy.profile;
-
-
-public enum ProcessorFrequencyState {
-	CPU_FREQ_3(3000, 350),
-	CPU_FREQ_2_66(2660, 343),
-	CPU_FREQ_2_33(2330, 337),
-	CPU_FREQ_2(2000, 330);
-
-	protected double frequency;
-	protected double powerUsage;
-	
-	private ProcessorFrequencyState(double freq, double powerUsage){
-		this.frequency = freq;
-		this.powerUsage = powerUsage;
-	}
-	
-	public double getFrequency() {
-		return frequency;
-	}
-
-	public double getPowerUsage() {
-		return powerUsage;
-	}
-
-}
Index: xssim/trunk/src/test/rewolucja/energy/profile/CPU_A_PowerProfile.java
===================================================================
--- xssim/trunk/src/test/rewolucja/energy/profile/CPU_A_PowerProfile.java	(revision 104)
+++ 	(revision )
@@ -1,34 +1,0 @@
-package test.rewolucja.energy.profile;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-
-
-public class CPU_A_PowerProfile extends CPUPowerProfile{
-
-	public CPU_A_PowerProfile() {
-		//pState = getSupportedPStates().get(PStateType.P0);
-	}
-	
-	public Map<PStateType, PState> getSupportedPStates(){
-		return ModelA.getConfiguration();
-	}
-	
-	private static class ModelA{
-		private static final Map<PStateType, PState> pStates;
-		static {
-			Map<PStateType, PState> pStatesMap = new HashMap<PStateType, PState>();
-			pStatesMap.put(PStateType.P0, new PState(PStateType.P0, 3000, 0, 350));
-			pStatesMap.put(PStateType.P1, new PState(PStateType.P1, 2660, 0, 343));
-			pStatesMap.put(PStateType.P2, new PState(PStateType.P2, 2330, 0, 337));
-			pStatesMap.put(PStateType.P3, new PState(PStateType.P3, 2000, 0, 330));
-			pStates = Collections.unmodifiableMap(pStatesMap);
-		}
-		
-		public static Map<PStateType, PState> getConfiguration(){
-			return pStates;
-		}
-	}
-
-}
Index: xssim/trunk/src/test/rewolucja/energy/profile/CPUPowerProfile.java
===================================================================
--- xssim/trunk/src/test/rewolucja/energy/profile/CPUPowerProfile.java	(revision 104)
+++ 	(revision )
@@ -1,136 +1,0 @@
-package test.rewolucja.energy.profile;
-
-import gridsim.GridSimTags;
-import gridsim.gssim.GssimTags;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import schedframe.resources.PowerState;
-import schedframe.resources.units.CpuSpeed;
-import schedframe.scheduling.utils.ResourceParameterName;
-import test.rewolucja.energy.EnergyEvent;
-import test.rewolucja.energy.EnergyEventType;
-import test.rewolucja.energy.extension.EnergyExtension;
-import test.rewolucja.extensions.ExtensionType;
-import test.rewolucja.resources.ResourceStatus;
-import test.rewolucja.resources.physical.implementation.CPU;
-
-public class CPUPowerProfile extends AbstractPowerProfile{
-
-	protected CPU cpu;
-	protected PState pState;
-
-	public CPUPowerProfile(){
-		powerState = PowerState.ON;
-		pState = getSupportedPStates().get(PStateType.P0);
-	}
-
-	public void visit(CPU p){
-		cpu = p;
-		energyExtension = (EnergyExtension) cpu.getExtensionList().getExtension(ExtensionType.ENERGY_EXTENSION);
-	}
-
-	public boolean setPowerState(PowerState state){
-		if(!supportPowerState(state))
-			return false;
-		powerState = state;
-
-		if(state == PowerState.OFF){
-			cpu.setStatus(ResourceStatus.NOTAVAILABLE);
-		}
-		else if(state == PowerState.ON){
-			cpu.setStatus(ResourceStatus.FREE);
-		}
-		
-		cpu.handleEvent(new EnergyEvent(EnergyEventType.POWER_STATE_CHANGED, cpu.getName()));
-		return true;
-	}
-
-	
-	public double getPowerConsumption(PowerState state) {
-		if(powerState == PowerState.OFF)
-			return 0;
-		else if(powerState == PowerState.ON){
-			if(cpu.getStatus() == ResourceStatus.BUSY)
-				return getPState().getPower();
-			else if(cpu.getStatus() == ResourceStatus.FREE)
-				return getPState().getPower()/1.25;
-		}
-		return 1;
-	}
-
-
-	public boolean supportPowerState(PowerState state) {
-		switch(state){
-			case ON: 
-				return true;
-			case OFF: 
-				return true;
-			default: return false;
-		}
-	}
-
-	public List<PowerState> getSupportedPowerStates() {
-		return Arrays.asList(new PowerState[]{PowerState.ON, PowerState.OFF});
-	}
-
-	
-	public double getFrequency() {
-		return pState.getFrequency();
-	}
-
-	public boolean setFrequency(double freq) {
-		for(PStateType pStateType: getSupportedPStates().keySet()){
-			if(getSupportedPStates().get(pStateType).getFrequency() == freq){
-				setPState(pStateType);
-				return true;
-			}
-		}
-		return false;
-	}
-
-	public PState getPState(){
-		return pState;
-	}
-	
-	public boolean setPState(PStateType pStateType){
-		PState newPState = getSupportedPStates().get(pStateType);
-		if(newPState != null)
-		{
-			double factor = pState.getFrequency()/newPState.getFrequency();
-			pState = newPState;
-			CpuSpeed speed = (CpuSpeed )cpu.getResourceCharacteristic().getResourceUnits().get(ResourceParameterName.CPUSPEED).get(0);
-			//speed.setAmount((int)pState.getFrequency());
-
-			cpu.handleEvent(new EnergyEvent(EnergyEventType.FREQUENCY_CHANGED, cpu.getName()));
-			cpu.getLogicalResource().sendInternal(GridSimTags.SCHEDULE_NOW, GssimTags.UPDATE, cpu.getName());
-			return true;
-		}
-		return false;
-	}
-	
-	public Map<PStateType, PState> getSupportedPStates(){
-		return DefaultModel.getConfiguration();
-	}
-	
-	private static class DefaultModel{
-		private static Map<PStateType, PState> pStates;
-		static {
-			Map<PStateType, PState> pStatesMap = new HashMap<PStateType, PState>();
-			pStatesMap.put(PStateType.P0, new PState(PStateType.P0, 3000, 0, 350));
-			pStatesMap.put(PStateType.P1, new PState(PStateType.P1, 2660, 0, 343));
-			pStatesMap.put(PStateType.P2, new PState(PStateType.P2, 2330, 0, 337));
-			pStatesMap.put(PStateType.P3, new PState(PStateType.P3, 2000, 0, 330));
-			pStates = Collections.unmodifiableMap(pStatesMap);
-		}
-		
-		public static Map<PStateType, PState> getConfiguration(){
-			return pStates;
-		}
-	}
-}
-
Index: xssim/trunk/src/test/rewolucja/energy/profile/CPU_B_PowerProfile.java
===================================================================
--- xssim/trunk/src/test/rewolucja/energy/profile/CPU_B_PowerProfile.java	(revision 104)
+++ 	(revision )
@@ -1,33 +1,0 @@
-package test.rewolucja.energy.profile;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-
-
-public class CPU_B_PowerProfile extends CPUPowerProfile{
-
-	public CPU_B_PowerProfile() {
-		//pState = getSupportedPStates().get(PStateType.P0);
-	}
-	
-	public Map<PStateType, PState> getSupportedPStates(){
-		return ModelB.getConfiguration();
-	}
-	
-	private static class ModelB{
-		private static final Map<PStateType, PState> pStates;
-		static {
-			Map<PStateType, PState> pStatesMap = new HashMap<PStateType, PState>();
-			pStatesMap.put(PStateType.P0, new PState(PStateType.P0, 2660, 0, 363));
-			pStatesMap.put(PStateType.P1, new PState(PStateType.P1, 2330, 0, 357));
-			pStatesMap.put(PStateType.P2, new PState(PStateType.P2, 2000, 0, 350));
-			pStatesMap.put(PStateType.P3, new PState(PStateType.P3, 1860, 0, 343));
-			pStates = Collections.unmodifiableMap(pStatesMap);
-		}
-		
-		public static Map<PStateType, PState> getConfiguration(){
-			return pStates;
-		}
-	}
-}
Index: xssim/trunk/src/test/rewolucja/energy/profile/ResourcePowerProfile.java
===================================================================
--- xssim/trunk/src/test/rewolucja/energy/profile/ResourcePowerProfile.java	(revision 104)
+++ 	(revision )
@@ -1,42 +1,0 @@
-package test.rewolucja.energy.profile;
-
-import java.util.List;
-
-import schedframe.resources.PowerState;
-import test.rewolucja.energy.extension.EnergyExtension;
-
-public class ResourcePowerProfile extends AbstractPowerProfile{
-
-
-	public ResourcePowerProfile(EnergyExtension ee){
-		this.energyExtension = ee;
-	}
-	@Override
-	public PowerState getPowerState() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public boolean setPowerState(PowerState state) {
-		// TODO Auto-generated method stub
-		return false;
-	}
-	@Override
-	public boolean supportPowerState(PowerState state) {
-		// TODO Auto-generated method stub
-		return false;
-	}
-	@Override
-	public List<PowerState> getSupportedPowerStates() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-	@Override
-	public double getPowerConsumption(PowerState state) {
-		// TODO Auto-generated method stub
-		return 0;
-	}
-
-
-}
Index: xssim/trunk/src/test/rewolucja/energy/profile/CPU_C_PowerProfile.java
===================================================================
--- xssim/trunk/src/test/rewolucja/energy/profile/CPU_C_PowerProfile.java	(revision 104)
+++ 	(revision )
@@ -1,34 +1,0 @@
-package test.rewolucja.energy.profile;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-
-
-
-public class CPU_C_PowerProfile extends CPUPowerProfile{
-
-	public CPU_C_PowerProfile() {
-		//pState = getSupportedPStates().get(PStateType.P0);
-	}
-	
-	public Map<PStateType, PState> getSupportedPStates(){
-		return ModelC.getConfiguration();
-	}
-	
-	private static class ModelC{
-		private static final Map<PStateType, PState> pStates;
-		static {
-			Map<PStateType, PState> pStatesMap = new HashMap<PStateType, PState>();
-			pStatesMap.put(PStateType.P0, new PState(PStateType.P0, 2330, 0, 367));
-			pStatesMap.put(PStateType.P1, new PState(PStateType.P1, 2000, 0, 360));
-			pStatesMap.put(PStateType.P2, new PState(PStateType.P2, 1860, 0, 353));
-			pStatesMap.put(PStateType.P3, new PState(PStateType.P3, 1600, 0, 346));
-			pStates = Collections.unmodifiableMap(pStatesMap);
-		}
-		
-		public static Map<PStateType, PState> getConfiguration(){
-			return pStates;
-		}
-	}
-}
Index: xssim/trunk/src/test/rewolucja/energy/profile/DataCenterPowerProfile.java
===================================================================
--- xssim/trunk/src/test/rewolucja/energy/profile/DataCenterPowerProfile.java	(revision 104)
+++ 	(revision )
@@ -1,58 +1,0 @@
-package test.rewolucja.energy.profile;
-
-import java.util.Arrays;
-import java.util.List;
-
-import schedframe.resources.PowerState;
-import test.rewolucja.energy.extension.EnergyExtension;
-import test.rewolucja.extensions.ExtensionType;
-import test.rewolucja.resources.ResourceStatus;
-import test.rewolucja.resources.physical.base.ComputingResource;
-import test.rewolucja.resources.physical.implementation.DataCenter;
-
-public class DataCenterPowerProfile extends AbstractPowerProfile {
-
-	protected DataCenter dataCenter;
-	
-	DataCenterPowerProfile(){
-		powerState = PowerState.ON;
-	}
-	
-	public void visit(DataCenter dataCent){
-		dataCenter = dataCent;
-		energyExtension = (EnergyExtension) dataCenter.getExtensionList().getExtension(ExtensionType.ENERGY_EXTENSION);
-	}
-
-	public boolean setPowerState(PowerState state) {
-		if(!supportPowerState(state))
-			return false;
-		powerState = state;
-		if(dataCenter.getChildren() != null)
-		{
-			for(ComputingResource child: dataCenter.getChildren()){
-				child.getPowerInterface().setPowerState(state);
-			}
-		}
-		return true;
-	}
-
-	public double getPowerConsumption(PowerState state) {
-		throw new RuntimeException("not implememted");
-	}
-	
-	public boolean supportPowerState(PowerState state) {
-		switch(state){
-			case ON: 
-				return true;
-			case OFF: 
-				return true;
-			default: return false;
-		}
-	}
-
-	public List<PowerState> getSupportedPowerStates() {
-		return Arrays.asList(new PowerState[]{PowerState.ON, PowerState.OFF});
-	}
-
-
-}
Index: xssim/trunk/src/test/rewolucja/energy/profile/ComputingNodePowerProfile.java
===================================================================
--- xssim/trunk/src/test/rewolucja/energy/profile/ComputingNodePowerProfile.java	(revision 104)
+++ 	(revision )
@@ -1,79 +1,0 @@
-package test.rewolucja.energy.profile;
-
-import java.util.Arrays;
-import java.util.List;
-
-import schedframe.resources.PowerState;
-import test.rewolucja.energy.extension.EnergyExtension;
-import test.rewolucja.extensions.ExtensionType;
-import test.rewolucja.resources.ResourceStatus;
-import test.rewolucja.resources.physical.base.ComputingResource;
-import test.rewolucja.resources.physical.implementation.ComputingNode;
-
-public class ComputingNodePowerProfile extends AbstractPowerProfile{
-
-	protected ComputingNode computingNode;
-
-	public ComputingNodePowerProfile(){
-		powerState = PowerState.ON;
-	}
-	
-	public void visit(ComputingNode compNode){
-		computingNode = compNode;
-		energyExtension = (EnergyExtension) computingNode.getExtensionList().getExtension(ExtensionType.ENERGY_EXTENSION);
-	}
-	
-	public boolean setPowerState(PowerState state){
-		if(!supportPowerState(state))
-			return false;
-		powerState = state;
-		if(computingNode.getProcessors() != null)
-		{
-			for(ComputingResource child:computingNode.getProcessors()){
-				child.getPowerInterface().setPowerState(state);
-			}
-		}
-		if(state == PowerState.OFF){
-			computingNode.setStatus(ResourceStatus.NOTAVAILABLE);
-		}
-		else if(state == PowerState.ON){
-			computingNode.setStatus(ResourceStatus.FREE);
-		}
-		return true;
-	}
-	
-	public double getPowerConsumption(PowerState state) {
-		if(powerState == PowerState.OFF)
-			return 0;
-		else if(powerState == PowerState.ON)
-			return 750;
-		else return 500;
-	}
-
-	public boolean supportPowerState(PowerState state) {
-		switch(state){
-			case ON: 
-				return true;
-			case OFF: 
-				return true;
-			case SLEEP: 
-				return true;
-			case HIBERNATE: 
-				return true;
-			default: return false;
-		}
-	}
-
-	public List<PowerState> getSupportedPowerStates() {
-		return Arrays.asList(new PowerState[]{PowerState.ON, PowerState.OFF, PowerState.SLEEP, PowerState.HIBERNATE});
-	}
-
-	public void turnOn(){
-		setPowerState(PowerState.ON);
-	}
-	
-	public void turnOff(){
-		setPowerState(PowerState.OFF);
-	}
-
-}
