added uIP over uAODV radio driver support for COOJA

the radio driver assumes uAODV already has a route to the destination, hence the application is responsible for fetching routes and buffering delayed packet data
This commit is contained in:
fros4943 2007-05-19 14:27:08 +00:00
parent 841cbd1b99
commit ff7c1d8f12
2 changed files with 20 additions and 10 deletions

View File

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: ContikiMoteType.java,v 1.14 2007/05/18 13:46:31 fros4943 Exp $
* $Id: ContikiMoteType.java,v 1.15 2007/05/19 14:27:08 fros4943 Exp $
*/
package se.sics.cooja.contikimote;
@ -93,19 +93,34 @@ public class ContikiMoteType implements MoteType {
*/
public enum CommunicationStack {
UIP,
UIP_UAODV,
RIME;
public String toString() {
if (this == UIP)
return "uIP";
if (this == UIP_UAODV)
return "uIP over uAODV";
if (this == RIME)
return "Rime";
return "[unknown]";
}
public String getSourceFilenamesString() {
if (this == UIP)
return " cooja-radio.c radio-uip.c init-net-uip.c";
if (this == UIP_UAODV)
return " cooja-radio.c radio-uip-uaodv.c init-net-uip-uaodv.c";
if (this == RIME)
return " cooja-radio.c radio-rime.c init-net-rime.c";
return " ";
}
public static CommunicationStack parse(String name) {
if (name.equals("uIP") || name.equals("UIP"))
return UIP;
if (name.equals("uIP over uAODV") || name.equals("UIP_UAODV"))
return UIP_UAODV;
if (name.equals("Rime") || name.equals("RIME"))
return RIME;

View File

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: ContikiMoteTypeDialog.java,v 1.30 2007/05/18 15:18:07 fros4943 Exp $
* $Id: ContikiMoteTypeDialog.java,v 1.31 2007/05/19 14:27:08 fros4943 Exp $
*/
package se.sics.cooja.contikimote;
@ -44,6 +44,7 @@ import org.apache.log4j.Logger;
import se.sics.cooja.*;
import se.sics.cooja.MoteType.MoteTypeCreationException;
import se.sics.cooja.contikimote.ContikiMoteType.CommunicationStack;
import se.sics.cooja.dialogs.MessageList;
import se.sics.cooja.dialogs.ProjectDirectoriesDialog;
@ -696,9 +697,7 @@ public class ContikiMoteTypeDialog extends JDialog {
smallPane.setLayout(new BoxLayout(smallPane, BoxLayout.X_AXIS));
label = new JLabel("Communication stack");
commStackComboBox = new JComboBox(new Object[] {
ContikiMoteType.CommunicationStack.UIP,
ContikiMoteType.CommunicationStack.RIME});
commStackComboBox = new JComboBox(CommunicationStack.values());
commStackComboBox.setSelectedIndex(0);
smallPane.add(label);
@ -1443,11 +1442,7 @@ public class ContikiMoteTypeDialog extends JDialog {
}
// Add communication stack source files
if (commStack == ContikiMoteType.CommunicationStack.UIP) {
sourceFileNames += " cooja-radio.c radio-uip.c init-net-uip.c";
} else if (commStack == ContikiMoteType.CommunicationStack.RIME) {
sourceFileNames += " cooja-radio.c radio-rime.c init-net-rime.c";
}
sourceFileNames += commStack.getSourceFilenamesString();
logger.info("-- Compiling --");
logger.info("Project dirs: " + sourceDirs);