mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-23 01:29:33 +00:00
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:
parent
499c3b8c26
commit
467cf88bcd
@ -26,7 +26,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* 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;
|
package se.sics.cooja;
|
||||||
@ -116,21 +116,6 @@ public abstract class MoteInterface extends Observable {
|
|||||||
*/
|
*/
|
||||||
public abstract void releaseInterfaceVisualizer(JPanel panel);
|
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
|
* Returns XML elements representing the current config of this mote
|
||||||
* interface. This is fetched by the simulator for example when saving a
|
* interface. This is fetched by the simulator for example when saving a
|
||||||
@ -156,4 +141,11 @@ public abstract class MoteInterface extends Observable {
|
|||||||
public abstract void setConfigXML(Collection<Element> configXML,
|
public abstract void setConfigXML(Collection<Element> configXML,
|
||||||
boolean visAvailable);
|
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() {
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user