removed old uip/uaodv comm stack, added uipv6

This commit is contained in:
fros4943 2009-04-01 14:02:44 +00:00
parent def81a5d02
commit 0e732f8dba

View file

@ -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.35 2009/03/21 15:41:42 fros4943 Exp $ * $Id: ContikiMoteType.java,v 1.36 2009/04/01 14:02:44 fros4943 Exp $
*/ */
package se.sics.cooja.contikimote; package se.sics.cooja.contikimote;
@ -99,14 +99,14 @@ public class ContikiMoteType implements MoteType {
* Communication stacks in Contiki. * Communication stacks in Contiki.
*/ */
public enum CommunicationStack { public enum CommunicationStack {
RIME, UIP, UIP_UAODV; RIME, UIP, UIPV6;
public String toString() { public String toString() {
if (this == UIP) { if (this == UIPV6) {
return "uIP"; return "uIPv6";
} }
if (this == UIP_UAODV) { if (this == UIP) {
return "uIP over uAODV"; return "uIPv4";
} }
if (this == RIME) { if (this == RIME) {
return "Rime"; return "Rime";
@ -115,31 +115,31 @@ public class ContikiMoteType implements MoteType {
} }
public String getSourceFilenamesString() { public String getSourceFilenamesString() {
if (this == UIP) { if (this == UIPV6) {
return " cooja-radio.c radio-uip.c init-net-uip.c"; return " init-net-uipv6.c";
} }
if (this == UIP_UAODV) { if (this == UIP) {
return " uaodv.c cooja-radio.c radio-uip-uaodv.c init-net-uip-uaodv.c crc16.c"; return " init-net-uip.c";
} }
if (this == RIME) { if (this == RIME) {
return " cooja-radio.c init-net-rime.c"; return " init-net-rime.c";
} }
return " "; return " ";
} }
public static CommunicationStack parse(String name) { public static CommunicationStack parse(String name) {
if (name.equals("uIP") || name.equals("UIP")) { if (name.equals("uIPv4") || name.equals("UIP")) {
return UIP; return UIP;
} }
if (name.equals("uIP over uAODV") || name.equals("UIP_UAODV")) { if (name.equals("uIPv6") || name.equals("UIPV6")) {
return UIP_UAODV; return UIPV6;
} }
if (name.equals("Rime") || name.equals("RIME")) { if (name.equals("Rime") || name.equals("RIME")) {
return RIME; return RIME;
} }
logger.warn("Can't parse communication stack name: " + name); logger.warn("Can't parse communication stack name: " + name);
return UIP; return RIME;
} }
} }
@ -266,7 +266,12 @@ public class ContikiMoteType implements MoteType {
String[][] env; String[][] env;
try { try {
env = CompileContiki.createCompilationEnvironment( env = CompileContiki.createCompilationEnvironment(
getIdentifier(), contikiApp, mapFile, libFile, archiveFile); getIdentifier(),
contikiApp,
mapFile,
libFile,
archiveFile,
commStack);
} catch (Exception e) { } catch (Exception e) {
throw (MoteTypeCreationException) new MoteTypeCreationException( throw (MoteTypeCreationException) new MoteTypeCreationException(
"Error when creating environment: " + e.getMessage()).initCause(e); "Error when creating environment: " + e.getMessage()).initCause(e);