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