new interface format without passive/active

+ energy method renamed
This commit is contained in:
fros4943 2008-10-28 17:02:58 +00:00
parent 3ee86789e2
commit 9faae40d7c
9 changed files with 29 additions and 83 deletions

View file

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: ESBButton.java,v 1.1 2008/02/07 14:54:16 fros4943 Exp $
* $Id: ESBButton.java,v 1.2 2008/10/28 17:02:58 fros4943 Exp $
*/
package se.sics.cooja.mspmote.interfaces;
@ -77,14 +77,8 @@ public class ESBButton extends Button {
return false;
}
public void doActionsBeforeTick() {
}
public void doActionsAfterTick() {
}
public double energyConsumptionPerTick() {
return 0.0;
public double energyConsumption() {
return 0;
}
public JPanel getInterfaceVisualizer() {

View file

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: ESBLED.java,v 1.3 2008/06/27 14:10:00 nifi Exp $
* $Id: ESBLED.java,v 1.4 2008/10/28 17:02:58 fros4943 Exp $
*/
package se.sics.cooja.mspmote.interfaces;
@ -88,14 +88,8 @@ public class ESBLED extends LED implements PortListener {
return redOn;
}
public void doActionsBeforeTick() {
}
public void doActionsAfterTick() {
}
public double energyConsumptionPerTick() {
return 0.0;
public double energyConsumption() {
return 0;
}
public JPanel getInterfaceVisualizer() {

View file

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: ESBLog.java,v 1.2 2008/10/03 10:39:29 fros4943 Exp $
* $Id: ESBLog.java,v 1.3 2008/10/28 17:02:58 fros4943 Exp $
*/
package se.sics.cooja.mspmote.interfaces;
@ -67,12 +67,6 @@ public class ESBLog extends Log implements USARTListener {
return lastLogMessage;
}
public void doActionsBeforeTick() {
}
public void doActionsAfterTick() {
}
public JPanel getInterfaceVisualizer() {
JPanel panel = new JPanel();
panel.setLayout(new BorderLayout());
@ -114,8 +108,8 @@ public class ESBLog extends Log implements USARTListener {
this.deleteObserver(observer);
}
public double energyConsumptionPerTick() {
return 0.0;
public double energyConsumption() {
return 0;
}
public Collection<Element> getConfigXML() {

View file

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: MspClock.java,v 1.2 2008/09/17 17:39:37 nifi Exp $
* $Id: MspClock.java,v 1.3 2008/10/28 17:03:37 fros4943 Exp $
*/
package se.sics.cooja.mspmote.interfaces;
@ -69,12 +69,6 @@ public class MspClock extends Clock {
myMote.cycleDrift = MspMote.NR_CYCLES_PER_MSEC * drift;
}
public void doActionsBeforeTick() {
}
public void doActionsAfterTick() {
}
public JPanel getInterfaceVisualizer() {
return null;
}
@ -82,8 +76,8 @@ public class MspClock extends Clock {
public void releaseInterfaceVisualizer(JPanel panel) {
}
public double energyConsumptionPerTick() {
return 0.0;
public double energyConsumption() {
return 0;
}
public Collection<Element> getConfigXML() {

View file

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: SkyButton.java,v 1.1 2008/06/27 14:07:05 nifi Exp $
* $Id: SkyButton.java,v 1.2 2008/10/28 17:03:37 fros4943 Exp $
*/
package se.sics.cooja.mspmote.interfaces;
@ -72,14 +72,8 @@ public class SkyButton extends Button {
return false;
}
public void doActionsBeforeTick() {
}
public void doActionsAfterTick() {
}
public double energyConsumptionPerTick() {
return 0.0;
public double energyConsumption() {
return 0;
}
public JPanel getInterfaceVisualizer() {

View file

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: SkyByteRadio.java,v 1.1 2008/10/09 11:12:29 joxe Exp $
* $Id: SkyByteRadio.java,v 1.2 2008/10/28 17:03:37 fros4943 Exp $
*/
package se.sics.cooja.mspmote.interfaces;
@ -113,12 +113,12 @@ public class SkyByteRadio extends Radio implements CustomDataRadio {
notifyObservers();
buffer[len++] = data;
if (len == 6) {
// System.out.println("## CC2420 Packet of length: " + data + " expected...");
expLen = data + 6;
}
if (len == expLen) {
/*logger.debug("----- SKY CUSTOM DATA TRANSMITTED -----");*/
/* TODO: fix conversion later... */
@ -131,7 +131,7 @@ public class SkyByteRadio extends Radio implements CustomDataRadio {
setChanged();
notifyObservers();
// System.out.println("## CC2420 Transmission finished...");
lastEventTime = myMote.getSimulation().getSimulationTime();
@ -269,16 +269,10 @@ public class SkyByteRadio extends Radio implements CustomDataRadio {
cc2420.setRSSI((int) signalStrength);
}
public double energyConsumptionPerTick() {
public double energyConsumption() {
return 0;
}
public void doActionsBeforeTick() {
}
public void doActionsAfterTick() {
}
public JPanel getInterfaceVisualizer() {
// Location
JPanel wrapperPanel = new JPanel(new BorderLayout());

View file

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: SkyFlash.java,v 1.3 2008/06/27 14:05:08 nifi Exp $
* $Id: SkyFlash.java,v 1.4 2008/10/28 17:04:08 fros4943 Exp $
*/
package se.sics.cooja.mspmote.interfaces;
@ -79,12 +79,6 @@ public class SkyFlash extends MoteInterface {
}
}
public void doActionsBeforeTick() {
}
public void doActionsAfterTick() {
}
public JPanel getInterfaceVisualizer() {
JPanel panel = new JPanel();
// panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
@ -201,7 +195,7 @@ public class SkyFlash extends MoteInterface {
return fileData;
}
public double energyConsumptionPerTick() {
public double energyConsumption() {
return 0;
}

View file

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: SkyLED.java,v 1.1 2008/02/11 15:53:28 fros4943 Exp $
* $Id: SkyLED.java,v 1.2 2008/10/28 17:04:08 fros4943 Exp $
*/
package se.sics.cooja.mspmote.interfaces;
@ -97,14 +97,8 @@ public class SkyLED extends LED {
return redOn;
}
public void doActionsBeforeTick() {
}
public void doActionsAfterTick() {
}
public double energyConsumptionPerTick() {
return 0.0;
public double energyConsumption() {
return 0;
}
public JPanel getInterfaceVisualizer() {

View file

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: SkyRadio.java,v 1.7 2008/09/17 14:37:23 nifi Exp $
* $Id: SkyRadio.java,v 1.8 2008/10/28 17:04:50 fros4943 Exp $
*/
package se.sics.cooja.mspmote.interfaces;
@ -130,9 +130,9 @@ public class SkyRadio extends Radio implements CustomDataRadio {
// cc2420.addOperatingModeListener(new OperatingModeListener() {
//
// public void modeChanged(Chip source, int mode) {
// SkyRadio.this.mode = mode;
// SkyRadio.this.mode = mode;
// }
//
//
// });
}
@ -257,16 +257,10 @@ public class SkyRadio extends Radio implements CustomDataRadio {
cc2420.setRSSI((int) signalStrength);
}
public double energyConsumptionPerTick() {
public double energyConsumption() {
return 0;
}
public void doActionsBeforeTick() {
}
public void doActionsAfterTick() {
}
public JPanel getInterfaceVisualizer() {
// Location
JPanel wrapperPanel = new JPanel(new BorderLayout());