Index: DCWoRMS/trunk/src/example/energy/recs/CB1EnergyEstimationPlugin.java
===================================================================
--- DCWoRMS/trunk/src/example/energy/recs/CB1EnergyEstimationPlugin.java	(revision 783)
+++ DCWoRMS/trunk/src/example/energy/recs/CB1EnergyEstimationPlugin.java	(revision 783)
@@ -0,0 +1,25 @@
+package example.energy.recs;
+
+import schedframe.resources.computing.ComputeBox1;
+import schedframe.resources.computing.ComputingResource;
+import schedframe.resources.computing.NodeGroup;
+import schedframe.resources.computing.profiles.energy.EnergyEvent;
+import schedframe.resources.computing.profiles.energy.power.PowerUsage;
+import schedframe.scheduling.manager.tasks.JobRegistry;
+import example.energy.BaseEnergyEstimationPlugin;
+
+public class CB1EnergyEstimationPlugin extends BaseEnergyEstimationPlugin{
+
+	public double estimatePowerConsumption(EnergyEvent event, JobRegistry jobRegistry,
+			ComputingResource resource) {
+		double power = 0;
+		ComputeBox1 computeBox1 = (ComputeBox1)resource;
+		for(NodeGroup ng:computeBox1.getNodesGroups()){
+			PowerUsage powerUsage = ng.getPowerInterface().getRecentPowerUsage();
+			power += (powerUsage == null ? 0 : powerUsage.getValue());
+		}
+
+		return power;
+	}
+
+}
Index: DCWoRMS/trunk/src/example/energy/recs/NodeEnergyEstimationPlugin.java
===================================================================
--- DCWoRMS/trunk/src/example/energy/recs/NodeEnergyEstimationPlugin.java	(revision 783)
+++ DCWoRMS/trunk/src/example/energy/recs/NodeEnergyEstimationPlugin.java	(revision 783)
@@ -0,0 +1,31 @@
+package example.energy.recs;
+
+import schedframe.resources.computing.ComputingResource;
+import schedframe.resources.computing.Node;
+import schedframe.resources.computing.Processor;
+import schedframe.resources.computing.profiles.energy.EnergyEvent;
+import schedframe.scheduling.manager.tasks.JobRegistry;
+import example.energy.BaseEnergyEstimationPlugin;
+
+public class NodeEnergyEstimationPlugin extends BaseEnergyEstimationPlugin {
+
+	public double estimatePowerConsumption(EnergyEvent event, JobRegistry jobRegistry,
+			ComputingResource resource) {
+		double powerConsumption = 0;
+		Node node = (Node) resource;
+		for(Processor cpu: node.getProcessors()){
+			try{
+				powerConsumption = powerConsumption + cpu.getPowerInterface().getRecentPowerUsage().getValue();
+			} catch (Exception e){
+				
+			}
+		}
+		try {
+			powerConsumption = powerConsumption + node.getPowerInterface().getPowerConsumption(node.getPowerInterface().getPowerState());
+		} catch (NoSuchFieldException e) {
+		}
+
+		return powerConsumption;
+	}
+
+}
Index: DCWoRMS/trunk/src/example/energy/recs/ProcessorEnergyEstimationPlugin.java
===================================================================
--- DCWoRMS/trunk/src/example/energy/recs/ProcessorEnergyEstimationPlugin.java	(revision 783)
+++ DCWoRMS/trunk/src/example/energy/recs/ProcessorEnergyEstimationPlugin.java	(revision 783)
@@ -0,0 +1,37 @@
+package example.energy.recs;
+
+import example.energy.BaseEnergyEstimationPlugin;
+import schedframe.resources.ResourceStatus;
+import schedframe.resources.computing.ComputingResource;
+import schedframe.resources.computing.Processor;
+import schedframe.resources.computing.profiles.energy.EnergyEvent;
+import schedframe.resources.computing.profiles.energy.power.StandardPowerStateName;
+import schedframe.scheduling.manager.tasks.JobRegistry;
+
+public class ProcessorEnergyEstimationPlugin extends BaseEnergyEstimationPlugin  {
+
+	public double estimatePowerConsumption(EnergyEvent event, JobRegistry jobRegistry,
+			ComputingResource resource) {
+		double powerConsumption;
+		Processor cpu = (Processor)resource;
+		if(resource.getPowerInterface().getPowerState().equals(StandardPowerStateName.OFF))
+			powerConsumption = 0;
+		else {
+			try {
+				if(resource.getStatus() == ResourceStatus.BUSY)
+					powerConsumption = cpu.getPowerInterface().getPowerConsumption(cpu.getPowerInterface().getPState());
+				else {
+					powerConsumption = cpu.getPowerInterface().getPowerConsumption(StandardPowerStateName.ON);
+				}
+			} catch (NoSuchFieldException e) {
+				try {
+					powerConsumption = cpu.getPowerInterface().getPowerConsumption(StandardPowerStateName.ON);
+				} catch (NoSuchFieldException e1) {
+					powerConsumption = 10;
+				}
+			}
+		}
+		return powerConsumption;
+	}
+
+}
Index: DCWoRMS/trunk/src/example/energy/recs/NodeGroupEnergyEstimationPlugin.java
===================================================================
--- DCWoRMS/trunk/src/example/energy/recs/NodeGroupEnergyEstimationPlugin.java	(revision 783)
+++ DCWoRMS/trunk/src/example/energy/recs/NodeGroupEnergyEstimationPlugin.java	(revision 783)
@@ -0,0 +1,25 @@
+package example.energy.recs;
+
+import schedframe.resources.computing.ComputingResource;
+import schedframe.resources.computing.Node;
+import schedframe.resources.computing.NodeGroup;
+import schedframe.resources.computing.profiles.energy.EnergyEvent;
+import schedframe.resources.computing.profiles.energy.power.PowerUsage;
+import schedframe.scheduling.manager.tasks.JobRegistry;
+import example.energy.BaseEnergyEstimationPlugin;
+
+public class NodeGroupEnergyEstimationPlugin extends BaseEnergyEstimationPlugin{
+
+	public double estimatePowerConsumption(EnergyEvent event, JobRegistry jobRegistry,
+			ComputingResource resource) {
+		double power = 0;
+		NodeGroup nodeGroup = (NodeGroup)resource;
+		for(Node cn: nodeGroup.getNodes()){
+			PowerUsage powerUsage = cn.getPowerInterface().getRecentPowerUsage();
+			power += (powerUsage == null ? 0 : powerUsage.getValue());
+		}
+
+		return power;
+	}
+
+}
