removed energyConsumption() method from mote interface: obsolete, we should instead interface Contiki's power profiler or MSPSim for better estimations

+
added stub removed() method: mote interfaces that need explicit cleanup should override this method
This commit is contained in:
fros4943 2009-11-13 08:41:06 +00:00
parent 499c3b8c26
commit 467cf88bcd

View file

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: MoteInterface.java,v 1.6 2009/04/20 16:08:53 fros4943 Exp $
* $Id: MoteInterface.java,v 1.7 2009/11/13 08:41:06 fros4943 Exp $
*/
package se.sics.cooja;
@ -116,21 +116,6 @@ public abstract class MoteInterface extends Observable {
*/
public abstract void releaseInterfaceVisualizer(JPanel panel);
/**
* Returns total energy (mQ) consumed by this interface.
*
* The interface is responsible to gather information about the current
* internal state, and calculate whatever energy it needs in that state and
* during one tick.
*
* This method is typically used battery interface, to keep track of the
* mote energy consumption.
*
* @see se.sics.cooja.interfaces.Battery
* @return Total energy consumption of mote interface
*/
public abstract double energyConsumption();
/**
* Returns XML elements representing the current config of this mote
* interface. This is fetched by the simulator for example when saving a
@ -155,5 +140,12 @@ public abstract class MoteInterface extends Observable {
*/
public abstract void setConfigXML(Collection<Element> configXML,
boolean visAvailable);
/**
* Called to free resources used by the mote interface.
* This method is called when the mote is removed from the simulation.
*/
public void removed() {
}
}