[cooja] Radio802154: Added @Override annotations

Also removed some unused imports
This commit is contained in:
Enrico Joerns 2014-10-02 01:40:07 +02:00
parent c5e034fa1a
commit c7abba860f

View file

@ -29,12 +29,7 @@
*/
package org.contikios.cooja.emulatedmote;
import java.awt.BorderLayout;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.*;
import javax.swing.*;
import org.apache.log4j.Logger;
import org.jdom.Element;
@ -132,26 +127,32 @@ public abstract class Radio802154 extends Radio implements CustomDataRadio {
}
/* Packet radio support */
@Override
public RadioPacket getLastPacketTransmitted() {
return lastOutgoingPacket;
}
@Override
public RadioPacket getLastPacketReceived() {
return lastIncomingPacket;
}
@Override
public void setReceivedPacket(RadioPacket packet) {
}
/* Custom data radio support */
@Override
public Object getLastCustomDataTransmitted() {
return lastOutgoingByte;
}
@Override
public Object getLastCustomDataReceived() {
return lastIncomingByte;
}
@Override
public void receiveCustomData(Object data) {
if (data instanceof RadioByte) {
lastIncomingByte = (RadioByte) data;
@ -160,14 +161,17 @@ public abstract class Radio802154 extends Radio implements CustomDataRadio {
}
/* General radio support */
@Override
public boolean isTransmitting() {
return isTransmitting;
}
@Override
public boolean isReceiving() {
return isReceiving;
}
@Override
public boolean isInterfered() {
return isInterfered;
}
@ -176,23 +180,31 @@ public abstract class Radio802154 extends Radio implements CustomDataRadio {
protected abstract void handleEndOfReception();
@Override
public abstract int getChannel();
public abstract int getFrequency();
@Override
public abstract boolean isRadioOn();
@Override
public abstract double getCurrentOutputPower();
@Override
public abstract int getCurrentOutputPowerIndicator();
@Override
public abstract int getOutputPowerIndicatorMax();
@Override
public abstract double getCurrentSignalStrength();
@Override
public abstract void setCurrentSignalStrength(double signalStrength);
/* need to add a few more methods later??? */
@Override
public void signalReceptionStart() {
isReceiving = true;
@ -207,6 +219,7 @@ public abstract class Radio802154 extends Radio implements CustomDataRadio {
notifyObservers();
}
@Override
public void signalReceptionEnd() {
/* Deliver packet data */
isReceiving = false;
@ -226,10 +239,12 @@ public abstract class Radio802154 extends Radio implements CustomDataRadio {
notifyObservers();
}
@Override
public RadioEvent getLastEvent() {
return lastEvent;
}
@Override
public void interfereAnyReception() {
isInterfered = true;
isReceiving = false;
@ -249,18 +264,22 @@ public abstract class Radio802154 extends Radio implements CustomDataRadio {
notifyObservers();
}
@Override
public Mote getMote() {
return mote;
}
@Override
public Position getPosition() {
return mote.getInterfaces().getPosition();
}
@Override
public Collection<Element> getConfigXML() {
return null;
}
@Override
public void setConfigXML(Collection<Element> configXML, boolean visAvailable) {
}
}