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:
parent
841cbd1b99
commit
ff7c1d8f12
|
@ -26,7 +26,7 @@
|
||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* 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;
|
package se.sics.cooja.contikimote;
|
||||||
|
@ -93,19 +93,34 @@ public class ContikiMoteType implements MoteType {
|
||||||
*/
|
*/
|
||||||
public enum CommunicationStack {
|
public enum CommunicationStack {
|
||||||
UIP,
|
UIP,
|
||||||
|
UIP_UAODV,
|
||||||
RIME;
|
RIME;
|
||||||
|
|
||||||
public String toString() {
|
public String toString() {
|
||||||
if (this == UIP)
|
if (this == UIP)
|
||||||
return "uIP";
|
return "uIP";
|
||||||
|
if (this == UIP_UAODV)
|
||||||
|
return "uIP over uAODV";
|
||||||
if (this == RIME)
|
if (this == RIME)
|
||||||
return "Rime";
|
return "Rime";
|
||||||
return "[unknown]";
|
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) {
|
public static CommunicationStack parse(String name) {
|
||||||
if (name.equals("uIP") || name.equals("UIP"))
|
if (name.equals("uIP") || name.equals("UIP"))
|
||||||
return UIP;
|
return UIP;
|
||||||
|
if (name.equals("uIP over uAODV") || name.equals("UIP_UAODV"))
|
||||||
|
return UIP_UAODV;
|
||||||
if (name.equals("Rime") || name.equals("RIME"))
|
if (name.equals("Rime") || name.equals("RIME"))
|
||||||
return RIME;
|
return RIME;
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* 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;
|
package se.sics.cooja.contikimote;
|
||||||
|
@ -44,6 +44,7 @@ import org.apache.log4j.Logger;
|
||||||
|
|
||||||
import se.sics.cooja.*;
|
import se.sics.cooja.*;
|
||||||
import se.sics.cooja.MoteType.MoteTypeCreationException;
|
import se.sics.cooja.MoteType.MoteTypeCreationException;
|
||||||
|
import se.sics.cooja.contikimote.ContikiMoteType.CommunicationStack;
|
||||||
import se.sics.cooja.dialogs.MessageList;
|
import se.sics.cooja.dialogs.MessageList;
|
||||||
import se.sics.cooja.dialogs.ProjectDirectoriesDialog;
|
import se.sics.cooja.dialogs.ProjectDirectoriesDialog;
|
||||||
|
|
||||||
|
@ -696,9 +697,7 @@ public class ContikiMoteTypeDialog extends JDialog {
|
||||||
smallPane.setLayout(new BoxLayout(smallPane, BoxLayout.X_AXIS));
|
smallPane.setLayout(new BoxLayout(smallPane, BoxLayout.X_AXIS));
|
||||||
label = new JLabel("Communication stack");
|
label = new JLabel("Communication stack");
|
||||||
|
|
||||||
commStackComboBox = new JComboBox(new Object[] {
|
commStackComboBox = new JComboBox(CommunicationStack.values());
|
||||||
ContikiMoteType.CommunicationStack.UIP,
|
|
||||||
ContikiMoteType.CommunicationStack.RIME});
|
|
||||||
commStackComboBox.setSelectedIndex(0);
|
commStackComboBox.setSelectedIndex(0);
|
||||||
|
|
||||||
smallPane.add(label);
|
smallPane.add(label);
|
||||||
|
@ -1443,11 +1442,7 @@ public class ContikiMoteTypeDialog extends JDialog {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add communication stack source files
|
// Add communication stack source files
|
||||||
if (commStack == ContikiMoteType.CommunicationStack.UIP) {
|
sourceFileNames += commStack.getSourceFilenamesString();
|
||||||
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";
|
|
||||||
}
|
|
||||||
|
|
||||||
logger.info("-- Compiling --");
|
logger.info("-- Compiling --");
|
||||||
logger.info("Project dirs: " + sourceDirs);
|
logger.info("Project dirs: " + sourceDirs);
|
||||||
|
|
Loading…
Reference in a new issue