From 9e14d09bb0395fae31b992389235598b2dc6ad77 Mon Sep 17 00:00:00 2001 From: Fredrik Osterlind Date: Fri, 11 Feb 2011 13:27:17 +0100 Subject: [PATCH] fixed line endings --- tools/cooja/apps/avrora/cooja.config | 4 +- tools/cooja/apps/mrm/cooja.config | 4 +- tools/cooja/apps/mspsim/cooja.config | 6 +- tools/cooja/apps/native_gateway/cooja.config | 4 +- tools/cooja/config/cooja.html | 24 +- tools/cooja/config/cooja.policy | 6 +- tools/cooja/config/cooja_applet.config | 10 +- .../config/external_tools_linux_64.config | 82 +- .../cooja/config/external_tools_macosx.config | 92 +- tools/cooja/config/log4j_config.xml | 50 +- tools/cooja/config/quickhelp.txt | 156 +-- tools/cooja/config/scripts/basic.js | 56 +- tools/cooja/config/scripts/helloworld.js | 22 +- tools/cooja/config/scripts/log_all.js | 26 +- tools/cooja/config/scripts/plugins.js | 100 +- tools/cooja/config/scripts/shell.js | 52 +- tools/cooja/config/test_template.c | 178 +-- tools/cooja/contiki_tests/esb_helloworld.csc | 250 ++-- tools/cooja/contiki_tests/servreg-hack.csc | 632 ++++----- .../contiki_tests/sky-ipv6-rpl-collect.csc | 1240 ++++++++--------- tools/cooja/contiki_tests/sky_ipv6_udp.csc | 294 ++-- .../sky_ipv6_udp_fragmentation.csc | 296 ++-- tools/cooja/examples/jni_test/README.txt | 34 +- .../project_new_interface/cooja.config | 4 +- .../examples/project_new_plugin/cooja.config | 4 +- .../project_new_radiomedium/cooja.config | 2 +- .../plugins/analyzers/IEEE802154Analyzer.java | 338 ++--- .../plugins/analyzers/PacketAnalyzer.java | 174 +-- .../cooja/plugins/analyzers/PcapExporter.java | 116 +- 29 files changed, 2128 insertions(+), 2128 deletions(-) mode change 100755 => 100644 tools/cooja/java/se/sics/cooja/plugins/analyzers/PcapExporter.java diff --git a/tools/cooja/apps/avrora/cooja.config b/tools/cooja/apps/avrora/cooja.config index c30651205..a426fa3d9 100644 --- a/tools/cooja/apps/avrora/cooja.config +++ b/tools/cooja/apps/avrora/cooja.config @@ -1,2 +1,2 @@ -se.sics.cooja.GUI.MOTETYPES = + se.sics.cooja.avrmote.MicaZMoteType -se.sics.cooja.GUI.JARFILES = + cooja_avrora.jar avrora-small.jar +se.sics.cooja.GUI.MOTETYPES = + se.sics.cooja.avrmote.MicaZMoteType +se.sics.cooja.GUI.JARFILES = + cooja_avrora.jar avrora-small.jar diff --git a/tools/cooja/apps/mrm/cooja.config b/tools/cooja/apps/mrm/cooja.config index fac673cea..90efbb4f0 100644 --- a/tools/cooja/apps/mrm/cooja.config +++ b/tools/cooja/apps/mrm/cooja.config @@ -1,2 +1,2 @@ -se.sics.cooja.GUI.RADIOMEDIUMS = + se.sics.mrm.MRM -se.sics.cooja.GUI.JARFILES = + mrm.jar +se.sics.cooja.GUI.RADIOMEDIUMS = + se.sics.mrm.MRM +se.sics.cooja.GUI.JARFILES = + mrm.jar diff --git a/tools/cooja/apps/mspsim/cooja.config b/tools/cooja/apps/mspsim/cooja.config index 29be99ecf..7380c7cdf 100644 --- a/tools/cooja/apps/mspsim/cooja.config +++ b/tools/cooja/apps/mspsim/cooja.config @@ -1,3 +1,3 @@ -se.sics.cooja.GUI.MOTETYPES = + se.sics.cooja.mspmote.ESBMoteType se.sics.cooja.mspmote.SkyMoteType -se.sics.cooja.GUI.JARFILES = + cooja_mspsim.jar mspsim.jar coffee.jar jipv6.jar -se.sics.cooja.GUI.PLUGINS = + se.sics.cooja.mspmote.plugins.MspCLI se.sics.cooja.mspmote.plugins.MspCodeWatcher se.sics.cooja.mspmote.plugins.MspStackWatcher se.sics.cooja.mspmote.plugins.MspCycleWatcher +se.sics.cooja.GUI.MOTETYPES = + se.sics.cooja.mspmote.ESBMoteType se.sics.cooja.mspmote.SkyMoteType +se.sics.cooja.GUI.JARFILES = + cooja_mspsim.jar mspsim.jar coffee.jar jipv6.jar +se.sics.cooja.GUI.PLUGINS = + se.sics.cooja.mspmote.plugins.MspCLI se.sics.cooja.mspmote.plugins.MspCodeWatcher se.sics.cooja.mspmote.plugins.MspStackWatcher se.sics.cooja.mspmote.plugins.MspCycleWatcher diff --git a/tools/cooja/apps/native_gateway/cooja.config b/tools/cooja/apps/native_gateway/cooja.config index 7d99800c0..9bcd6c66f 100644 --- a/tools/cooja/apps/native_gateway/cooja.config +++ b/tools/cooja/apps/native_gateway/cooja.config @@ -1,2 +1,2 @@ -se.sics.cooja.GUI.PLUGINS = + se.sics.cooja.plugins.NativeIPGateway -se.sics.cooja.GUI.JARFILES = + native_gateway.jar +se.sics.cooja.GUI.PLUGINS = + se.sics.cooja.plugins.NativeIPGateway +se.sics.cooja.GUI.JARFILES = + native_gateway.jar diff --git a/tools/cooja/config/cooja.html b/tools/cooja/config/cooja.html index 944b411c0..5255b4a50 100644 --- a/tools/cooja/config/cooja.html +++ b/tools/cooja/config/cooja.html @@ -1,12 +1,12 @@ - - The COOJA Simulator (applet) - - - - - - - - + + The COOJA Simulator (applet) + + + + + + + + diff --git a/tools/cooja/config/cooja.policy b/tools/cooja/config/cooja.policy index 53a9d407d..2fd15c8dd 100644 --- a/tools/cooja/config/cooja.policy +++ b/tools/cooja/config/cooja.policy @@ -1,3 +1,3 @@ -grant { -permission java.security.AllPermission; -}; +grant { +permission java.security.AllPermission; +}; diff --git a/tools/cooja/config/cooja_applet.config b/tools/cooja/config/cooja_applet.config index 2716ab234..e3460ad22 100644 --- a/tools/cooja/config/cooja_applet.config +++ b/tools/cooja/config/cooja_applet.config @@ -1,5 +1,5 @@ -se.sics.cooja.GUI.MOTETYPES = se.sics.cooja.motes.DisturberMoteType se.sics.cooja.contikimote.ContikiMoteType se.sics.cooja.mspmote.ESBMoteType se.sics.cooja.mspmote.SkyMoteType -se.sics.cooja.GUI.PLUGINS = se.sics.cooja.plugins.Visualizer se.sics.cooja.plugins.LogListener se.sics.cooja.plugins.MoteInformation se.sics.cooja.plugins.MoteInterfaceViewer se.sics.cooja.plugins.VariableWatcher se.sics.cooja.plugins.EventListener se.sics.cooja.plugins.RadioLogger se.sics.cooja.mspmote.plugins.MspCodeWatcher se.sics.cooja.mspmote.plugins.MspStackWatcher se.sics.cooja.mspmote.plugins.MspCycleWatcher -se.sics.cooja.GUI.IP_DISTRIBUTORS = se.sics.cooja.ipdistributors.RandomIPDistributor se.sics.cooja.ipdistributors.SpatialIPDistributor se.sics.cooja.ipdistributors.IdIPDistributor -se.sics.cooja.GUI.POSITIONERS = se.sics.cooja.positioners.RandomPositioner se.sics.cooja.positioners.LinearPositioner se.sics.cooja.positioners.EllipsePositioner se.sics.cooja.positioners.ManualPositioner -se.sics.cooja.GUI.RADIOMEDIUMS = se.sics.cooja.radiomediums.UDGM se.sics.cooja.radiomediums.UDGMConstantLoss se.sics.cooja.radiomediums.DirectedGraphMedium se.sics.mrm.MRM se.sics.cooja.radiomediums.SilentRadioMedium +se.sics.cooja.GUI.MOTETYPES = se.sics.cooja.motes.DisturberMoteType se.sics.cooja.contikimote.ContikiMoteType se.sics.cooja.mspmote.ESBMoteType se.sics.cooja.mspmote.SkyMoteType +se.sics.cooja.GUI.PLUGINS = se.sics.cooja.plugins.Visualizer se.sics.cooja.plugins.LogListener se.sics.cooja.plugins.MoteInformation se.sics.cooja.plugins.MoteInterfaceViewer se.sics.cooja.plugins.VariableWatcher se.sics.cooja.plugins.EventListener se.sics.cooja.plugins.RadioLogger se.sics.cooja.mspmote.plugins.MspCodeWatcher se.sics.cooja.mspmote.plugins.MspStackWatcher se.sics.cooja.mspmote.plugins.MspCycleWatcher +se.sics.cooja.GUI.IP_DISTRIBUTORS = se.sics.cooja.ipdistributors.RandomIPDistributor se.sics.cooja.ipdistributors.SpatialIPDistributor se.sics.cooja.ipdistributors.IdIPDistributor +se.sics.cooja.GUI.POSITIONERS = se.sics.cooja.positioners.RandomPositioner se.sics.cooja.positioners.LinearPositioner se.sics.cooja.positioners.EllipsePositioner se.sics.cooja.positioners.ManualPositioner +se.sics.cooja.GUI.RADIOMEDIUMS = se.sics.cooja.radiomediums.UDGM se.sics.cooja.radiomediums.UDGMConstantLoss se.sics.cooja.radiomediums.DirectedGraphMedium se.sics.mrm.MRM se.sics.cooja.radiomediums.SilentRadioMedium diff --git a/tools/cooja/config/external_tools_linux_64.config b/tools/cooja/config/external_tools_linux_64.config index e1c198439..034498805 100644 --- a/tools/cooja/config/external_tools_linux_64.config +++ b/tools/cooja/config/external_tools_linux_64.config @@ -1,41 +1,41 @@ -PATH_CONTIKI = ../../.. -PATH_COOJA_CORE_RELATIVE = /platform/cooja -PATH_MAKE = make -PATH_LINKER = ld -PATH_AR = ar -PATH_SHELL = sh -PATH_C_COMPILER = gcc -PATH_OBJDUMP=objdump -OBJDUMP_ARGS=-h -CMD_GREP_PROCESSES = grep "^PROCESS_THREAD[ ]*([^,]*,[^,]*,[^)]*)" -o -H -REGEXP_PARSE_PROCESSES = ([^/]*.c):PROCESS_THREAD[ ]*\\(([^,]*),[^,]*,[^)]*\\) -CMD_GREP_INTERFACES = grep "^SIM_INTERFACE([^,]*," -o -d skip -D skip -H -r -REGEXP_PARSE_INTERFACES = ([^/]*.c):SIM_INTERFACE\\(([^,]*), -CMD_GREP_SENSORS = grep "^SENSORS_SENSOR([^,]*," -o -d skip -D skip -H -r -REGEXP_PARSE_SENSORS = ([^/]*.c):SENSORS_SENSOR\\(([^,]*), -COMPILER_ARGS = -I'$(JAVA_HOME)/include' -I'$(JAVA_HOME)/include/linux' -fno-builtin-printf -fPIC -LINK_COMMAND_1 = gcc -I'$(JAVA_HOME)/include' -I'$(JAVA_HOME)/include/linux' -shared -Wl,-Map=$(MAPFILE) -o $(LIBFILE) -LINK_COMMAND_2 = -AR_COMMAND_1 = ar rcf $(ARFILE) -AR_COMMAND_2 = -CONTIKI_STANDARD_PROCESSES = sensors_process;etimer_process -CORECOMM_TEMPLATE_FILENAME = corecomm_template.java -PATH_JAVAC = javac -DEFAULT_PROJECTDIRS = [CONTIKI_DIR]/tools/cooja/apps/mrm;[CONTIKI_DIR]/tools/cooja/apps/mspsim;[CONTIKI_DIR]/tools/cooja/apps/avrora;[CONTIKI_DIR]/tools/cooja/apps/serial_socket;[CONTIKI_DIR]/tools/cooja/apps/collect-view - -PARSE_WITH_COMMAND=false -PARSE_COMMAND=nm -a $(LIBFILE) -MAPFILE_DATA_START = ^.data[ \t]*0x([0-9A-Fa-f]*)[ \t]*0x[0-9A-Fa-f]*[ \t]*$ -MAPFILE_DATA_SIZE = ^.data[ \t]*0x[0-9A-Fa-f]*[ \t]*0x([0-9A-Fa-f]*)[ \t]*$ -MAPFILE_BSS_START = ^.bss[ \t]*0x([0-9A-Fa-f]*)[ \t]*0x[0-9A-Fa-f]*[ \t]*$ -MAPFILE_BSS_SIZE = ^.bss[ \t]*0x[0-9A-Fa-f]*[ \t]*0x([0-9A-Fa-f]*)[ \t]*$ -MAPFILE_VAR_NAME = ^[ \t]*(0x[0-9A-Fa-f]*)[ \t]*([^ ]*)[ \t]*$ -MAPFILE_VAR_ADDRESS_1 = ^[ \t]*0x([0-9A-Fa-f]*)[ \t]* -MAPFILE_VAR_ADDRESS_2 = [ \t]*$ -MAPFILE_VAR_SIZE_1 = ^ -MAPFILE_VAR_SIZE_2 = [ \t]*(0x[0-9A-Fa-f]*)[ \t]*[^ ]*[ \t]*$ -COMMAND_VAR_NAME_ADDRESS = ^([0-9A-Fa-f][0-9A-Fa-f]*)[ \t][^Tt][ \t]([^ ._][^ ]*) -COMMAND_DATA_START = ^([0-9A-Fa-f]*)[ \t]d[ \t].data$ -COMMAND_DATA_END = ^([0-9A-Fa-f]*)[ \t]A[ \t]_edata$ -COMMAND_BSS_START = ^([0-9A-Fa-f]*)[ \t]A[ \t]__bss_start$ -COMMAND_BSS_END = ^([0-9A-Fa-f]*)[ \t]A[ \t]_end$ +PATH_CONTIKI = ../../.. +PATH_COOJA_CORE_RELATIVE = /platform/cooja +PATH_MAKE = make +PATH_LINKER = ld +PATH_AR = ar +PATH_SHELL = sh +PATH_C_COMPILER = gcc +PATH_OBJDUMP=objdump +OBJDUMP_ARGS=-h +CMD_GREP_PROCESSES = grep "^PROCESS_THREAD[ ]*([^,]*,[^,]*,[^)]*)" -o -H +REGEXP_PARSE_PROCESSES = ([^/]*.c):PROCESS_THREAD[ ]*\\(([^,]*),[^,]*,[^)]*\\) +CMD_GREP_INTERFACES = grep "^SIM_INTERFACE([^,]*," -o -d skip -D skip -H -r +REGEXP_PARSE_INTERFACES = ([^/]*.c):SIM_INTERFACE\\(([^,]*), +CMD_GREP_SENSORS = grep "^SENSORS_SENSOR([^,]*," -o -d skip -D skip -H -r +REGEXP_PARSE_SENSORS = ([^/]*.c):SENSORS_SENSOR\\(([^,]*), +COMPILER_ARGS = -I'$(JAVA_HOME)/include' -I'$(JAVA_HOME)/include/linux' -fno-builtin-printf -fPIC +LINK_COMMAND_1 = gcc -I'$(JAVA_HOME)/include' -I'$(JAVA_HOME)/include/linux' -shared -Wl,-Map=$(MAPFILE) -o $(LIBFILE) +LINK_COMMAND_2 = +AR_COMMAND_1 = ar rcf $(ARFILE) +AR_COMMAND_2 = +CONTIKI_STANDARD_PROCESSES = sensors_process;etimer_process +CORECOMM_TEMPLATE_FILENAME = corecomm_template.java +PATH_JAVAC = javac +DEFAULT_PROJECTDIRS = [CONTIKI_DIR]/tools/cooja/apps/mrm;[CONTIKI_DIR]/tools/cooja/apps/mspsim;[CONTIKI_DIR]/tools/cooja/apps/avrora;[CONTIKI_DIR]/tools/cooja/apps/serial_socket;[CONTIKI_DIR]/tools/cooja/apps/collect-view + +PARSE_WITH_COMMAND=false +PARSE_COMMAND=nm -a $(LIBFILE) +MAPFILE_DATA_START = ^.data[ \t]*0x([0-9A-Fa-f]*)[ \t]*0x[0-9A-Fa-f]*[ \t]*$ +MAPFILE_DATA_SIZE = ^.data[ \t]*0x[0-9A-Fa-f]*[ \t]*0x([0-9A-Fa-f]*)[ \t]*$ +MAPFILE_BSS_START = ^.bss[ \t]*0x([0-9A-Fa-f]*)[ \t]*0x[0-9A-Fa-f]*[ \t]*$ +MAPFILE_BSS_SIZE = ^.bss[ \t]*0x[0-9A-Fa-f]*[ \t]*0x([0-9A-Fa-f]*)[ \t]*$ +MAPFILE_VAR_NAME = ^[ \t]*(0x[0-9A-Fa-f]*)[ \t]*([^ ]*)[ \t]*$ +MAPFILE_VAR_ADDRESS_1 = ^[ \t]*0x([0-9A-Fa-f]*)[ \t]* +MAPFILE_VAR_ADDRESS_2 = [ \t]*$ +MAPFILE_VAR_SIZE_1 = ^ +MAPFILE_VAR_SIZE_2 = [ \t]*(0x[0-9A-Fa-f]*)[ \t]*[^ ]*[ \t]*$ +COMMAND_VAR_NAME_ADDRESS = ^([0-9A-Fa-f][0-9A-Fa-f]*)[ \t][^Tt][ \t]([^ ._][^ ]*) +COMMAND_DATA_START = ^([0-9A-Fa-f]*)[ \t]d[ \t].data$ +COMMAND_DATA_END = ^([0-9A-Fa-f]*)[ \t]A[ \t]_edata$ +COMMAND_BSS_START = ^([0-9A-Fa-f]*)[ \t]A[ \t]__bss_start$ +COMMAND_BSS_END = ^([0-9A-Fa-f]*)[ \t]A[ \t]_end$ diff --git a/tools/cooja/config/external_tools_macosx.config b/tools/cooja/config/external_tools_macosx.config index 3e9f0ceb3..3410dfed4 100644 --- a/tools/cooja/config/external_tools_macosx.config +++ b/tools/cooja/config/external_tools_macosx.config @@ -1,46 +1,46 @@ -PATH_CONTIKI = ../../.. -PATH_COOJA_CORE_RELATIVE = /platform/cooja -PATH_MAKE = make -PATH_LINKER = gcc -PATH_AR = ar -PATH_SHELL = sh -PATH_C_COMPILER = gcc -PATH_OBJDUMP= objdump -OBJDUMP_ARGS= -h -CMD_GREP_PROCESSES = grep "^PROCESS_THREAD[ ]*([^,]*,[^,]*,[^)]*)" -o -H -REGEXP_PARSE_PROCESSES = ([^/]*.c):PROCESS_THREAD[ ]*\\(([^,]*),[^,]*,[^)]*\\) -CMD_GREP_INTERFACES = grep "^SIM_INTERFACE([^,]*," -o -d skip -D skip -H -r -REGEXP_PARSE_INTERFACES = ([^/]*.c):SIM_INTERFACE\\(([^,]*), -CMD_GREP_SENSORS = grep "^SENSORS_SENSOR([^,]*," -o -d skip -D skip -H -r -REGEXP_PARSE_SENSORS = ([^/]*.c):SENSORS_SENSOR\\(([^,]*), -COMPILER_ARGS = -Wall -I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Headers -dynamiclib -fno-common -DHAVE_SNPRINTF -LINK_COMMAND_1 = gcc -dynamiclib -fno-common -o $(LIBFILE) -LINK_COMMAND_2 = -framework JavaVM -Wl,-map,$(MAPFILE) -AR_COMMAND_1 = ar rc $(ARFILE) -AR_COMMAND_2 = -CONTIKI_STANDARD_PROCESSES = sensors_process;etimer_process -CORECOMM_TEMPLATE_FILENAME = corecomm_template.java -PATH_JAVAC = javac -DEFAULT_PROJECTDIRS = [CONTIKI_DIR]/tools/cooja/apps/mrm;[CONTIKI_DIR]/tools/cooja/apps/mspsim;[CONTIKI_DIR]/tools/cooja/apps/avrora;[CONTIKI_DIR]/tools/cooja/apps/serial_socket;[CONTIKI_DIR]/tools/cooja/apps/collect-view - -PARSE_WITH_COMMAND = true -PARSE_COMMAND = /opt/contiki-2.x/tools/cooja/examples/jni_test/mac_users/nmandsize $(LIBFILE) -MAPFILE_DATA_START = ^__DATA[ ]*__data[ ]*0x([0-9A-Fa-f]*)[ ]*0x[0-9A-Fa-f]*[ ]*$ -MAPFILE_DATA_SIZE = ^__DATA[ ]*__data[ ]*0x[0-9A-Fa-f]*[ ]*0x([0-9A-Fa-f]*)[ ]*$ -MAPFILE_BSS_START = ^__DATA[ ]*__bss[ ]*0x[0-9A-Fa-f]*[ ]*0x([0-9A-Fa-f]*)[ ]*$ -MAPFILE_BSS_SIZE = ^__DATA[ ]*__bss[ ]*0x[0-9A-Fa-f]*[ ]*0x([0-9A-Fa-f]*)[ ]*$ -MAPFILE_COMMON_START = ^__DATA[ ]*__common[ ]*0x([0-9A-Fa-f]*)[ ]*0x[0-9A-Fa-f]*[ ]*$ -MAPFILE_COMMON_SIZE = ^__DATA[ ]*__common[ ]*0x[0-9A-Fa-f]*[ ]*0x([0-9A-Fa-f]*)[ ]*$ -MAPFILE_VAR_NAME = ^[ \\t]*(0x[0-9A-Fa-f]*)[ \\t]*([^ ]*)[ \\t]*$ -MAPFILE_VAR_ADDRESS_1 = ^[ \\t]*0x([0-9A-Fa-f]*)[ \\t]* -MAPFILE_VAR_ADDRESS_2 = [ \\t]*$ -MAPFILE_VAR_SIZE_1 = ^ -MAPFILE_VAR_SIZE_2 = [ \\t]*(0x[0-9A-Fa-f]*)[ \\t]*[^ ]*[ \\t]*$ -COMMAND_VAR_NAME_ADDRESS = ^[ \t]*([0-9A-Fa-f][0-9A-Fa-f]*)[ \t]\\(__DATA,__[^ ]*\\) external _([^ ]*)$ -COMMAND_DATA_START = ^DATA SECTION START\: 0x([0-9A-Fa-f]+)$ -COMMAND_DATA_END = ^DATA SECTION END\: 0x([0-9A-Fa-f]+)$ -COMMAND_BSS_START = ^COMMON SECTION START\: 0x([0-9A-Fa-f]+)$ -COMMAND_BSS_END = ^COMMON SECTION END\: 0x([0-9A-Fa-f]+)$ -COMMAND_COMMON_START = ^BSS SECTION START\: 0x([0-9A-Fa-f]+)$ -COMMAND_COMMON_END = ^BSS SECTION END\: 0x([0-9A-Fa-f]+)$ - +PATH_CONTIKI = ../../.. +PATH_COOJA_CORE_RELATIVE = /platform/cooja +PATH_MAKE = make +PATH_LINKER = gcc +PATH_AR = ar +PATH_SHELL = sh +PATH_C_COMPILER = gcc +PATH_OBJDUMP= objdump +OBJDUMP_ARGS= -h +CMD_GREP_PROCESSES = grep "^PROCESS_THREAD[ ]*([^,]*,[^,]*,[^)]*)" -o -H +REGEXP_PARSE_PROCESSES = ([^/]*.c):PROCESS_THREAD[ ]*\\(([^,]*),[^,]*,[^)]*\\) +CMD_GREP_INTERFACES = grep "^SIM_INTERFACE([^,]*," -o -d skip -D skip -H -r +REGEXP_PARSE_INTERFACES = ([^/]*.c):SIM_INTERFACE\\(([^,]*), +CMD_GREP_SENSORS = grep "^SENSORS_SENSOR([^,]*," -o -d skip -D skip -H -r +REGEXP_PARSE_SENSORS = ([^/]*.c):SENSORS_SENSOR\\(([^,]*), +COMPILER_ARGS = -Wall -I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Headers -dynamiclib -fno-common -DHAVE_SNPRINTF +LINK_COMMAND_1 = gcc -dynamiclib -fno-common -o $(LIBFILE) +LINK_COMMAND_2 = -framework JavaVM -Wl,-map,$(MAPFILE) +AR_COMMAND_1 = ar rc $(ARFILE) +AR_COMMAND_2 = +CONTIKI_STANDARD_PROCESSES = sensors_process;etimer_process +CORECOMM_TEMPLATE_FILENAME = corecomm_template.java +PATH_JAVAC = javac +DEFAULT_PROJECTDIRS = [CONTIKI_DIR]/tools/cooja/apps/mrm;[CONTIKI_DIR]/tools/cooja/apps/mspsim;[CONTIKI_DIR]/tools/cooja/apps/avrora;[CONTIKI_DIR]/tools/cooja/apps/serial_socket;[CONTIKI_DIR]/tools/cooja/apps/collect-view + +PARSE_WITH_COMMAND = true +PARSE_COMMAND = /opt/contiki-2.x/tools/cooja/examples/jni_test/mac_users/nmandsize $(LIBFILE) +MAPFILE_DATA_START = ^__DATA[ ]*__data[ ]*0x([0-9A-Fa-f]*)[ ]*0x[0-9A-Fa-f]*[ ]*$ +MAPFILE_DATA_SIZE = ^__DATA[ ]*__data[ ]*0x[0-9A-Fa-f]*[ ]*0x([0-9A-Fa-f]*)[ ]*$ +MAPFILE_BSS_START = ^__DATA[ ]*__bss[ ]*0x[0-9A-Fa-f]*[ ]*0x([0-9A-Fa-f]*)[ ]*$ +MAPFILE_BSS_SIZE = ^__DATA[ ]*__bss[ ]*0x[0-9A-Fa-f]*[ ]*0x([0-9A-Fa-f]*)[ ]*$ +MAPFILE_COMMON_START = ^__DATA[ ]*__common[ ]*0x([0-9A-Fa-f]*)[ ]*0x[0-9A-Fa-f]*[ ]*$ +MAPFILE_COMMON_SIZE = ^__DATA[ ]*__common[ ]*0x[0-9A-Fa-f]*[ ]*0x([0-9A-Fa-f]*)[ ]*$ +MAPFILE_VAR_NAME = ^[ \\t]*(0x[0-9A-Fa-f]*)[ \\t]*([^ ]*)[ \\t]*$ +MAPFILE_VAR_ADDRESS_1 = ^[ \\t]*0x([0-9A-Fa-f]*)[ \\t]* +MAPFILE_VAR_ADDRESS_2 = [ \\t]*$ +MAPFILE_VAR_SIZE_1 = ^ +MAPFILE_VAR_SIZE_2 = [ \\t]*(0x[0-9A-Fa-f]*)[ \\t]*[^ ]*[ \\t]*$ +COMMAND_VAR_NAME_ADDRESS = ^[ \t]*([0-9A-Fa-f][0-9A-Fa-f]*)[ \t]\\(__DATA,__[^ ]*\\) external _([^ ]*)$ +COMMAND_DATA_START = ^DATA SECTION START\: 0x([0-9A-Fa-f]+)$ +COMMAND_DATA_END = ^DATA SECTION END\: 0x([0-9A-Fa-f]+)$ +COMMAND_BSS_START = ^COMMON SECTION START\: 0x([0-9A-Fa-f]+)$ +COMMAND_BSS_END = ^COMMON SECTION END\: 0x([0-9A-Fa-f]+)$ +COMMAND_COMMON_START = ^BSS SECTION START\: 0x([0-9A-Fa-f]+)$ +COMMAND_COMMON_END = ^BSS SECTION END\: 0x([0-9A-Fa-f]+)$ + diff --git a/tools/cooja/config/log4j_config.xml b/tools/cooja/config/log4j_config.xml index 5a524e7a5..ff9741f0c 100644 --- a/tools/cooja/config/log4j_config.xml +++ b/tools/cooja/config/log4j_config.xml @@ -1,25 +1,25 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/cooja/config/quickhelp.txt b/tools/cooja/config/quickhelp.txt index a601f28f1..d6cb8a231 100644 --- a/tools/cooja/config/quickhelp.txt +++ b/tools/cooja/config/quickhelp.txt @@ -1,78 +1,78 @@ -se.sics.cooja.plugins.Visualizer = \ -Visualizer \ -

The visualizer shows the positions of simulated motes as viewed from above (XY-plane). \ -It is possible to zoom (CRTL+Mouse drag) and pan (Shift+Mouse drag) the current view. Motes can be moved by dragging them (ALT+Mouse drag). \ -Mouse right-click a mote or unoccupied space for a popup menu with more options. \ -

The visualizer supports "visualizer skins". \ -Each skin provides some specific information, such as ongoing simulated radio traffic, or the IP addresses of motes. \ -Multiple skins can be active at the same time. \ -Click the upper "Select visualizer skin" button to select or deselect skins. \ -

Useful skins \ -
Mote IDs: prints the unique mote IDs inside motes. \ -
Log output: prints the last printf message above motes. \ -
Radio traffic: displays inter-mote radio communication. \ -
Radio environment (UDGM): enables configurating the UDGM radio medium. \ -

Tip
\ -Right-click visualizer to show the popup menu, and click "Hide window decorations". - -se.sics.cooja.plugins.LogListener = \ -Log Listener\ -

Listens to log output from all simulated motes. \ -Right-click the main area for a popup menu with more options. \ -

You may filter shown logs by entering regular expressions in the bottom text field. \ -Filtering is performed on both the Mote and the Data columns.\ -

Filter examples: \ -

Hello
logs containing the string 'Hello'\ -

^Contiki
logs starting with 'Contiki'\ -

^[CR]
logs starting either a C or an R\ -

Hello$
logs ending with 'Hello'\ -

^ID:[2-5]$
logs from motes 2 to 5\ -

^ID:[2-5] Contiki
logs from motes 2 to 5 starting with 'Contiki' - -se.sics.cooja.plugins.TimeLine = \ -Timeline\ -

The timeline arranges historical simulation events into a graphical timeline. \ -The timeline can for example be used to overview the behavior of complex power-saving MAC protocols.\ -

Events appear as colored rectangles in the timeline. For more information about a particular event, hover the mouse above it.\ -

The checkboxes in the left pane control what event types are shown in the timeline. \ -Currently, four event types are supported (see below). Note that the control pane can be hidden to save space. \ -

All simulated motes are by default added to the timeline, however, any unwanted motes can be removed by mouse clicking the node ID (left).\ -

To display a vertical time marker on the timeline, press and hold the mouse on the time ruler (top).\ -

For more options, such as zooming and saving raw data to file, right-click the mouse for a popup menu.\ -

Radio RX/TX\ -
Shows radio connection events. Transmissions are painted blue, receptions are green, and interfered radios are red.\ -

Radio ON/OFF\ -
Shows whether the mote radio is on or off. Turned on radios are indicated with gray color.\ -

LEDs\ -
Shows LED state: red, green, and blue. (Assumes all mote types have exactly three LEDs.)\ -

Watchpoints\ -
Shows triggered watchpoints, currently only supported by MSPSim-based motes. To add watchpoints, use the Msp Code Watcher plugin. - -se.sics.cooja.plugins.SimControl = \ -Control Panel\ -

Use the control panel to start and stop the current simulation. \ -

Note that toggling simulation execution is also possible by the keyboard shortcut Ctrl+S. \ -

Step millisecond executes all events within the next simulated millisecond. \ -

The execution speed can be controlled via the bottom slider. \ -If the slider value is non-zero, sleep events are scheduled in the simulation loop. \ -

By setting the slider to Real time, the execution speed is limited to at maximum real time. \ -The Real time slider value is to the right of No simulation delay: select the slider button and use to keyboard to navigate here. \ -

Run until can be used to configure a time (in milliseconds) where the simulation will automatically pause. - -se.sics.cooja.mspmote.plugins.MspCLI = \ -MSPSim's Command Line Interface\ -

help
lists available commands\ -

info CC2420
shows radio chip details\ -

log CC2420 > mylog.txt
logs radio chip details to file\ -

stacktrace
shows current stacktrace - -KEYBOARD_SHORTCUTS = \ -Keyboard shortcuts
\ -
Ctrl+N: New simulation\ -
Ctrl+S: Start/pause simulation\ -
Ctrl+R: Reload current simulation. If no simulation exists, the last used simulation config is loaded\ -
Ctrl+Shift+R: Reload current simulation with another random seed\ -
Ctrl+X: Quit COOJA\ -
\ -
F1: Toggle quick help - +se.sics.cooja.plugins.Visualizer = \ +Visualizer \ +

The visualizer shows the positions of simulated motes as viewed from above (XY-plane). \ +It is possible to zoom (CRTL+Mouse drag) and pan (Shift+Mouse drag) the current view. Motes can be moved by dragging them (ALT+Mouse drag). \ +Mouse right-click a mote or unoccupied space for a popup menu with more options. \ +

The visualizer supports "visualizer skins". \ +Each skin provides some specific information, such as ongoing simulated radio traffic, or the IP addresses of motes. \ +Multiple skins can be active at the same time. \ +Click the upper "Select visualizer skin" button to select or deselect skins. \ +

Useful skins \ +
Mote IDs: prints the unique mote IDs inside motes. \ +
Log output: prints the last printf message above motes. \ +
Radio traffic: displays inter-mote radio communication. \ +
Radio environment (UDGM): enables configurating the UDGM radio medium. \ +

Tip
\ +Right-click visualizer to show the popup menu, and click "Hide window decorations". + +se.sics.cooja.plugins.LogListener = \ +Log Listener\ +

Listens to log output from all simulated motes. \ +Right-click the main area for a popup menu with more options. \ +

You may filter shown logs by entering regular expressions in the bottom text field. \ +Filtering is performed on both the Mote and the Data columns.\ +

Filter examples: \ +

Hello
logs containing the string 'Hello'\ +

^Contiki
logs starting with 'Contiki'\ +

^[CR]
logs starting either a C or an R\ +

Hello$
logs ending with 'Hello'\ +

^ID:[2-5]$
logs from motes 2 to 5\ +

^ID:[2-5] Contiki
logs from motes 2 to 5 starting with 'Contiki' + +se.sics.cooja.plugins.TimeLine = \ +Timeline\ +

The timeline arranges historical simulation events into a graphical timeline. \ +The timeline can for example be used to overview the behavior of complex power-saving MAC protocols.\ +

Events appear as colored rectangles in the timeline. For more information about a particular event, hover the mouse above it.\ +

The checkboxes in the left pane control what event types are shown in the timeline. \ +Currently, four event types are supported (see below). Note that the control pane can be hidden to save space. \ +

All simulated motes are by default added to the timeline, however, any unwanted motes can be removed by mouse clicking the node ID (left).\ +

To display a vertical time marker on the timeline, press and hold the mouse on the time ruler (top).\ +

For more options, such as zooming and saving raw data to file, right-click the mouse for a popup menu.\ +

Radio RX/TX\ +
Shows radio connection events. Transmissions are painted blue, receptions are green, and interfered radios are red.\ +

Radio ON/OFF\ +
Shows whether the mote radio is on or off. Turned on radios are indicated with gray color.\ +

LEDs\ +
Shows LED state: red, green, and blue. (Assumes all mote types have exactly three LEDs.)\ +

Watchpoints\ +
Shows triggered watchpoints, currently only supported by MSPSim-based motes. To add watchpoints, use the Msp Code Watcher plugin. + +se.sics.cooja.plugins.SimControl = \ +Control Panel\ +

Use the control panel to start and stop the current simulation. \ +

Note that toggling simulation execution is also possible by the keyboard shortcut Ctrl+S. \ +

Step millisecond executes all events within the next simulated millisecond. \ +

The execution speed can be controlled via the bottom slider. \ +If the slider value is non-zero, sleep events are scheduled in the simulation loop. \ +

By setting the slider to Real time, the execution speed is limited to at maximum real time. \ +The Real time slider value is to the right of No simulation delay: select the slider button and use to keyboard to navigate here. \ +

Run until can be used to configure a time (in milliseconds) where the simulation will automatically pause. + +se.sics.cooja.mspmote.plugins.MspCLI = \ +MSPSim's Command Line Interface\ +

help
lists available commands\ +

info CC2420
shows radio chip details\ +

log CC2420 > mylog.txt
logs radio chip details to file\ +

stacktrace
shows current stacktrace + +KEYBOARD_SHORTCUTS = \ +Keyboard shortcuts
\ +
Ctrl+N: New simulation\ +
Ctrl+S: Start/pause simulation\ +
Ctrl+R: Reload current simulation. If no simulation exists, the last used simulation config is loaded\ +
Ctrl+Shift+R: Reload current simulation with another random seed\ +
Ctrl+X: Quit COOJA\ +
\ +
F1: Toggle quick help + diff --git a/tools/cooja/config/scripts/basic.js b/tools/cooja/config/scripts/basic.js index cd454dea0..ebbacaaca 100644 --- a/tools/cooja/config/scripts/basic.js +++ b/tools/cooja/config/scripts/basic.js @@ -1,28 +1,28 @@ -/* - * Example Contiki test script (JavaScript). - * A Contiki test script acts on mote output, such as via printf()'s. - * The script may operate on the following variables: - * Mote mote, int id, String msg - */ - -/* Make test automatically fail (timeout) after 100 simulated seconds */ -//TIMEOUT(100000); /* milliseconds. no action at timeout */ -TIMEOUT(100000, log.log("last msg: " + msg + "\n")); /* milliseconds. print last msg at timeout */ - -log.log("first mote output: '" + msg + "'\n"); - -YIELD(); /* wait for another mote output */ - -log.log("second mote output: '" + msg + "'\n"); - -log.log("waiting for hello world output from mote 1\n"); -WAIT_UNTIL(id == 1 && msg.equals("Hello, world")); - -write(mote, "Hello, mote\n"); /* Write to mote serial port */ - -GENERATE_MSG(15000, "continue"); -YIELD_THEN_WAIT_UNTIL(msg.equals("continue")); - -log.log("ok, reporting success now\n"); -log.testOK(); /* Report test success and quit */ -//log.testFailed(); /* Report test failure and quit */ +/* + * Example Contiki test script (JavaScript). + * A Contiki test script acts on mote output, such as via printf()'s. + * The script may operate on the following variables: + * Mote mote, int id, String msg + */ + +/* Make test automatically fail (timeout) after 100 simulated seconds */ +//TIMEOUT(100000); /* milliseconds. no action at timeout */ +TIMEOUT(100000, log.log("last msg: " + msg + "\n")); /* milliseconds. print last msg at timeout */ + +log.log("first mote output: '" + msg + "'\n"); + +YIELD(); /* wait for another mote output */ + +log.log("second mote output: '" + msg + "'\n"); + +log.log("waiting for hello world output from mote 1\n"); +WAIT_UNTIL(id == 1 && msg.equals("Hello, world")); + +write(mote, "Hello, mote\n"); /* Write to mote serial port */ + +GENERATE_MSG(15000, "continue"); +YIELD_THEN_WAIT_UNTIL(msg.equals("continue")); + +log.log("ok, reporting success now\n"); +log.testOK(); /* Report test success and quit */ +//log.testFailed(); /* Report test failure and quit */ diff --git a/tools/cooja/config/scripts/helloworld.js b/tools/cooja/config/scripts/helloworld.js index 6d82a7352..5f6f617b5 100644 --- a/tools/cooja/config/scripts/helloworld.js +++ b/tools/cooja/config/scripts/helloworld.js @@ -1,11 +1,11 @@ -/* - * Example Contiki test script (JavaScript). - * A Contiki test script acts on mote output, such as via printf()'s. - * The script may operate on the following variables: - * Mote mote, int id, String msg - */ - -TIMEOUT(2000, log.log("last message: " + msg + "\n")); - -WAIT_UNTIL(msg.equals('Hello, world')); -log.testOK(); +/* + * Example Contiki test script (JavaScript). + * A Contiki test script acts on mote output, such as via printf()'s. + * The script may operate on the following variables: + * Mote mote, int id, String msg + */ + +TIMEOUT(2000, log.log("last message: " + msg + "\n")); + +WAIT_UNTIL(msg.equals('Hello, world')); +log.testOK(); diff --git a/tools/cooja/config/scripts/log_all.js b/tools/cooja/config/scripts/log_all.js index d4eb6233f..b0c20069d 100644 --- a/tools/cooja/config/scripts/log_all.js +++ b/tools/cooja/config/scripts/log_all.js @@ -1,13 +1,13 @@ -/* - * Example Contiki test script (JavaScript). - * A Contiki test script acts on mote output, such as via printf()'s. - * The script may operate on the following variables: - * Mote mote, int id, String msg - */ - -TIMEOUT(60000); - -while (true) { - log.log(time + ":" + id + ":" + msg + "\n"); - YIELD(); -} +/* + * Example Contiki test script (JavaScript). + * A Contiki test script acts on mote output, such as via printf()'s. + * The script may operate on the following variables: + * Mote mote, int id, String msg + */ + +TIMEOUT(60000); + +while (true) { + log.log(time + ":" + id + ":" + msg + "\n"); + YIELD(); +} diff --git a/tools/cooja/config/scripts/plugins.js b/tools/cooja/config/scripts/plugins.js index 9efb6964c..48cd2097c 100644 --- a/tools/cooja/config/scripts/plugins.js +++ b/tools/cooja/config/scripts/plugins.js @@ -1,50 +1,50 @@ -/* - * Example showing how to reference and interact with surrounding - * COOJA plugins from a test script. - * The code looks up three common plugins and, if found, performs some - * simple plugin-specific task. - */ - -/* Started plugins are available from the GUI object */ - -while (true) { - - GENERATE_MSG(1000, "wait"); - YIELD_THEN_WAIT_UNTIL(msg.equals("wait")); - - /* Toggle Log Listener filter */ - plugin = mote.getSimulation().getGUI().getStartedPlugin("se.sics.cooja.plugins.LogListener"); - if (plugin != null) { - log.log("LogListener: Setting filter: " + plugin.getFilter() + "\n"); - if (plugin.getFilter() == null || !plugin.getFilter().equals("Contiki")) { - plugin.setFilter("Contiki"); - } else { - plugin.setFilter("MAC"); - } - } - - GENERATE_MSG(1000, "wait"); - YIELD_THEN_WAIT_UNTIL(msg.equals("wait")); - - /* Extract Timeline statistics */ - plugin = mote.getSimulation().getGUI().getStartedPlugin("se.sics.cooja.plugins.TimeLine"); - if (plugin != null) { - stats = plugin.extractStatistics(); - if (stats.length() > 40) { - /* Stripping */ - stats = stats.substring(0, 40) + "..."; - } - log.log("Timeline: Extracted statistics:\n" + stats + "\n"); - } - - GENERATE_MSG(1000, "wait"); - YIELD_THEN_WAIT_UNTIL(msg.equals("wait")); - - /* Select time in Radio Logger */ - plugin = mote.getSimulation().getGUI().getStartedPlugin("se.sics.cooja.plugins.RadioLogger"); - if (plugin != null) { - log.log("RadioLogger: Showing logged radio packet at mid simulation\n"); - plugin.trySelectTime(time/2); - } - -} +/* + * Example showing how to reference and interact with surrounding + * COOJA plugins from a test script. + * The code looks up three common plugins and, if found, performs some + * simple plugin-specific task. + */ + +/* Started plugins are available from the GUI object */ + +while (true) { + + GENERATE_MSG(1000, "wait"); + YIELD_THEN_WAIT_UNTIL(msg.equals("wait")); + + /* Toggle Log Listener filter */ + plugin = mote.getSimulation().getGUI().getStartedPlugin("se.sics.cooja.plugins.LogListener"); + if (plugin != null) { + log.log("LogListener: Setting filter: " + plugin.getFilter() + "\n"); + if (plugin.getFilter() == null || !plugin.getFilter().equals("Contiki")) { + plugin.setFilter("Contiki"); + } else { + plugin.setFilter("MAC"); + } + } + + GENERATE_MSG(1000, "wait"); + YIELD_THEN_WAIT_UNTIL(msg.equals("wait")); + + /* Extract Timeline statistics */ + plugin = mote.getSimulation().getGUI().getStartedPlugin("se.sics.cooja.plugins.TimeLine"); + if (plugin != null) { + stats = plugin.extractStatistics(); + if (stats.length() > 40) { + /* Stripping */ + stats = stats.substring(0, 40) + "..."; + } + log.log("Timeline: Extracted statistics:\n" + stats + "\n"); + } + + GENERATE_MSG(1000, "wait"); + YIELD_THEN_WAIT_UNTIL(msg.equals("wait")); + + /* Select time in Radio Logger */ + plugin = mote.getSimulation().getGUI().getStartedPlugin("se.sics.cooja.plugins.RadioLogger"); + if (plugin != null) { + log.log("RadioLogger: Showing logged radio packet at mid simulation\n"); + plugin.trySelectTime(time/2); + } + +} diff --git a/tools/cooja/config/scripts/shell.js b/tools/cooja/config/scripts/shell.js index 6590aa481..6dc1a8fdb 100644 --- a/tools/cooja/config/scripts/shell.js +++ b/tools/cooja/config/scripts/shell.js @@ -1,27 +1,27 @@ -/* - * Example Contiki test script (JavaScript). - * A Contiki test script acts on mote output, such as via printf()'s. - * The script may operate on the following variables: - * Mote mote, int id, String msg - */ - -/* Wait until node has booted */ -WAIT_UNTIL(msg.startsWith('Starting')); -log.log("Mote started\n"); -mymote = mote; /* store mote reference */ - -/* Wait 3 seconds (3000ms) */ -GENERATE_MSG(3000, "continue"); -YIELD_THEN_WAIT_UNTIL(msg.equals("continue")); - -/* Write command to serial port */ -log.log("Writing 'ls' to mote serial port\n"); -write(mymote, "ls"); - -/* Read replies */ -while (true) { - YIELD(); - if (mote == mymote) { - log.log("Mote replied: " + msg + "\n"); - } +/* + * Example Contiki test script (JavaScript). + * A Contiki test script acts on mote output, such as via printf()'s. + * The script may operate on the following variables: + * Mote mote, int id, String msg + */ + +/* Wait until node has booted */ +WAIT_UNTIL(msg.startsWith('Starting')); +log.log("Mote started\n"); +mymote = mote; /* store mote reference */ + +/* Wait 3 seconds (3000ms) */ +GENERATE_MSG(3000, "continue"); +YIELD_THEN_WAIT_UNTIL(msg.equals("continue")); + +/* Write command to serial port */ +log.log("Writing 'ls' to mote serial port\n"); +write(mymote, "ls"); + +/* Read replies */ +while (true) { + YIELD(); + if (mote == mymote) { + log.log("Mote replied: " + msg + "\n"); + } } \ No newline at end of file diff --git a/tools/cooja/config/test_template.c b/tools/cooja/config/test_template.c index 06103e1f9..56595ca69 100644 --- a/tools/cooja/config/test_template.c +++ b/tools/cooja/config/test_template.c @@ -1,89 +1,89 @@ -/* - * Copyright (c) 2006, Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND 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 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $Id: test_template.c,v 1.1 2009/02/20 16:59:52 fros4943 Exp $ - */ - -#include -#include -#include -#include - -const struct simInterface *simInterfaces[] = {NULL}; - -long ref_var; /* Placed somewhere in the BSS section */ - -/* Variables with known memory addresses */ -int var1=1; -int var2=2; -int var3=2; -int arr1[10]; -int arr2[10]; -int uvar1; -int uvar2; - -JNIEXPORT void JNICALL -Java_se_sics_cooja_corecomm_[CLASS_NAME]_init(JNIEnv *env, jobject obj) -{ - } -/*---------------------------------------------------------------------------*/ -JNIEXPORT void JNICALL -Java_se_sics_cooja_corecomm_[CLASS_NAME]_getMemory(JNIEnv *env, jobject obj, jint rel_addr, jint length, jbyteArray mem_arr) -{ - (*env)->SetByteArrayRegion( - env, - mem_arr, - 0, - (size_t) length, - (jbyte *) (((long)rel_addr) + ref_var) - ); -} -/*---------------------------------------------------------------------------*/ -JNIEXPORT void JNICALL -Java_se_sics_cooja_corecomm_[CLASS_NAME]_setMemory(JNIEnv *env, jobject obj, jint rel_addr, jint length, jbyteArray mem_arr) -{ - jbyte *mem = (*env)->GetByteArrayElements(env, mem_arr, 0); - memcpy( - (char*) (((long)rel_addr) + ref_var), - mem, - length); - (*env)->ReleaseByteArrayElements(env, mem_arr, mem, 0); -} -/*---------------------------------------------------------------------------*/ -JNIEXPORT void JNICALL -Java_se_sics_cooja_corecomm_[CLASS_NAME]_tick(JNIEnv *env, jobject obj) -{ - ++var1; - ++uvar1; -} -/*---------------------------------------------------------------------------*/ -JNIEXPORT void JNICALL -Java_se_sics_cooja_corecomm_[CLASS_NAME]_setReferenceAddress(JNIEnv *env, jobject obj, jint addr) -{ - ref_var = (((long)&ref_var) - ((long)addr)); -} +/* + * Copyright (c) 2006, Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the Institute nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND 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 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $Id: test_template.c,v 1.1 2009/02/20 16:59:52 fros4943 Exp $ + */ + +#include +#include +#include +#include + +const struct simInterface *simInterfaces[] = {NULL}; + +long ref_var; /* Placed somewhere in the BSS section */ + +/* Variables with known memory addresses */ +int var1=1; +int var2=2; +int var3=2; +int arr1[10]; +int arr2[10]; +int uvar1; +int uvar2; + +JNIEXPORT void JNICALL +Java_se_sics_cooja_corecomm_[CLASS_NAME]_init(JNIEnv *env, jobject obj) +{ + } +/*---------------------------------------------------------------------------*/ +JNIEXPORT void JNICALL +Java_se_sics_cooja_corecomm_[CLASS_NAME]_getMemory(JNIEnv *env, jobject obj, jint rel_addr, jint length, jbyteArray mem_arr) +{ + (*env)->SetByteArrayRegion( + env, + mem_arr, + 0, + (size_t) length, + (jbyte *) (((long)rel_addr) + ref_var) + ); +} +/*---------------------------------------------------------------------------*/ +JNIEXPORT void JNICALL +Java_se_sics_cooja_corecomm_[CLASS_NAME]_setMemory(JNIEnv *env, jobject obj, jint rel_addr, jint length, jbyteArray mem_arr) +{ + jbyte *mem = (*env)->GetByteArrayElements(env, mem_arr, 0); + memcpy( + (char*) (((long)rel_addr) + ref_var), + mem, + length); + (*env)->ReleaseByteArrayElements(env, mem_arr, mem, 0); +} +/*---------------------------------------------------------------------------*/ +JNIEXPORT void JNICALL +Java_se_sics_cooja_corecomm_[CLASS_NAME]_tick(JNIEnv *env, jobject obj) +{ + ++var1; + ++uvar1; +} +/*---------------------------------------------------------------------------*/ +JNIEXPORT void JNICALL +Java_se_sics_cooja_corecomm_[CLASS_NAME]_setReferenceAddress(JNIEnv *env, jobject obj, jint addr) +{ + ref_var = (((long)&ref_var) - ((long)addr)); +} diff --git a/tools/cooja/contiki_tests/esb_helloworld.csc b/tools/cooja/contiki_tests/esb_helloworld.csc index 5e9de50b2..8fa3806fe 100644 --- a/tools/cooja/contiki_tests/esb_helloworld.csc +++ b/tools/cooja/contiki_tests/esb_helloworld.csc @@ -1,125 +1,125 @@ - - - [CONTIKI_DIR]/tools/cooja/apps/mrm - [CONTIKI_DIR]/tools/cooja/apps/mspsim - [CONTIKI_DIR]/tools/cooja/apps/avrora - - My simulation - 0 - generated - 1000000 - - se.sics.cooja.radiomediums.UDGM - 50.0 - 100.0 - 1.0 - 1.0 - - - 40000 - - - se.sics.cooja.mspmote.ESBMoteType - esb1 - ESB Mote Type #esb1 - [CONTIKI_DIR]/examples/hello-world/hello-world.c - make clean TARGET=esb -make hello-world.esb TARGET=esb - [CONTIKI_DIR]/examples/hello-world/hello-world.esb - se.sics.cooja.interfaces.Position - se.sics.cooja.interfaces.RimeAddress - se.sics.cooja.interfaces.IPAddress - se.sics.cooja.mspmote.interfaces.MspSerial - se.sics.cooja.mspmote.interfaces.MspClock - se.sics.cooja.mspmote.interfaces.ESBLED - se.sics.cooja.mspmote.interfaces.ESBButton - se.sics.cooja.mspmote.interfaces.MspMoteID - se.sics.cooja.mspmote.interfaces.TR1001Radio - se.sics.cooja.interfaces.Mote2MoteRelations - - - se.sics.cooja.mspmote.ESBMote - - - se.sics.cooja.interfaces.Position - 57.296459690977144 - 73.20759478605089 - 0.0 - - - se.sics.cooja.mspmote.interfaces.MspMoteID - 1 - - esb1 - - - - se.sics.cooja.plugins.SimControl - 259 - 6 - 184 - 60 - 60 - false - - - se.sics.cooja.plugins.Visualizer - - se.sics.cooja.plugins.skins.IDVisualizerSkin - se.sics.cooja.plugins.skins.LogVisualizerSkin - 0.9090909090909091 0.0 0.0 0.9090909090909091 91.91230937183896 53.4476411035901 - - 300 - 3 - 300 - 945 - 0 - false - - - se.sics.cooja.plugins.LogListener - - - - 1245 - 5 - 150 - 0 - 530 - false - - - se.sics.cooja.plugins.TimeLine - - 0 - - - - 109 - 9 - - 1245 - 1 - 150 - 0 - 680 - false - - - se.sics.cooja.plugins.ScriptRunner - - - true - - 600 - 0 - 453 - 337 - 25 - false - - - + + + [CONTIKI_DIR]/tools/cooja/apps/mrm + [CONTIKI_DIR]/tools/cooja/apps/mspsim + [CONTIKI_DIR]/tools/cooja/apps/avrora + + My simulation + 0 + generated + 1000000 + + se.sics.cooja.radiomediums.UDGM + 50.0 + 100.0 + 1.0 + 1.0 + + + 40000 + + + se.sics.cooja.mspmote.ESBMoteType + esb1 + ESB Mote Type #esb1 + [CONTIKI_DIR]/examples/hello-world/hello-world.c + make clean TARGET=esb +make hello-world.esb TARGET=esb + [CONTIKI_DIR]/examples/hello-world/hello-world.esb + se.sics.cooja.interfaces.Position + se.sics.cooja.interfaces.RimeAddress + se.sics.cooja.interfaces.IPAddress + se.sics.cooja.mspmote.interfaces.MspSerial + se.sics.cooja.mspmote.interfaces.MspClock + se.sics.cooja.mspmote.interfaces.ESBLED + se.sics.cooja.mspmote.interfaces.ESBButton + se.sics.cooja.mspmote.interfaces.MspMoteID + se.sics.cooja.mspmote.interfaces.TR1001Radio + se.sics.cooja.interfaces.Mote2MoteRelations + + + se.sics.cooja.mspmote.ESBMote + + + se.sics.cooja.interfaces.Position + 57.296459690977144 + 73.20759478605089 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 1 + + esb1 + + + + se.sics.cooja.plugins.SimControl + 259 + 6 + 184 + 60 + 60 + false + + + se.sics.cooja.plugins.Visualizer + + se.sics.cooja.plugins.skins.IDVisualizerSkin + se.sics.cooja.plugins.skins.LogVisualizerSkin + 0.9090909090909091 0.0 0.0 0.9090909090909091 91.91230937183896 53.4476411035901 + + 300 + 3 + 300 + 945 + 0 + false + + + se.sics.cooja.plugins.LogListener + + + + 1245 + 5 + 150 + 0 + 530 + false + + + se.sics.cooja.plugins.TimeLine + + 0 + + + + 109 + 9 + + 1245 + 1 + 150 + 0 + 680 + false + + + se.sics.cooja.plugins.ScriptRunner + + + true + + 600 + 0 + 453 + 337 + 25 + false + + + diff --git a/tools/cooja/contiki_tests/servreg-hack.csc b/tools/cooja/contiki_tests/servreg-hack.csc index a890e5e57..e8bf89e05 100644 --- a/tools/cooja/contiki_tests/servreg-hack.csc +++ b/tools/cooja/contiki_tests/servreg-hack.csc @@ -1,316 +1,316 @@ - - - [CONTIKI_DIR]/tools/cooja/apps/mrm - [CONTIKI_DIR]/tools/cooja/apps/mspsim - [CONTIKI_DIR]/tools/cooja/apps/avrora - [CONTIKI_DIR]/tools/cooja/apps/native_gateway - [CONTIKI_DIR]/tools/cooja/apps/serial_socket - /home/user/contikiprojects/sics.se/mobility - - Servreg hack test - 0 - 123456 - 1000000 - - se.sics.cooja.radiomediums.UDGM - 40.0 - 40.0 - 1.0 - 1.0 - - - 40000 - - - se.sics.cooja.mspmote.SkyMoteType - sky1 - Servreg server - [CONTIKI_DIR]/examples/servreg-hack/example-servreg-server.c - make example-servreg-server.sky TARGET=sky - [CONTIKI_DIR]/examples/servreg-hack/example-servreg-server.sky - se.sics.cooja.interfaces.Position - se.sics.cooja.interfaces.RimeAddress - se.sics.cooja.interfaces.IPAddress - se.sics.cooja.interfaces.Mote2MoteRelations - se.sics.cooja.interfaces.MoteAttributes - se.sics.cooja.mspmote.interfaces.MspClock - se.sics.cooja.mspmote.interfaces.MspMoteID - se.sics.cooja.mspmote.interfaces.SkyButton - se.sics.cooja.mspmote.interfaces.SkyFlash - se.sics.cooja.mspmote.interfaces.SkyCoffeeFilesystem - se.sics.cooja.mspmote.interfaces.SkyByteRadio - se.sics.cooja.mspmote.interfaces.MspSerial - se.sics.cooja.mspmote.interfaces.SkyLED - se.sics.cooja.mspmote.interfaces.MspDebugOutput - se.sics.cooja.mspmote.interfaces.SkyTemperature - - - se.sics.cooja.mspmote.SkyMoteType - sky2 - Servreg hack client - [CONTIKI_DIR]/examples/servreg-hack/example-servreg-client.c - make example-servreg-client.sky TARGET=sky - [CONTIKI_DIR]/examples/servreg-hack/example-servreg-client.sky - se.sics.cooja.interfaces.Position - se.sics.cooja.interfaces.RimeAddress - se.sics.cooja.interfaces.IPAddress - se.sics.cooja.interfaces.Mote2MoteRelations - se.sics.cooja.interfaces.MoteAttributes - se.sics.cooja.mspmote.interfaces.MspClock - se.sics.cooja.mspmote.interfaces.MspMoteID - se.sics.cooja.mspmote.interfaces.SkyButton - se.sics.cooja.mspmote.interfaces.SkyFlash - se.sics.cooja.mspmote.interfaces.SkyCoffeeFilesystem - se.sics.cooja.mspmote.interfaces.SkyByteRadio - se.sics.cooja.mspmote.interfaces.MspSerial - se.sics.cooja.mspmote.interfaces.SkyLED - se.sics.cooja.mspmote.interfaces.MspDebugOutput - se.sics.cooja.mspmote.interfaces.SkyTemperature - - - - - se.sics.cooja.interfaces.Position - 45.693987609497896 - 26.353051242505675 - 0.0 - - - se.sics.cooja.mspmote.interfaces.MspMoteID - 1 - - sky1 - - - - - se.sics.cooja.interfaces.Position - 18.451397050087735 - 55.93074152489276 - 0.0 - - - se.sics.cooja.mspmote.interfaces.MspMoteID - 2 - - sky2 - - - - - se.sics.cooja.interfaces.Position - 45.082598269523864 - 52.7178388400784 - 0.0 - - - se.sics.cooja.mspmote.interfaces.MspMoteID - 3 - - sky2 - - - - - se.sics.cooja.interfaces.Position - 11.116935333105516 - 49.070534908051414 - 0.0 - - - se.sics.cooja.mspmote.interfaces.MspMoteID - 4 - - sky2 - - - - - se.sics.cooja.interfaces.Position - 85.11866272622683 - 30.030092430999066 - 0.0 - - - se.sics.cooja.mspmote.interfaces.MspMoteID - 5 - - sky2 - - - - - se.sics.cooja.interfaces.Position - 30.71302161006234 - 13.877842534368446 - 0.0 - - - se.sics.cooja.mspmote.interfaces.MspMoteID - 6 - - sky2 - - - - - se.sics.cooja.interfaces.Position - 44.43705509785284 - 69.81167027376168 - 0.0 - - - se.sics.cooja.mspmote.interfaces.MspMoteID - 7 - - sky2 - - - - - se.sics.cooja.interfaces.Position - 64.10992023465046 - 20.589540162635835 - 0.0 - - - se.sics.cooja.mspmote.interfaces.MspMoteID - 8 - - sky2 - - - - - se.sics.cooja.interfaces.Position - 32.29787406276132 - 18.754900913594753 - 0.0 - - - se.sics.cooja.mspmote.interfaces.MspMoteID - 9 - - sky2 - - - - - se.sics.cooja.interfaces.Position - 25.28398611019028 - 69.27186586570369 - 0.0 - - - se.sics.cooja.mspmote.interfaces.MspMoteID - 10 - - sky2 - - - - - se.sics.cooja.interfaces.Position - 19.3359466030565 - 17.321986704081503 - 0.0 - - - se.sics.cooja.mspmote.interfaces.MspMoteID - 11 - - sky2 - - - - se.sics.cooja.plugins.SimControl - 318 - 1 - 172 - 0 - 0 - - - se.sics.cooja.plugins.Visualizer - - se.sics.cooja.plugins.skins.IDVisualizerSkin - se.sics.cooja.plugins.skins.MoteTypeVisualizerSkin - se.sics.cooja.plugins.skins.AttributeVisualizerSkin - se.sics.cooja.plugins.skins.UDGMVisualizerSkin - se.sics.cooja.plugins.skins.GridVisualizerSkin - 3.56257040103728 0.0 0.0 3.56257040103728 -26.423046586149052 -28.07489060373735 - - 300 - 2 - 300 - 1140 - 0 - - - se.sics.cooja.plugins.LogListener - - - - 1440 - 3 - 324 - 2 - 270 - - - se.sics.cooja.plugins.TimeLine - - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - - - 125 - 1633.2339825135305 - - 1440 - 4 - 238 - 0 - 595 - - - se.sics.cooja.plugins.ScriptRunner - - - true - - 600 - 0 - 700 - 526 - 6 - - - + + + [CONTIKI_DIR]/tools/cooja/apps/mrm + [CONTIKI_DIR]/tools/cooja/apps/mspsim + [CONTIKI_DIR]/tools/cooja/apps/avrora + [CONTIKI_DIR]/tools/cooja/apps/native_gateway + [CONTIKI_DIR]/tools/cooja/apps/serial_socket + /home/user/contikiprojects/sics.se/mobility + + Servreg hack test + 0 + 123456 + 1000000 + + se.sics.cooja.radiomediums.UDGM + 40.0 + 40.0 + 1.0 + 1.0 + + + 40000 + + + se.sics.cooja.mspmote.SkyMoteType + sky1 + Servreg server + [CONTIKI_DIR]/examples/servreg-hack/example-servreg-server.c + make example-servreg-server.sky TARGET=sky + [CONTIKI_DIR]/examples/servreg-hack/example-servreg-server.sky + se.sics.cooja.interfaces.Position + se.sics.cooja.interfaces.RimeAddress + se.sics.cooja.interfaces.IPAddress + se.sics.cooja.interfaces.Mote2MoteRelations + se.sics.cooja.interfaces.MoteAttributes + se.sics.cooja.mspmote.interfaces.MspClock + se.sics.cooja.mspmote.interfaces.MspMoteID + se.sics.cooja.mspmote.interfaces.SkyButton + se.sics.cooja.mspmote.interfaces.SkyFlash + se.sics.cooja.mspmote.interfaces.SkyCoffeeFilesystem + se.sics.cooja.mspmote.interfaces.SkyByteRadio + se.sics.cooja.mspmote.interfaces.MspSerial + se.sics.cooja.mspmote.interfaces.SkyLED + se.sics.cooja.mspmote.interfaces.MspDebugOutput + se.sics.cooja.mspmote.interfaces.SkyTemperature + + + se.sics.cooja.mspmote.SkyMoteType + sky2 + Servreg hack client + [CONTIKI_DIR]/examples/servreg-hack/example-servreg-client.c + make example-servreg-client.sky TARGET=sky + [CONTIKI_DIR]/examples/servreg-hack/example-servreg-client.sky + se.sics.cooja.interfaces.Position + se.sics.cooja.interfaces.RimeAddress + se.sics.cooja.interfaces.IPAddress + se.sics.cooja.interfaces.Mote2MoteRelations + se.sics.cooja.interfaces.MoteAttributes + se.sics.cooja.mspmote.interfaces.MspClock + se.sics.cooja.mspmote.interfaces.MspMoteID + se.sics.cooja.mspmote.interfaces.SkyButton + se.sics.cooja.mspmote.interfaces.SkyFlash + se.sics.cooja.mspmote.interfaces.SkyCoffeeFilesystem + se.sics.cooja.mspmote.interfaces.SkyByteRadio + se.sics.cooja.mspmote.interfaces.MspSerial + se.sics.cooja.mspmote.interfaces.SkyLED + se.sics.cooja.mspmote.interfaces.MspDebugOutput + se.sics.cooja.mspmote.interfaces.SkyTemperature + + + + + se.sics.cooja.interfaces.Position + 45.693987609497896 + 26.353051242505675 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 1 + + sky1 + + + + + se.sics.cooja.interfaces.Position + 18.451397050087735 + 55.93074152489276 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 2 + + sky2 + + + + + se.sics.cooja.interfaces.Position + 45.082598269523864 + 52.7178388400784 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 3 + + sky2 + + + + + se.sics.cooja.interfaces.Position + 11.116935333105516 + 49.070534908051414 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 4 + + sky2 + + + + + se.sics.cooja.interfaces.Position + 85.11866272622683 + 30.030092430999066 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 5 + + sky2 + + + + + se.sics.cooja.interfaces.Position + 30.71302161006234 + 13.877842534368446 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 6 + + sky2 + + + + + se.sics.cooja.interfaces.Position + 44.43705509785284 + 69.81167027376168 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 7 + + sky2 + + + + + se.sics.cooja.interfaces.Position + 64.10992023465046 + 20.589540162635835 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 8 + + sky2 + + + + + se.sics.cooja.interfaces.Position + 32.29787406276132 + 18.754900913594753 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 9 + + sky2 + + + + + se.sics.cooja.interfaces.Position + 25.28398611019028 + 69.27186586570369 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 10 + + sky2 + + + + + se.sics.cooja.interfaces.Position + 19.3359466030565 + 17.321986704081503 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 11 + + sky2 + + + + se.sics.cooja.plugins.SimControl + 318 + 1 + 172 + 0 + 0 + + + se.sics.cooja.plugins.Visualizer + + se.sics.cooja.plugins.skins.IDVisualizerSkin + se.sics.cooja.plugins.skins.MoteTypeVisualizerSkin + se.sics.cooja.plugins.skins.AttributeVisualizerSkin + se.sics.cooja.plugins.skins.UDGMVisualizerSkin + se.sics.cooja.plugins.skins.GridVisualizerSkin + 3.56257040103728 0.0 0.0 3.56257040103728 -26.423046586149052 -28.07489060373735 + + 300 + 2 + 300 + 1140 + 0 + + + se.sics.cooja.plugins.LogListener + + + + 1440 + 3 + 324 + 2 + 270 + + + se.sics.cooja.plugins.TimeLine + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + + + 125 + 1633.2339825135305 + + 1440 + 4 + 238 + 0 + 595 + + + se.sics.cooja.plugins.ScriptRunner + + + true + + 600 + 0 + 700 + 526 + 6 + + + diff --git a/tools/cooja/contiki_tests/sky-ipv6-rpl-collect.csc b/tools/cooja/contiki_tests/sky-ipv6-rpl-collect.csc index 17c320dbb..b1c32eb0f 100644 --- a/tools/cooja/contiki_tests/sky-ipv6-rpl-collect.csc +++ b/tools/cooja/contiki_tests/sky-ipv6-rpl-collect.csc @@ -1,620 +1,620 @@ - - - [CONTIKI_DIR]/tools/cooja/apps/mrm - [CONTIKI_DIR]/tools/cooja/apps/mspsim - [CONTIKI_DIR]/tools/cooja/apps/avrora - [CONTIKI_DIR]/tools/cooja/apps/native_gateway - [CONTIKI_DIR]/tools/cooja/apps/serial_socket - /home/user/contikiprojects/sics.se/mobility - [CONTIKI_DIR]/tools/cooja/apps/collect-view - /home/user/contikiprojects/sics.se/powertracker - - My simulation - 0 - 123456 - 1000000 - - se.sics.cooja.radiomediums.UDGM - 100.0 - 0.0 - 1.0 - 1.0 - - - 40000 - - - se.sics.cooja.mspmote.SkyMoteType - sky1 - Sky Mote Type #sky1 - [CONTIKI_DIR]/examples/ipv6/rpl-collect/udp-sink.c - make udp-sink.sky TARGET=sky - [CONTIKI_DIR]/examples/ipv6/rpl-collect/udp-sink.sky - se.sics.cooja.interfaces.Position - se.sics.cooja.interfaces.RimeAddress - se.sics.cooja.interfaces.IPAddress - se.sics.cooja.interfaces.Mote2MoteRelations - se.sics.cooja.interfaces.MoteAttributes - se.sics.cooja.mspmote.interfaces.MspClock - se.sics.cooja.mspmote.interfaces.MspMoteID - se.sics.cooja.mspmote.interfaces.SkyButton - se.sics.cooja.mspmote.interfaces.SkyFlash - se.sics.cooja.mspmote.interfaces.SkyCoffeeFilesystem - se.sics.cooja.mspmote.interfaces.SkyByteRadio - se.sics.cooja.mspmote.interfaces.MspSerial - se.sics.cooja.mspmote.interfaces.SkyLED - se.sics.cooja.mspmote.interfaces.MspDebugOutput - se.sics.cooja.mspmote.interfaces.SkyTemperature - - - se.sics.cooja.mspmote.SkyMoteType - sky2 - Sky Mote Type #sky2 - [CONTIKI_DIR]/examples/ipv6/rpl-collect/udp-sender.c - make udp-sender.sky TARGET=sky - [CONTIKI_DIR]/examples/ipv6/rpl-collect/udp-sender.sky - se.sics.cooja.interfaces.Position - se.sics.cooja.interfaces.RimeAddress - se.sics.cooja.interfaces.IPAddress - se.sics.cooja.interfaces.Mote2MoteRelations - se.sics.cooja.interfaces.MoteAttributes - se.sics.cooja.mspmote.interfaces.MspClock - se.sics.cooja.mspmote.interfaces.MspMoteID - se.sics.cooja.mspmote.interfaces.SkyButton - se.sics.cooja.mspmote.interfaces.SkyFlash - se.sics.cooja.mspmote.interfaces.SkyCoffeeFilesystem - se.sics.cooja.mspmote.interfaces.SkyByteRadio - se.sics.cooja.mspmote.interfaces.MspSerial - se.sics.cooja.mspmote.interfaces.SkyLED - se.sics.cooja.mspmote.interfaces.MspDebugOutput - se.sics.cooja.mspmote.interfaces.SkyTemperature - - - - - se.sics.cooja.interfaces.Position - 242.83184008074136 - -88.93434685786869 - 0.0 - - - se.sics.cooja.mspmote.interfaces.MspMoteID - 1 - - sky1 - - - - - se.sics.cooja.interfaces.Position - 223.5175954004352 - -69.05842098947238 - 0.0 - - - se.sics.cooja.mspmote.interfaces.MspMoteID - 2 - - sky2 - - - - - se.sics.cooja.interfaces.Position - 250.51864863077387 - -59.2420165357677 - 0.0 - - - se.sics.cooja.mspmote.interfaces.MspMoteID - 3 - - sky2 - - - - - se.sics.cooja.interfaces.Position - 294.4736028715864 - -63.23792146675066 - 0.0 - - - se.sics.cooja.mspmote.interfaces.MspMoteID - 4 - - sky2 - - - - - se.sics.cooja.interfaces.Position - 188.6638305152632 - -41.28432709660093 - 0.0 - - - se.sics.cooja.mspmote.interfaces.MspMoteID - 5 - - sky2 - - - - - se.sics.cooja.interfaces.Position - 222.54731411389315 - -32.869043991280165 - 0.0 - - - se.sics.cooja.mspmote.interfaces.MspMoteID - 6 - - sky2 - - - - - se.sics.cooja.interfaces.Position - 273.694897230475 - -29.672320046493798 - 0.0 - - - se.sics.cooja.mspmote.interfaces.MspMoteID - 7 - - sky2 - - - - - se.sics.cooja.interfaces.Position - 321.64575640227054 - -33.66822497747676 - 0.0 - - - se.sics.cooja.mspmote.interfaces.MspMoteID - 8 - - sky2 - - - - - se.sics.cooja.interfaces.Position - 159.4120162043624 - -2.500166515809672 - 0.0 - - - se.sics.cooja.mspmote.interfaces.MspMoteID - 9 - - sky2 - - - - - se.sics.cooja.interfaces.Position - 196.97352255560222 - -0.10262355721989598 - 0.0 - - - se.sics.cooja.mspmote.interfaces.MspMoteID - 10 - - sky2 - - - - - se.sics.cooja.interfaces.Position - 252.91619158936365 - 1.495738415173288 - 0.0 - - - se.sics.cooja.mspmote.interfaces.MspMoteID - 11 - - sky2 - - - - - se.sics.cooja.interfaces.Position - 301.66623174735577 - -0.10262355721989598 - 0.0 - - - se.sics.cooja.mspmote.interfaces.MspMoteID - 12 - - sky2 - - - - - se.sics.cooja.interfaces.Position - 346.4203669743649 - 1.495738415173288 - 0.0 - - - se.sics.cooja.mspmote.interfaces.MspMoteID - 13 - - sky2 - - - - - se.sics.cooja.interfaces.Position - 124.24805281171236 - 22.27444405628468 - 0.0 - - - se.sics.cooja.mspmote.interfaces.MspMoteID - 14 - - sky2 - - - - - se.sics.cooja.interfaces.Position - 180.1907218454738 - 35.86052082162674 - 0.0 - - - se.sics.cooja.mspmote.interfaces.MspMoteID - 15 - - sky2 - - - - - se.sics.cooja.interfaces.Position - 224.14567608628633 - 30.266253918250598 - 0.0 - - - se.sics.cooja.mspmote.interfaces.MspMoteID - 16 - - sky2 - - - - - se.sics.cooja.interfaces.Position - 276.0924401890648 - 35.86052082162674 - 0.0 - - - se.sics.cooja.mspmote.interfaces.MspMoteID - 17 - - sky2 - - - - - se.sics.cooja.interfaces.Position - 351.2154528915445 - 37.45888279401993 - 0.0 - - - se.sics.cooja.mspmote.interfaces.MspMoteID - 18 - - sky2 - - - - - se.sics.cooja.interfaces.Position - 89.08408941906231 - 47.04905462837903 - 0.0 - - - se.sics.cooja.mspmote.interfaces.MspMoteID - 19 - - sky2 - - - - - se.sics.cooja.interfaces.Position - 180.1907218454738 - 75.02038914525976 - 0.0 - - - se.sics.cooja.mspmote.interfaces.MspMoteID - 20 - - sky2 - - - - - se.sics.cooja.interfaces.Position - 245.7235627135943 - 66.22939829709723 - 0.0 - - - se.sics.cooja.mspmote.interfaces.MspMoteID - 21 - - sky2 - - - - - se.sics.cooja.interfaces.Position - 290.4776979406035 - 67.82776026949043 - 0.0 - - - se.sics.cooja.mspmote.interfaces.MspMoteID - 22 - - sky2 - - - - - se.sics.cooja.interfaces.Position - 370.3957965602627 - 64.63103632470406 - 0.0 - - - se.sics.cooja.mspmote.interfaces.MspMoteID - 23 - - sky2 - - - - - se.sics.cooja.interfaces.Position - 93.07999435004527 - 82.21301802102909 - 0.0 - - - se.sics.cooja.mspmote.interfaces.MspMoteID - 24 - - sky2 - - - - - se.sics.cooja.interfaces.Position - 204.16615143137156 - 106.18844760692684 - 0.0 - - - se.sics.cooja.mspmote.interfaces.MspMoteID - 25 - - sky2 - - - - se.sics.cooja.plugins.SimControl - 259 - 3 - 184 - 0 - 0 - - - se.sics.cooja.plugins.Visualizer - - se.sics.cooja.plugins.skins.IDVisualizerSkin - se.sics.cooja.plugins.skins.AttributeVisualizerSkin - se.sics.cooja.plugins.skins.UDGMVisualizerSkin - 1.836243522352668 0.0 0.0 1.836243522352668 -93.43273668589363 192.8080782058222 - - 666 - 4 - 510 - 764 - 5 - - - se.sics.cooja.plugins.LogListener - - - - 1347 - 2 - 150 - 0 - 438 - - - se.sics.cooja.plugins.TimeLine - - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 - 16 - 17 - 18 - 19 - 20 - 21 - 22 - 23 - 24 - - 109 - 52818.041078329756 - - 1347 - 1 - 233 - 0 - 588 - - - se.sics.cooja.plugins.ScriptRunner - - - true - - 600 - 0 - 700 - 416 - 8 - - - + + + [CONTIKI_DIR]/tools/cooja/apps/mrm + [CONTIKI_DIR]/tools/cooja/apps/mspsim + [CONTIKI_DIR]/tools/cooja/apps/avrora + [CONTIKI_DIR]/tools/cooja/apps/native_gateway + [CONTIKI_DIR]/tools/cooja/apps/serial_socket + /home/user/contikiprojects/sics.se/mobility + [CONTIKI_DIR]/tools/cooja/apps/collect-view + /home/user/contikiprojects/sics.se/powertracker + + My simulation + 0 + 123456 + 1000000 + + se.sics.cooja.radiomediums.UDGM + 100.0 + 0.0 + 1.0 + 1.0 + + + 40000 + + + se.sics.cooja.mspmote.SkyMoteType + sky1 + Sky Mote Type #sky1 + [CONTIKI_DIR]/examples/ipv6/rpl-collect/udp-sink.c + make udp-sink.sky TARGET=sky + [CONTIKI_DIR]/examples/ipv6/rpl-collect/udp-sink.sky + se.sics.cooja.interfaces.Position + se.sics.cooja.interfaces.RimeAddress + se.sics.cooja.interfaces.IPAddress + se.sics.cooja.interfaces.Mote2MoteRelations + se.sics.cooja.interfaces.MoteAttributes + se.sics.cooja.mspmote.interfaces.MspClock + se.sics.cooja.mspmote.interfaces.MspMoteID + se.sics.cooja.mspmote.interfaces.SkyButton + se.sics.cooja.mspmote.interfaces.SkyFlash + se.sics.cooja.mspmote.interfaces.SkyCoffeeFilesystem + se.sics.cooja.mspmote.interfaces.SkyByteRadio + se.sics.cooja.mspmote.interfaces.MspSerial + se.sics.cooja.mspmote.interfaces.SkyLED + se.sics.cooja.mspmote.interfaces.MspDebugOutput + se.sics.cooja.mspmote.interfaces.SkyTemperature + + + se.sics.cooja.mspmote.SkyMoteType + sky2 + Sky Mote Type #sky2 + [CONTIKI_DIR]/examples/ipv6/rpl-collect/udp-sender.c + make udp-sender.sky TARGET=sky + [CONTIKI_DIR]/examples/ipv6/rpl-collect/udp-sender.sky + se.sics.cooja.interfaces.Position + se.sics.cooja.interfaces.RimeAddress + se.sics.cooja.interfaces.IPAddress + se.sics.cooja.interfaces.Mote2MoteRelations + se.sics.cooja.interfaces.MoteAttributes + se.sics.cooja.mspmote.interfaces.MspClock + se.sics.cooja.mspmote.interfaces.MspMoteID + se.sics.cooja.mspmote.interfaces.SkyButton + se.sics.cooja.mspmote.interfaces.SkyFlash + se.sics.cooja.mspmote.interfaces.SkyCoffeeFilesystem + se.sics.cooja.mspmote.interfaces.SkyByteRadio + se.sics.cooja.mspmote.interfaces.MspSerial + se.sics.cooja.mspmote.interfaces.SkyLED + se.sics.cooja.mspmote.interfaces.MspDebugOutput + se.sics.cooja.mspmote.interfaces.SkyTemperature + + + + + se.sics.cooja.interfaces.Position + 242.83184008074136 + -88.93434685786869 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 1 + + sky1 + + + + + se.sics.cooja.interfaces.Position + 223.5175954004352 + -69.05842098947238 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 2 + + sky2 + + + + + se.sics.cooja.interfaces.Position + 250.51864863077387 + -59.2420165357677 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 3 + + sky2 + + + + + se.sics.cooja.interfaces.Position + 294.4736028715864 + -63.23792146675066 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 4 + + sky2 + + + + + se.sics.cooja.interfaces.Position + 188.6638305152632 + -41.28432709660093 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 5 + + sky2 + + + + + se.sics.cooja.interfaces.Position + 222.54731411389315 + -32.869043991280165 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 6 + + sky2 + + + + + se.sics.cooja.interfaces.Position + 273.694897230475 + -29.672320046493798 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 7 + + sky2 + + + + + se.sics.cooja.interfaces.Position + 321.64575640227054 + -33.66822497747676 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 8 + + sky2 + + + + + se.sics.cooja.interfaces.Position + 159.4120162043624 + -2.500166515809672 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 9 + + sky2 + + + + + se.sics.cooja.interfaces.Position + 196.97352255560222 + -0.10262355721989598 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 10 + + sky2 + + + + + se.sics.cooja.interfaces.Position + 252.91619158936365 + 1.495738415173288 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 11 + + sky2 + + + + + se.sics.cooja.interfaces.Position + 301.66623174735577 + -0.10262355721989598 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 12 + + sky2 + + + + + se.sics.cooja.interfaces.Position + 346.4203669743649 + 1.495738415173288 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 13 + + sky2 + + + + + se.sics.cooja.interfaces.Position + 124.24805281171236 + 22.27444405628468 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 14 + + sky2 + + + + + se.sics.cooja.interfaces.Position + 180.1907218454738 + 35.86052082162674 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 15 + + sky2 + + + + + se.sics.cooja.interfaces.Position + 224.14567608628633 + 30.266253918250598 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 16 + + sky2 + + + + + se.sics.cooja.interfaces.Position + 276.0924401890648 + 35.86052082162674 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 17 + + sky2 + + + + + se.sics.cooja.interfaces.Position + 351.2154528915445 + 37.45888279401993 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 18 + + sky2 + + + + + se.sics.cooja.interfaces.Position + 89.08408941906231 + 47.04905462837903 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 19 + + sky2 + + + + + se.sics.cooja.interfaces.Position + 180.1907218454738 + 75.02038914525976 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 20 + + sky2 + + + + + se.sics.cooja.interfaces.Position + 245.7235627135943 + 66.22939829709723 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 21 + + sky2 + + + + + se.sics.cooja.interfaces.Position + 290.4776979406035 + 67.82776026949043 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 22 + + sky2 + + + + + se.sics.cooja.interfaces.Position + 370.3957965602627 + 64.63103632470406 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 23 + + sky2 + + + + + se.sics.cooja.interfaces.Position + 93.07999435004527 + 82.21301802102909 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 24 + + sky2 + + + + + se.sics.cooja.interfaces.Position + 204.16615143137156 + 106.18844760692684 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 25 + + sky2 + + + + se.sics.cooja.plugins.SimControl + 259 + 3 + 184 + 0 + 0 + + + se.sics.cooja.plugins.Visualizer + + se.sics.cooja.plugins.skins.IDVisualizerSkin + se.sics.cooja.plugins.skins.AttributeVisualizerSkin + se.sics.cooja.plugins.skins.UDGMVisualizerSkin + 1.836243522352668 0.0 0.0 1.836243522352668 -93.43273668589363 192.8080782058222 + + 666 + 4 + 510 + 764 + 5 + + + se.sics.cooja.plugins.LogListener + + + + 1347 + 2 + 150 + 0 + 438 + + + se.sics.cooja.plugins.TimeLine + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + + 109 + 52818.041078329756 + + 1347 + 1 + 233 + 0 + 588 + + + se.sics.cooja.plugins.ScriptRunner + + + true + + 600 + 0 + 700 + 416 + 8 + + + diff --git a/tools/cooja/contiki_tests/sky_ipv6_udp.csc b/tools/cooja/contiki_tests/sky_ipv6_udp.csc index a099befbb..d666a4a90 100644 --- a/tools/cooja/contiki_tests/sky_ipv6_udp.csc +++ b/tools/cooja/contiki_tests/sky_ipv6_udp.csc @@ -1,147 +1,147 @@ - - - [CONTIKI_DIR]/tools/cooja/apps/mrm - [CONTIKI_DIR]/tools/cooja/apps/mspsim - [CONTIKI_DIR]/tools/cooja/apps/avrora - - My simulation - 0 - generated - 1000000 - - se.sics.cooja.radiomediums.UDGM - 50.0 - 100.0 - 1.0 - 1.0 - - - 40000 - - - se.sics.cooja.mspmote.SkyMoteType - sky1 - Sky Mote Type #1 - [CONTIKI_DIR]/examples/udp-ipv6/udp-client.c - make clean TARGET=sky -make udp-client.sky TARGET=sky DEFINES=UDP_CONNECTION_ADDR=fe80::212:7402:2:202 - [CONTIKI_DIR]/examples/udp-ipv6/udp-client.sky - se.sics.cooja.interfaces.Position - se.sics.cooja.interfaces.IPAddress - se.sics.cooja.interfaces.Mote2MoteRelations - se.sics.cooja.mspmote.interfaces.MspClock - se.sics.cooja.mspmote.interfaces.MspMoteID - se.sics.cooja.mspmote.interfaces.SkyButton - se.sics.cooja.mspmote.interfaces.SkyFlash - se.sics.cooja.mspmote.interfaces.SkyByteRadio - se.sics.cooja.mspmote.interfaces.MspSerial - se.sics.cooja.mspmote.interfaces.SkyLED - - - se.sics.cooja.mspmote.SkyMoteType - sky2 - Sky Mote Type #2 - [CONTIKI_DIR]/examples/udp-ipv6/udp-server.c - make udp-server.sky TARGET=sky - [CONTIKI_DIR]/examples/udp-ipv6/udp-server.sky - se.sics.cooja.interfaces.Position - se.sics.cooja.interfaces.IPAddress - se.sics.cooja.interfaces.Mote2MoteRelations - se.sics.cooja.mspmote.interfaces.MspClock - se.sics.cooja.mspmote.interfaces.MspMoteID - se.sics.cooja.mspmote.interfaces.SkyButton - se.sics.cooja.mspmote.interfaces.SkyFlash - se.sics.cooja.mspmote.interfaces.SkyByteRadio - se.sics.cooja.mspmote.interfaces.MspSerial - se.sics.cooja.mspmote.interfaces.SkyLED - - - - - se.sics.cooja.interfaces.Position - 65.934608127183 - 63.70462190529231 - 0.0 - - - se.sics.cooja.mspmote.interfaces.MspMoteID - 1 - - sky1 - - - - - se.sics.cooja.interfaces.Position - 67.66105781539623 - 63.13924301161143 - 0.0 - - - se.sics.cooja.mspmote.interfaces.MspMoteID - 2 - - sky2 - - - - se.sics.cooja.plugins.SimControl - 248 - 0 - 200 - 0 - 0 - - - se.sics.cooja.plugins.LogListener - - - - 816 - 3 - 333 - 1 - 365 - - - se.sics.cooja.plugins.Visualizer - - se.sics.cooja.plugins.skins.IDVisualizerSkin - se.sics.cooja.plugins.skins.AddressVisualizerSkin - se.sics.cooja.plugins.skins.UDGMVisualizerSkin - 123.21660699387752 0.0 0.0 123.21660699387752 -8113.602333266065 -7760.635326525308 - - 246 - 2 - 167 - 0 - 198 - - - se.sics.cooja.plugins.ScriptRunner - - - true - - 572 - 1 - 700 - 441 - 2 - - - + + + [CONTIKI_DIR]/tools/cooja/apps/mrm + [CONTIKI_DIR]/tools/cooja/apps/mspsim + [CONTIKI_DIR]/tools/cooja/apps/avrora + + My simulation + 0 + generated + 1000000 + + se.sics.cooja.radiomediums.UDGM + 50.0 + 100.0 + 1.0 + 1.0 + + + 40000 + + + se.sics.cooja.mspmote.SkyMoteType + sky1 + Sky Mote Type #1 + [CONTIKI_DIR]/examples/udp-ipv6/udp-client.c + make clean TARGET=sky +make udp-client.sky TARGET=sky DEFINES=UDP_CONNECTION_ADDR=fe80::212:7402:2:202 + [CONTIKI_DIR]/examples/udp-ipv6/udp-client.sky + se.sics.cooja.interfaces.Position + se.sics.cooja.interfaces.IPAddress + se.sics.cooja.interfaces.Mote2MoteRelations + se.sics.cooja.mspmote.interfaces.MspClock + se.sics.cooja.mspmote.interfaces.MspMoteID + se.sics.cooja.mspmote.interfaces.SkyButton + se.sics.cooja.mspmote.interfaces.SkyFlash + se.sics.cooja.mspmote.interfaces.SkyByteRadio + se.sics.cooja.mspmote.interfaces.MspSerial + se.sics.cooja.mspmote.interfaces.SkyLED + + + se.sics.cooja.mspmote.SkyMoteType + sky2 + Sky Mote Type #2 + [CONTIKI_DIR]/examples/udp-ipv6/udp-server.c + make udp-server.sky TARGET=sky + [CONTIKI_DIR]/examples/udp-ipv6/udp-server.sky + se.sics.cooja.interfaces.Position + se.sics.cooja.interfaces.IPAddress + se.sics.cooja.interfaces.Mote2MoteRelations + se.sics.cooja.mspmote.interfaces.MspClock + se.sics.cooja.mspmote.interfaces.MspMoteID + se.sics.cooja.mspmote.interfaces.SkyButton + se.sics.cooja.mspmote.interfaces.SkyFlash + se.sics.cooja.mspmote.interfaces.SkyByteRadio + se.sics.cooja.mspmote.interfaces.MspSerial + se.sics.cooja.mspmote.interfaces.SkyLED + + + + + se.sics.cooja.interfaces.Position + 65.934608127183 + 63.70462190529231 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 1 + + sky1 + + + + + se.sics.cooja.interfaces.Position + 67.66105781539623 + 63.13924301161143 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 2 + + sky2 + + + + se.sics.cooja.plugins.SimControl + 248 + 0 + 200 + 0 + 0 + + + se.sics.cooja.plugins.LogListener + + + + 816 + 3 + 333 + 1 + 365 + + + se.sics.cooja.plugins.Visualizer + + se.sics.cooja.plugins.skins.IDVisualizerSkin + se.sics.cooja.plugins.skins.AddressVisualizerSkin + se.sics.cooja.plugins.skins.UDGMVisualizerSkin + 123.21660699387752 0.0 0.0 123.21660699387752 -8113.602333266065 -7760.635326525308 + + 246 + 2 + 167 + 0 + 198 + + + se.sics.cooja.plugins.ScriptRunner + + + true + + 572 + 1 + 700 + 441 + 2 + + + diff --git a/tools/cooja/contiki_tests/sky_ipv6_udp_fragmentation.csc b/tools/cooja/contiki_tests/sky_ipv6_udp_fragmentation.csc index a866b8c87..858bab0e9 100644 --- a/tools/cooja/contiki_tests/sky_ipv6_udp_fragmentation.csc +++ b/tools/cooja/contiki_tests/sky_ipv6_udp_fragmentation.csc @@ -1,148 +1,148 @@ - - - [CONTIKI_DIR]/tools/cooja/apps/mrm - [CONTIKI_DIR]/tools/cooja/apps/mspsim - [CONTIKI_DIR]/tools/cooja/apps/avrora - - My simulation - 0 - generated - 1000000 - - se.sics.cooja.radiomediums.UDGM - 50.0 - 100.0 - 1.0 - 1.0 - - - 40000 - - - se.sics.cooja.mspmote.SkyMoteType - sky1 - Sky Mote Type #1 - [CONTIKI_DIR]/examples/udp-ipv6/udp-client.c - make clean TARGET=sky -make udp-client.sky TARGET=sky DEFINES=UDP_CONNECTION_ADDR=fe80::212:7402:2:202,SICSLOWPAN_CONF_FRAG=1,SEND_TOO_LARGE_PACKET_TO_TEST_FRAGMENTATION=1 - [CONTIKI_DIR]/examples/udp-ipv6/udp-client.sky - se.sics.cooja.interfaces.Position - se.sics.cooja.interfaces.IPAddress - se.sics.cooja.interfaces.Mote2MoteRelations - se.sics.cooja.mspmote.interfaces.MspClock - se.sics.cooja.mspmote.interfaces.MspMoteID - se.sics.cooja.mspmote.interfaces.SkyButton - se.sics.cooja.mspmote.interfaces.SkyFlash - se.sics.cooja.mspmote.interfaces.SkyByteRadio - se.sics.cooja.mspmote.interfaces.MspSerial - se.sics.cooja.mspmote.interfaces.SkyLED - - - se.sics.cooja.mspmote.SkyMoteType - sky2 - Sky Mote Type #2 - [CONTIKI_DIR]/examples/udp-ipv6/udp-server.c - make udp-server.sky TARGET=sky DEFINES=SICSLOWPAN_CONF_FRAG=1 - [CONTIKI_DIR]/examples/udp-ipv6/udp-server.sky - se.sics.cooja.interfaces.Position - se.sics.cooja.interfaces.IPAddress - se.sics.cooja.interfaces.Mote2MoteRelations - se.sics.cooja.mspmote.interfaces.MspClock - se.sics.cooja.mspmote.interfaces.MspMoteID - se.sics.cooja.mspmote.interfaces.SkyButton - se.sics.cooja.mspmote.interfaces.SkyFlash - se.sics.cooja.mspmote.interfaces.SkyByteRadio - se.sics.cooja.mspmote.interfaces.MspSerial - se.sics.cooja.mspmote.interfaces.SkyLED - - - - - se.sics.cooja.interfaces.Position - 65.934608127183 - 63.70462190529231 - 0.0 - - - se.sics.cooja.mspmote.interfaces.MspMoteID - 1 - - sky1 - - - - - se.sics.cooja.interfaces.Position - 67.66105781539623 - 63.13924301161143 - 0.0 - - - se.sics.cooja.mspmote.interfaces.MspMoteID - 2 - - sky2 - - - - se.sics.cooja.plugins.SimControl - 248 - 2 - 200 - 0 - 0 - - - se.sics.cooja.plugins.LogListener - - - - 816 - 1 - 333 - 1 - 366 - - - se.sics.cooja.plugins.Visualizer - - se.sics.cooja.plugins.skins.IDVisualizerSkin - se.sics.cooja.plugins.skins.AddressVisualizerSkin - se.sics.cooja.plugins.skins.UDGMVisualizerSkin - 123.21660699387752 0.0 0.0 123.21660699387752 -8113.602333266065 -7760.635326525308 - - 246 - 3 - 167 - 0 - 198 - - - se.sics.cooja.plugins.ScriptRunner - - - true - - 572 - 0 - 700 - 380 - -11 - - - + + + [CONTIKI_DIR]/tools/cooja/apps/mrm + [CONTIKI_DIR]/tools/cooja/apps/mspsim + [CONTIKI_DIR]/tools/cooja/apps/avrora + + My simulation + 0 + generated + 1000000 + + se.sics.cooja.radiomediums.UDGM + 50.0 + 100.0 + 1.0 + 1.0 + + + 40000 + + + se.sics.cooja.mspmote.SkyMoteType + sky1 + Sky Mote Type #1 + [CONTIKI_DIR]/examples/udp-ipv6/udp-client.c + make clean TARGET=sky +make udp-client.sky TARGET=sky DEFINES=UDP_CONNECTION_ADDR=fe80::212:7402:2:202,SICSLOWPAN_CONF_FRAG=1,SEND_TOO_LARGE_PACKET_TO_TEST_FRAGMENTATION=1 + [CONTIKI_DIR]/examples/udp-ipv6/udp-client.sky + se.sics.cooja.interfaces.Position + se.sics.cooja.interfaces.IPAddress + se.sics.cooja.interfaces.Mote2MoteRelations + se.sics.cooja.mspmote.interfaces.MspClock + se.sics.cooja.mspmote.interfaces.MspMoteID + se.sics.cooja.mspmote.interfaces.SkyButton + se.sics.cooja.mspmote.interfaces.SkyFlash + se.sics.cooja.mspmote.interfaces.SkyByteRadio + se.sics.cooja.mspmote.interfaces.MspSerial + se.sics.cooja.mspmote.interfaces.SkyLED + + + se.sics.cooja.mspmote.SkyMoteType + sky2 + Sky Mote Type #2 + [CONTIKI_DIR]/examples/udp-ipv6/udp-server.c + make udp-server.sky TARGET=sky DEFINES=SICSLOWPAN_CONF_FRAG=1 + [CONTIKI_DIR]/examples/udp-ipv6/udp-server.sky + se.sics.cooja.interfaces.Position + se.sics.cooja.interfaces.IPAddress + se.sics.cooja.interfaces.Mote2MoteRelations + se.sics.cooja.mspmote.interfaces.MspClock + se.sics.cooja.mspmote.interfaces.MspMoteID + se.sics.cooja.mspmote.interfaces.SkyButton + se.sics.cooja.mspmote.interfaces.SkyFlash + se.sics.cooja.mspmote.interfaces.SkyByteRadio + se.sics.cooja.mspmote.interfaces.MspSerial + se.sics.cooja.mspmote.interfaces.SkyLED + + + + + se.sics.cooja.interfaces.Position + 65.934608127183 + 63.70462190529231 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 1 + + sky1 + + + + + se.sics.cooja.interfaces.Position + 67.66105781539623 + 63.13924301161143 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 2 + + sky2 + + + + se.sics.cooja.plugins.SimControl + 248 + 2 + 200 + 0 + 0 + + + se.sics.cooja.plugins.LogListener + + + + 816 + 1 + 333 + 1 + 366 + + + se.sics.cooja.plugins.Visualizer + + se.sics.cooja.plugins.skins.IDVisualizerSkin + se.sics.cooja.plugins.skins.AddressVisualizerSkin + se.sics.cooja.plugins.skins.UDGMVisualizerSkin + 123.21660699387752 0.0 0.0 123.21660699387752 -8113.602333266065 -7760.635326525308 + + 246 + 3 + 167 + 0 + 198 + + + se.sics.cooja.plugins.ScriptRunner + + + true + + 572 + 0 + 700 + 380 + -11 + + + diff --git a/tools/cooja/examples/jni_test/README.txt b/tools/cooja/examples/jni_test/README.txt index b01219bc9..1fad9075c 100644 --- a/tools/cooja/examples/jni_test/README.txt +++ b/tools/cooja/examples/jni_test/README.txt @@ -1,18 +1,18 @@ -The JNI tests have been replaced by the Cooja configuration wizard. - -The JNI tests assisted in configuring Cooja for compiling and linking -Java Native Interface (JNI) enabled Contiki libraries. Such Contiki -libraries are used by Cooja's Contiki Motes: motes simulated at the -operating system abstraction level. - -The new configuration wizard is started from inside Cooja, and exercises -the same functionality as the JNI tests. In contrast, the wizard -is directly connected to the current Cooja configuration, removing the -need to migrate the configuration between JNI tests and Cooja. - -To start the wizard: -* Start COOJA: -tools/cooja> ant run -* Menu > Settings > Compiler configuration wizard - +The JNI tests have been replaced by the Cooja configuration wizard. + +The JNI tests assisted in configuring Cooja for compiling and linking +Java Native Interface (JNI) enabled Contiki libraries. Such Contiki +libraries are used by Cooja's Contiki Motes: motes simulated at the +operating system abstraction level. + +The new configuration wizard is started from inside Cooja, and exercises +the same functionality as the JNI tests. In contrast, the wizard +is directly connected to the current Cooja configuration, removing the +need to migrate the configuration between JNI tests and Cooja. + +To start the wizard: +* Start COOJA: +tools/cooja> ant run +* Menu > Settings > Compiler configuration wizard + -- Fredrik Osterlind, fros@sics.se, March 2009 \ No newline at end of file diff --git a/tools/cooja/examples/project_new_interface/cooja.config b/tools/cooja/examples/project_new_interface/cooja.config index 7af626b2b..4cafbd62a 100644 --- a/tools/cooja/examples/project_new_interface/cooja.config +++ b/tools/cooja/examples/project_new_interface/cooja.config @@ -1,2 +1,2 @@ -se.sics.cooja.contikimote.ContikiMoteType.MOTE_INTERFACES = + DummyInterface -se.sics.cooja.contikimote.ContikiMoteType.C_SOURCES = + dummy_intf.c +se.sics.cooja.contikimote.ContikiMoteType.MOTE_INTERFACES = + DummyInterface +se.sics.cooja.contikimote.ContikiMoteType.C_SOURCES = + dummy_intf.c diff --git a/tools/cooja/examples/project_new_plugin/cooja.config b/tools/cooja/examples/project_new_plugin/cooja.config index b283a5f65..15497e9cd 100644 --- a/tools/cooja/examples/project_new_plugin/cooja.config +++ b/tools/cooja/examples/project_new_plugin/cooja.config @@ -1,2 +1,2 @@ -DESCRIPTION = Example plugin -se.sics.cooja.GUI.PLUGINS = + MyDummyPlugin +DESCRIPTION = Example plugin +se.sics.cooja.GUI.PLUGINS = + MyDummyPlugin diff --git a/tools/cooja/examples/project_new_radiomedium/cooja.config b/tools/cooja/examples/project_new_radiomedium/cooja.config index 07afb756d..9eb9aa4e8 100644 --- a/tools/cooja/examples/project_new_radiomedium/cooja.config +++ b/tools/cooja/examples/project_new_radiomedium/cooja.config @@ -1 +1 @@ -se.sics.cooja.GUI.RADIOMEDIUMS = + DummyRadioMedium +se.sics.cooja.GUI.RADIOMEDIUMS = + DummyRadioMedium diff --git a/tools/cooja/java/se/sics/cooja/plugins/analyzers/IEEE802154Analyzer.java b/tools/cooja/java/se/sics/cooja/plugins/analyzers/IEEE802154Analyzer.java index bf1044713..3aafdf2b3 100644 --- a/tools/cooja/java/se/sics/cooja/plugins/analyzers/IEEE802154Analyzer.java +++ b/tools/cooja/java/se/sics/cooja/plugins/analyzers/IEEE802154Analyzer.java @@ -1,169 +1,169 @@ -package se.sics.cooja.plugins.analyzers; - -import java.io.IOException; - -import se.sics.cooja.util.StringUtils; - -public class IEEE802154Analyzer extends PacketAnalyzer { - - /* TODO: fix this to be correct */ - public static final int NO_ADDRESS = 0; - public static final int RSV_ADDRESS = 1; - public static final int SHORT_ADDRESS = 2; - public static final int LONG_ADDRESS = 3; - - public static final int BEACONFRAME = 0x00; - public static final int DATAFRAME = 0x01; - public static final int ACKFRAME = 0x02; - public static final int CMDFRAME = 0x03; - -// private static final byte[] BROADCAST_ADDR = {(byte)0xff, (byte)0xff}; - - private static final String[] typeS = {"-", "D", "A"}; - private static final String[] typeVerbose = {"BEACON", "DATA", "ACK"}; - private PcapExporter pcapExporter; - -// private int defaultAddressMode = LONG_ADDRESS; -// private byte seqNo = 0; - -// private int myPanID = 0xabcd; - - public IEEE802154Analyzer(boolean pcap) { - if (pcap) try { - pcapExporter = new PcapExporter(); - } catch (IOException e) { - e.printStackTrace(); - } - } - - public boolean matchPacket(Packet packet) { - return packet.level == MAC_LEVEL; - } - - /* this protocol always have network level packets as payload */ - public int nextLevel(byte[] packet, int level) { - return NETWORK_LEVEL; - } - /* create a 802.15.4 packet of the bytes and "dispatch" to the - * next handler - */ - public int analyzePacket(Packet packet, StringBuffer brief, StringBuffer verbose) { - - if (pcapExporter != null) { - try { - pcapExporter.exportPacketData(packet.getPayload()); - } catch (IOException e) { - System.err.println("Could not export PCap data"); - e.printStackTrace(); - } - } - - int pos = packet.pos; - int type = packet.data[pos + 0] & 7; -// int security = (packet.data[pos + 0] >> 3) & 1; -// int pending = (packet.data[pos + 0] >> 4) & 1; -// int ackRequired = (packet.data[pos + 0] >> 5) & 1; - int panCompression = (packet.data[pos + 0]>> 6) & 1; - int destAddrMode = (packet.data[pos + 1] >> 2) & 3; -// int frameVersion = (packet.data[pos + 1] >> 4) & 3; - int srcAddrMode = (packet.data[pos + 1] >> 6) & 3; - int seqNumber = packet.data[pos + 2] & 0xff; - int destPanID = 0; - int srcPanID = 0; - byte[] sourceAddress = null; - byte[] destAddress = null; - - pos += 3; - - if (destAddrMode > 0) { - destPanID = (packet.data[pos] & 0xff) + ((packet.data[pos + 1] & 0xff) << 8); - pos += 2; - if (destAddrMode == SHORT_ADDRESS) { - destAddress = new byte[2]; - destAddress[1] = packet.data[pos]; - destAddress[0] = packet.data[pos + 1]; - pos += 2; - } else if (destAddrMode == LONG_ADDRESS) { - destAddress = new byte[8]; - for (int i = 0; i < 8; i++) { - destAddress[i] = packet.data[pos + 7 - i]; - } - pos += 8; - } - } - - if (srcAddrMode > 0) { - if (panCompression == 0){ - srcPanID = (packet.data[pos] & 0xff) + ((packet.data[pos + 1] & 0xff) << 8); - pos += 2; - } else { - srcPanID = destPanID; - } - if (srcAddrMode == SHORT_ADDRESS) { - sourceAddress = new byte[2]; - sourceAddress[1] = packet.data[pos]; - sourceAddress[0] = packet.data[pos + 1]; - pos += 2; - } else if (srcAddrMode == LONG_ADDRESS) { - sourceAddress = new byte[8]; - for (int i = 0; i < 8; i++) { - sourceAddress[i] = packet.data[pos + 7 - i]; - } - pos += 8; - } - } - -// int payloadLen = packet.data.length - pos; - - brief.append("15.4 "); - brief.append(type < typeS.length ? typeS[type] : "?").append(' '); - - verbose.append("IEEE 802.15.4 ") - .append(type < typeVerbose.length ? typeVerbose[type] : "?") - .append(' ').append(seqNumber); - if (type != ACKFRAME) { - printAddress(brief, srcAddrMode, sourceAddress); - brief.append(' '); - printAddress(brief, destAddrMode, destAddress); - - verbose.append("
From "); - if (srcPanID != 0) { - verbose.append(StringUtils.toHex((byte)(srcPanID >> 8))) - .append(StringUtils.toHex((byte)(srcPanID & 0xff))) - .append('/'); - } - printAddress(verbose, srcAddrMode, sourceAddress); - verbose.append(" to "); - if (destPanID != 0) { - verbose.append(StringUtils.toHex((byte)(destPanID >> 8))) - .append(StringUtils.toHex((byte)(destPanID & 0xff))) - .append('/'); - } - printAddress(verbose, destAddrMode, destAddress); - } else { - /* got ack - no more to do ... */ - return ANALYSIS_OK_FINAL; - } - - /* update packet */ - packet.pos = pos; - packet.level = NETWORK_LEVEL; - /* remove CRC from the packet */ - packet.consumeBytesEnd(2); - - packet.llsender = sourceAddress; - packet.llreceiver = destAddress; - return ANALYSIS_OK_CONTINUE; - } - - private void printAddress(StringBuffer sb, int type, byte[] addr) { - if (type == SHORT_ADDRESS) { - sb.append(StringUtils.toHex(addr)); - } else if (type == LONG_ADDRESS) { - sb.append(StringUtils.toHex(addr[0]) + StringUtils.toHex(addr[1]) + ":" + - StringUtils.toHex(addr[2]) + StringUtils.toHex(addr[3]) + ":" + - StringUtils.toHex(addr[4]) + StringUtils.toHex(addr[5]) + ":" + - StringUtils.toHex(addr[6]) + StringUtils.toHex(addr[7])); - } - } -} +package se.sics.cooja.plugins.analyzers; + +import java.io.IOException; + +import se.sics.cooja.util.StringUtils; + +public class IEEE802154Analyzer extends PacketAnalyzer { + + /* TODO: fix this to be correct */ + public static final int NO_ADDRESS = 0; + public static final int RSV_ADDRESS = 1; + public static final int SHORT_ADDRESS = 2; + public static final int LONG_ADDRESS = 3; + + public static final int BEACONFRAME = 0x00; + public static final int DATAFRAME = 0x01; + public static final int ACKFRAME = 0x02; + public static final int CMDFRAME = 0x03; + +// private static final byte[] BROADCAST_ADDR = {(byte)0xff, (byte)0xff}; + + private static final String[] typeS = {"-", "D", "A"}; + private static final String[] typeVerbose = {"BEACON", "DATA", "ACK"}; + private PcapExporter pcapExporter; + +// private int defaultAddressMode = LONG_ADDRESS; +// private byte seqNo = 0; + +// private int myPanID = 0xabcd; + + public IEEE802154Analyzer(boolean pcap) { + if (pcap) try { + pcapExporter = new PcapExporter(); + } catch (IOException e) { + e.printStackTrace(); + } + } + + public boolean matchPacket(Packet packet) { + return packet.level == MAC_LEVEL; + } + + /* this protocol always have network level packets as payload */ + public int nextLevel(byte[] packet, int level) { + return NETWORK_LEVEL; + } + /* create a 802.15.4 packet of the bytes and "dispatch" to the + * next handler + */ + public int analyzePacket(Packet packet, StringBuffer brief, StringBuffer verbose) { + + if (pcapExporter != null) { + try { + pcapExporter.exportPacketData(packet.getPayload()); + } catch (IOException e) { + System.err.println("Could not export PCap data"); + e.printStackTrace(); + } + } + + int pos = packet.pos; + int type = packet.data[pos + 0] & 7; +// int security = (packet.data[pos + 0] >> 3) & 1; +// int pending = (packet.data[pos + 0] >> 4) & 1; +// int ackRequired = (packet.data[pos + 0] >> 5) & 1; + int panCompression = (packet.data[pos + 0]>> 6) & 1; + int destAddrMode = (packet.data[pos + 1] >> 2) & 3; +// int frameVersion = (packet.data[pos + 1] >> 4) & 3; + int srcAddrMode = (packet.data[pos + 1] >> 6) & 3; + int seqNumber = packet.data[pos + 2] & 0xff; + int destPanID = 0; + int srcPanID = 0; + byte[] sourceAddress = null; + byte[] destAddress = null; + + pos += 3; + + if (destAddrMode > 0) { + destPanID = (packet.data[pos] & 0xff) + ((packet.data[pos + 1] & 0xff) << 8); + pos += 2; + if (destAddrMode == SHORT_ADDRESS) { + destAddress = new byte[2]; + destAddress[1] = packet.data[pos]; + destAddress[0] = packet.data[pos + 1]; + pos += 2; + } else if (destAddrMode == LONG_ADDRESS) { + destAddress = new byte[8]; + for (int i = 0; i < 8; i++) { + destAddress[i] = packet.data[pos + 7 - i]; + } + pos += 8; + } + } + + if (srcAddrMode > 0) { + if (panCompression == 0){ + srcPanID = (packet.data[pos] & 0xff) + ((packet.data[pos + 1] & 0xff) << 8); + pos += 2; + } else { + srcPanID = destPanID; + } + if (srcAddrMode == SHORT_ADDRESS) { + sourceAddress = new byte[2]; + sourceAddress[1] = packet.data[pos]; + sourceAddress[0] = packet.data[pos + 1]; + pos += 2; + } else if (srcAddrMode == LONG_ADDRESS) { + sourceAddress = new byte[8]; + for (int i = 0; i < 8; i++) { + sourceAddress[i] = packet.data[pos + 7 - i]; + } + pos += 8; + } + } + +// int payloadLen = packet.data.length - pos; + + brief.append("15.4 "); + brief.append(type < typeS.length ? typeS[type] : "?").append(' '); + + verbose.append("IEEE 802.15.4 ") + .append(type < typeVerbose.length ? typeVerbose[type] : "?") + .append(' ').append(seqNumber); + if (type != ACKFRAME) { + printAddress(brief, srcAddrMode, sourceAddress); + brief.append(' '); + printAddress(brief, destAddrMode, destAddress); + + verbose.append("
From "); + if (srcPanID != 0) { + verbose.append(StringUtils.toHex((byte)(srcPanID >> 8))) + .append(StringUtils.toHex((byte)(srcPanID & 0xff))) + .append('/'); + } + printAddress(verbose, srcAddrMode, sourceAddress); + verbose.append(" to "); + if (destPanID != 0) { + verbose.append(StringUtils.toHex((byte)(destPanID >> 8))) + .append(StringUtils.toHex((byte)(destPanID & 0xff))) + .append('/'); + } + printAddress(verbose, destAddrMode, destAddress); + } else { + /* got ack - no more to do ... */ + return ANALYSIS_OK_FINAL; + } + + /* update packet */ + packet.pos = pos; + packet.level = NETWORK_LEVEL; + /* remove CRC from the packet */ + packet.consumeBytesEnd(2); + + packet.llsender = sourceAddress; + packet.llreceiver = destAddress; + return ANALYSIS_OK_CONTINUE; + } + + private void printAddress(StringBuffer sb, int type, byte[] addr) { + if (type == SHORT_ADDRESS) { + sb.append(StringUtils.toHex(addr)); + } else if (type == LONG_ADDRESS) { + sb.append(StringUtils.toHex(addr[0]) + StringUtils.toHex(addr[1]) + ":" + + StringUtils.toHex(addr[2]) + StringUtils.toHex(addr[3]) + ":" + + StringUtils.toHex(addr[4]) + StringUtils.toHex(addr[5]) + ":" + + StringUtils.toHex(addr[6]) + StringUtils.toHex(addr[7])); + } + } +} diff --git a/tools/cooja/java/se/sics/cooja/plugins/analyzers/PacketAnalyzer.java b/tools/cooja/java/se/sics/cooja/plugins/analyzers/PacketAnalyzer.java index c309c6106..4e440e5dd 100644 --- a/tools/cooja/java/se/sics/cooja/plugins/analyzers/PacketAnalyzer.java +++ b/tools/cooja/java/se/sics/cooja/plugins/analyzers/PacketAnalyzer.java @@ -1,88 +1,88 @@ -package se.sics.cooja.plugins.analyzers; - -public abstract class PacketAnalyzer { - - public static final int ANALYSIS_FAILED = -1; - public static final int ANALYSIS_OK_CONTINUE = 1; - public static final int ANALYSIS_OK_FINAL = 2; - - public static final int RADIO_LEVEL = 0; - public static final int MAC_LEVEL = 1; - public static final int NETWORK_LEVEL = 2; - - public static class Packet { - byte[] data; - int pos; - int level; - /* size = length - consumed bytes at tail */ - int size; - - /* L2 addresseses */ - byte[] llsender; - byte[] llreceiver; - - byte lastDispatch = 0; - - public Packet(byte[] data, int level) { - this.level = level; - this.data = data; - this.size = data.length; - } - - - public void consumeBytesStart(int bytes) { - pos += bytes; - } - - public void consumeBytesEnd(int bytes) { - size -= bytes; - } - - - public boolean hasMoreData() { - return size > pos; - } - - public int size() { - return size - pos; - } - - public byte get(int index) { - if (index >= size) return 0; - return data[pos + index]; - } - - public int getInt(int index, int size) { - int value = 0; - for (int i = 0; i < size; i++) { - value = (value << 8) + get(index + i); - } - return value; - } - - - public byte[] getPayload() { - byte[] pload = new byte[size - pos]; - System.arraycopy(data, pos, pload, 0, pload.length); - return pload; - } - - public void copy(int srcpos, byte[] arr, int pos, int len) { - for (int i = 0; i < len; i++) { - arr[pos + i] = get(srcpos + i); - } - } - - public byte[] getLLSender() { - return llsender; - } - - public byte[] getLLReceiver() { - return llreceiver; - } - }; - - public abstract boolean matchPacket(Packet packet); - - public abstract int analyzePacket(Packet packet, StringBuffer brief, StringBuffer verbose); +package se.sics.cooja.plugins.analyzers; + +public abstract class PacketAnalyzer { + + public static final int ANALYSIS_FAILED = -1; + public static final int ANALYSIS_OK_CONTINUE = 1; + public static final int ANALYSIS_OK_FINAL = 2; + + public static final int RADIO_LEVEL = 0; + public static final int MAC_LEVEL = 1; + public static final int NETWORK_LEVEL = 2; + + public static class Packet { + byte[] data; + int pos; + int level; + /* size = length - consumed bytes at tail */ + int size; + + /* L2 addresseses */ + byte[] llsender; + byte[] llreceiver; + + byte lastDispatch = 0; + + public Packet(byte[] data, int level) { + this.level = level; + this.data = data; + this.size = data.length; + } + + + public void consumeBytesStart(int bytes) { + pos += bytes; + } + + public void consumeBytesEnd(int bytes) { + size -= bytes; + } + + + public boolean hasMoreData() { + return size > pos; + } + + public int size() { + return size - pos; + } + + public byte get(int index) { + if (index >= size) return 0; + return data[pos + index]; + } + + public int getInt(int index, int size) { + int value = 0; + for (int i = 0; i < size; i++) { + value = (value << 8) + get(index + i); + } + return value; + } + + + public byte[] getPayload() { + byte[] pload = new byte[size - pos]; + System.arraycopy(data, pos, pload, 0, pload.length); + return pload; + } + + public void copy(int srcpos, byte[] arr, int pos, int len) { + for (int i = 0; i < len; i++) { + arr[pos + i] = get(srcpos + i); + } + } + + public byte[] getLLSender() { + return llsender; + } + + public byte[] getLLReceiver() { + return llreceiver; + } + }; + + public abstract boolean matchPacket(Packet packet); + + public abstract int analyzePacket(Packet packet, StringBuffer brief, StringBuffer verbose); } \ No newline at end of file diff --git a/tools/cooja/java/se/sics/cooja/plugins/analyzers/PcapExporter.java b/tools/cooja/java/se/sics/cooja/plugins/analyzers/PcapExporter.java old mode 100755 new mode 100644 index ef2623264..43883378f --- a/tools/cooja/java/se/sics/cooja/plugins/analyzers/PcapExporter.java +++ b/tools/cooja/java/se/sics/cooja/plugins/analyzers/PcapExporter.java @@ -1,58 +1,58 @@ -package se.sics.cooja.plugins.analyzers; - -import java.io.DataOutputStream; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.FileWriter; -import java.io.IOException; - -public class PcapExporter { - - private static final byte[] ETH_DATA = {(byte)0xaf, (byte)0xab, (byte)0xac, (byte)0xad, - (byte)0xae, (byte)0xaf, 0x42, (byte)0xfb, (byte)0x9f, (byte)0x81, 0x5a, - (byte)0x81, (byte)0x80, (byte)0x9a}; - - DataOutputStream out; - - public PcapExporter() throws IOException { - } - - public void openPcap() throws IOException { - out = new DataOutputStream(new FileOutputStream("radiolog-" + System.currentTimeMillis() + ".pcap")); - /* pcap header */ - out.writeInt(0xa1b2c3d4); - out.writeShort(0x0002); - out.writeShort(0x0004); - out.writeInt(0); - out.writeInt(0); - out.writeInt(4096); - out.writeInt(1); /* 1 for ethernet ? */ - out.flush(); - System.out.println("Opened pcap file!"); - } - public void closePcap() throws IOException { - out.close(); - } - - public void exportPacketData(byte[] data) throws IOException { - if (out == null) { - openPcap(); - } - try { - /* pcap packet header */ - out.writeInt((int) System.currentTimeMillis() / 1000); - out.writeInt((int) ((System.currentTimeMillis() % 1000) * 1000)); - out.writeInt(data.length + 14); - out.writeInt(data.length + 14); - out.write(ETH_DATA); - /* and the data */ - out.write(data); - out.flush(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - - -} +package se.sics.cooja.plugins.analyzers; + +import java.io.DataOutputStream; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.FileWriter; +import java.io.IOException; + +public class PcapExporter { + + private static final byte[] ETH_DATA = {(byte)0xaf, (byte)0xab, (byte)0xac, (byte)0xad, + (byte)0xae, (byte)0xaf, 0x42, (byte)0xfb, (byte)0x9f, (byte)0x81, 0x5a, + (byte)0x81, (byte)0x80, (byte)0x9a}; + + DataOutputStream out; + + public PcapExporter() throws IOException { + } + + public void openPcap() throws IOException { + out = new DataOutputStream(new FileOutputStream("radiolog-" + System.currentTimeMillis() + ".pcap")); + /* pcap header */ + out.writeInt(0xa1b2c3d4); + out.writeShort(0x0002); + out.writeShort(0x0004); + out.writeInt(0); + out.writeInt(0); + out.writeInt(4096); + out.writeInt(1); /* 1 for ethernet ? */ + out.flush(); + System.out.println("Opened pcap file!"); + } + public void closePcap() throws IOException { + out.close(); + } + + public void exportPacketData(byte[] data) throws IOException { + if (out == null) { + openPcap(); + } + try { + /* pcap packet header */ + out.writeInt((int) System.currentTimeMillis() / 1000); + out.writeInt((int) ((System.currentTimeMillis() % 1000) * 1000)); + out.writeInt(data.length + 14); + out.writeInt(data.length + 14); + out.write(ETH_DATA); + /* and the data */ + out.write(data); + out.flush(); + } catch (Exception e) { + e.printStackTrace(); + } + } + + + +}