cleaned up some unnecessary methods: empty mote constructors (created from mote type), setInterfaces/setMoteType methods

This commit is contained in:
Fredrik Osterlind 2012-05-24 14:06:09 +02:00
parent a437d06ba3
commit 4ea830ad45
7 changed files with 7 additions and 78 deletions

View file

@ -46,10 +46,6 @@ public class ESBMote extends MspMote {
public ESBNode esbNode = null; public ESBNode esbNode = null;
public ESBMote() {
super();
}
public ESBMote(MspMoteType moteType, Simulation sim) { public ESBMote(MspMoteType moteType, Simulation sim) {
super(moteType, sim); super(moteType, sim);
} }

View file

@ -44,10 +44,6 @@ public class Exp5438Mote extends MspMote {
public Exp5438Node exp5438Node = null; public Exp5438Node exp5438Node = null;
public Exp5438Mote() {
super();
}
public Exp5438Mote(MspMoteType moteType, Simulation sim) { public Exp5438Mote(MspMoteType moteType, Simulation sim) {
super(moteType, sim); super(moteType, sim);
} }

View file

@ -100,13 +100,6 @@ public abstract class MspMote extends AbstractEmulatedMote implements Mote, Watc
private int heapStartAddress; private int heapStartAddress;
private StackOverflowObservable stackOverflowObservable = new StackOverflowObservable(); private StackOverflowObservable stackOverflowObservable = new StackOverflowObservable();
public MspMote() {
myMoteType = null;
myCpu = null;
myMemory = null;
myMoteInterfaceHandler = null;
}
public MspMote(MspMoteType moteType, Simulation simulation) { public MspMote(MspMoteType moteType, Simulation simulation) {
this.simulation = simulation; this.simulation = simulation;
myMoteType = moteType; myMoteType = moteType;

View file

@ -48,10 +48,6 @@ public class SkyMote extends MspMote {
public SkyNode skyNode = null; public SkyNode skyNode = null;
public SkyMote() {
super();
}
public SkyMote(MspMoteType moteType, Simulation sim) { public SkyMote(MspMoteType moteType, Simulation sim) {
super(moteType, sim); super(moteType, sim);
} }

View file

@ -34,7 +34,6 @@ import java.io.File;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
import se.sics.cooja.Simulation; import se.sics.cooja.Simulation;
import se.sics.mspsim.platform.ti.Exp5438Node;
import se.sics.mspsim.platform.tyndall.TyndallNode; import se.sics.mspsim.platform.tyndall.TyndallNode;
/** /**
@ -45,10 +44,6 @@ public class TyndallMote extends MspMote {
public TyndallNode tyndallNode = null; public TyndallNode tyndallNode = null;
public TyndallMote() {
super();
}
public TyndallMote(MspMoteType moteType, Simulation sim) { public TyndallMote(MspMoteType moteType, Simulation sim) {
super(moteType, sim); super(moteType, sim);
} }

View file

@ -23,8 +23,6 @@
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: Mote.java,v 1.9 2010/10/12 10:58:31 fros4943 Exp $
*/ */
package se.sics.cooja; package se.sics.cooja;
@ -59,15 +57,6 @@ public interface Mote {
*/ */
public MoteInterfaceHandler getInterfaces(); public MoteInterfaceHandler getInterfaces();
/**
* Sets the interface handler of this mote.
*
* @param moteInterfaceHandler
* New interface handler
* @see #getInterfaces()
*/
public void setInterfaces(MoteInterfaceHandler moteInterfaceHandler);
/** /**
* Returns the memory of this mote. * Returns the memory of this mote.
* *
@ -76,15 +65,6 @@ public interface Mote {
*/ */
public MoteMemory getMemory(); public MoteMemory getMemory();
/**
* Sets the memory of this mote.
*
* @see #getMemory()
* @param memory
* Mote memory
*/
public void setMemory(MoteMemory memory);
/** /**
* Returns mote type. * Returns mote type.
* *
@ -93,15 +73,6 @@ public interface Mote {
*/ */
public MoteType getType(); public MoteType getType();
/**
* Sets mote type to given argument.
*
* @see #getType()
* @param type
* New type
*/
public void setType(MoteType type);
/** /**
* Returns simulation which holds this mote. * Returns simulation which holds this mote.
* *
@ -110,15 +81,6 @@ public interface Mote {
*/ */
public Simulation getSimulation(); public Simulation getSimulation();
/**
* Sets the simulation which holds this mote.
*
* @see #getSimulation()
* @param simulation
* Simulation
*/
public void setSimulation(Simulation simulation);
/** /**
* Returns XML elements representing the current config of this mote. This is * Returns XML elements representing the current config of this mote. This is
* fetched by the simulator for example when saving a simulation configuration * fetched by the simulator for example when saving a simulation configuration

View file

@ -68,15 +68,6 @@ public class ContikiMote extends AbstractWakeupMote implements Mote {
private SectionMoteMemory myMemory = null; private SectionMoteMemory myMemory = null;
private MoteInterfaceHandler myInterfaceHandler = null; private MoteInterfaceHandler myInterfaceHandler = null;
/**
* Creates a new uninitialized Contiki mote.
*
* This mote needs at least a type, a memory, a mote interface handler
* and to be connected to a simulation.
*/
public ContikiMote() {
}
/** /**
* Creates a new mote of given type. * Creates a new mote of given type.
* Both the initial mote memory and the interface handler * Both the initial mote memory and the interface handler