fixed line endings
This commit is contained in:
parent
3bf99ca040
commit
9e14d09bb0
29 changed files with 2128 additions and 2128 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<html>
|
||||
<head> <title> The COOJA Simulator (applet) </title> </head>
|
||||
<body>
|
||||
|
||||
<applet code="se/sics/cooja/CoojaApplet.class"
|
||||
archive="../lib/jdom.jar, ../lib/log4j.jar, ../apps/mrm/lib/mrm.jar, ../apps/mspsim/lib/mspsim.jar, ../apps/mspsim/lib/cooja_mspsim.jar"
|
||||
width="600" height="400">
|
||||
</applet>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
<html>
|
||||
<head> <title> The COOJA Simulator (applet) </title> </head>
|
||||
<body>
|
||||
|
||||
<applet code="se/sics/cooja/CoojaApplet.class"
|
||||
archive="../lib/jdom.jar, ../lib/log4j.jar, ../apps/mrm/lib/mrm.jar, ../apps/mspsim/lib/mspsim.jar, ../apps/mspsim/lib/cooja_mspsim.jar"
|
||||
width="600" height="400">
|
||||
</applet>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
grant {
|
||||
permission java.security.AllPermission;
|
||||
};
|
||||
grant {
|
||||
permission java.security.AllPermission;
|
||||
};
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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$
|
||||
|
|
|
@ -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]+)$
|
||||
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
|
||||
|
||||
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
|
||||
|
||||
<appender name="logfile" class="org.apache.log4j.FileAppender">
|
||||
<param name="File" value="COOJA.log"/>
|
||||
<param name="Append" value="false"/>
|
||||
<layout class="org.apache.log4j.PatternLayout">
|
||||
<param name="ConversionPattern" value="[%d{HH:mm:ss} - %t] [%F:%L] [%p] - %m%n"/>
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<appender name="stdout" class="org.apache.log4j.ConsoleAppender">
|
||||
<layout class="org.apache.log4j.PatternLayout">
|
||||
<param name="ConversionPattern" value="%5p [%t] (%F:%L) - %m%n"/>
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<root>
|
||||
<priority value="debug"/>
|
||||
<appender-ref ref="logfile"/>
|
||||
<appender-ref ref="stdout"/>
|
||||
</root>
|
||||
</log4j:configuration>
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
|
||||
|
||||
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
|
||||
|
||||
<appender name="logfile" class="org.apache.log4j.FileAppender">
|
||||
<param name="File" value="COOJA.log"/>
|
||||
<param name="Append" value="false"/>
|
||||
<layout class="org.apache.log4j.PatternLayout">
|
||||
<param name="ConversionPattern" value="[%d{HH:mm:ss} - %t] [%F:%L] [%p] - %m%n"/>
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<appender name="stdout" class="org.apache.log4j.ConsoleAppender">
|
||||
<layout class="org.apache.log4j.PatternLayout">
|
||||
<param name="ConversionPattern" value="%5p [%t] (%F:%L) - %m%n"/>
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<root>
|
||||
<priority value="debug"/>
|
||||
<appender-ref ref="logfile"/>
|
||||
<appender-ref ref="stdout"/>
|
||||
</root>
|
||||
</log4j:configuration>
|
||||
|
|
|
@ -1,78 +1,78 @@
|
|||
se.sics.cooja.plugins.Visualizer = \
|
||||
<b>Visualizer</b> \
|
||||
<p>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. \
|
||||
<p>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. \
|
||||
<p><b>Useful skins</b> \
|
||||
<br>Mote IDs: prints the unique mote IDs inside motes. \
|
||||
<br>Log output: prints the last printf message above motes. \
|
||||
<br>Radio traffic: displays inter-mote radio communication. \
|
||||
<br>Radio environment (UDGM): enables configurating the UDGM radio medium. \
|
||||
<p><b>Tip</b><br> \
|
||||
Right-click visualizer to show the popup menu, and click "Hide window decorations".
|
||||
|
||||
se.sics.cooja.plugins.LogListener = \
|
||||
<b>Log Listener</b>\
|
||||
<p>Listens to log output from all simulated motes. \
|
||||
Right-click the main area for a popup menu with more options. \
|
||||
<p>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.\
|
||||
<p><b>Filter examples:</b> \
|
||||
<br><br>Hello<br><i>logs containing the string 'Hello'</i>\
|
||||
<br><br>^Contiki<br><i>logs starting with 'Contiki'</i>\
|
||||
<br><br>^[CR]<br><i>logs starting either a C or an R</i>\
|
||||
<br><br>Hello$<br><i>logs ending with 'Hello'</i>\
|
||||
<br><br>^ID:[2-5]$<br><i>logs from motes 2 to 5</i>\
|
||||
<br><br>^ID:[2-5] Contiki<br><i>logs from motes 2 to 5 starting with 'Contiki'</i>
|
||||
|
||||
se.sics.cooja.plugins.TimeLine = \
|
||||
<b>Timeline</b>\
|
||||
<p>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.\
|
||||
<p>Events appear as colored rectangles in the timeline. For more information about a particular event, hover the mouse above it.\
|
||||
<p>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. \
|
||||
<p>All simulated motes are by default added to the timeline, however, any unwanted motes can be removed by mouse clicking the node ID (left).\
|
||||
<p>To display a vertical time marker on the timeline, press and hold the mouse on the time ruler (top).\
|
||||
<p>For more options, such as zooming and saving raw data to file, right-click the mouse for a popup menu.\
|
||||
<p><b>Radio RX/TX</b>\
|
||||
<br>Shows radio connection events. Transmissions are painted blue, receptions are green, and interfered radios are red.\
|
||||
<p><b>Radio ON/OFF</b>\
|
||||
<br>Shows whether the mote radio is on or off. Turned on radios are indicated with gray color.\
|
||||
<p><b>LEDs</b>\
|
||||
<br>Shows LED state: red, green, and blue. (Assumes all mote types have exactly three LEDs.)\
|
||||
<p><b>Watchpoints</b>\
|
||||
<br>Shows triggered watchpoints, currently only supported by MSPSim-based motes. To add watchpoints, use the Msp Code Watcher plugin.
|
||||
|
||||
se.sics.cooja.plugins.SimControl = \
|
||||
<b>Control Panel</b>\
|
||||
<p>Use the control panel to start and stop the current simulation. \
|
||||
<p>Note that toggling simulation execution is also possible by the keyboard shortcut <i>Ctrl+S</i>. \
|
||||
<p><i>Step millisecond</i> executes all events within the next simulated millisecond. \
|
||||
<p>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. \
|
||||
<p>By setting the slider to <i>Real time</i>, the execution speed is limited to at maximum real time. \
|
||||
The <i>Real time</i> slider value is to the right of <i>No simulation delay</i>: select the slider button and use to keyboard to navigate here. \
|
||||
<p><i>Run until</i> can be used to configure a time (in milliseconds) where the simulation will automatically pause.
|
||||
|
||||
se.sics.cooja.mspmote.plugins.MspCLI = \
|
||||
<b>MSPSim's Command Line Interface</b>\
|
||||
<br><br>help<br><i>lists available commands</i>\
|
||||
<br><br>info CC2420<br><i>shows radio chip details</i>\
|
||||
<br><br>log CC2420 > mylog.txt<br><i>logs radio chip details to file</i>\
|
||||
<br><br>stacktrace<br><i>shows current stacktrace</i>
|
||||
|
||||
KEYBOARD_SHORTCUTS = \
|
||||
<b>Keyboard shortcuts</b><br>\
|
||||
<br><i>Ctrl+N:</i> New simulation\
|
||||
<br><i>Ctrl+S:</i> Start/pause simulation\
|
||||
<br><i>Ctrl+R:</i> Reload current simulation. If no simulation exists, the last used simulation config is loaded\
|
||||
<br><i>Ctrl+Shift+R:</i> Reload current simulation with another random seed\
|
||||
<br><i>Ctrl+X:</i> Quit COOJA\
|
||||
<br>\
|
||||
<br><i>F1:</i> Toggle quick help
|
||||
|
||||
se.sics.cooja.plugins.Visualizer = \
|
||||
<b>Visualizer</b> \
|
||||
<p>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. \
|
||||
<p>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. \
|
||||
<p><b>Useful skins</b> \
|
||||
<br>Mote IDs: prints the unique mote IDs inside motes. \
|
||||
<br>Log output: prints the last printf message above motes. \
|
||||
<br>Radio traffic: displays inter-mote radio communication. \
|
||||
<br>Radio environment (UDGM): enables configurating the UDGM radio medium. \
|
||||
<p><b>Tip</b><br> \
|
||||
Right-click visualizer to show the popup menu, and click "Hide window decorations".
|
||||
|
||||
se.sics.cooja.plugins.LogListener = \
|
||||
<b>Log Listener</b>\
|
||||
<p>Listens to log output from all simulated motes. \
|
||||
Right-click the main area for a popup menu with more options. \
|
||||
<p>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.\
|
||||
<p><b>Filter examples:</b> \
|
||||
<br><br>Hello<br><i>logs containing the string 'Hello'</i>\
|
||||
<br><br>^Contiki<br><i>logs starting with 'Contiki'</i>\
|
||||
<br><br>^[CR]<br><i>logs starting either a C or an R</i>\
|
||||
<br><br>Hello$<br><i>logs ending with 'Hello'</i>\
|
||||
<br><br>^ID:[2-5]$<br><i>logs from motes 2 to 5</i>\
|
||||
<br><br>^ID:[2-5] Contiki<br><i>logs from motes 2 to 5 starting with 'Contiki'</i>
|
||||
|
||||
se.sics.cooja.plugins.TimeLine = \
|
||||
<b>Timeline</b>\
|
||||
<p>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.\
|
||||
<p>Events appear as colored rectangles in the timeline. For more information about a particular event, hover the mouse above it.\
|
||||
<p>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. \
|
||||
<p>All simulated motes are by default added to the timeline, however, any unwanted motes can be removed by mouse clicking the node ID (left).\
|
||||
<p>To display a vertical time marker on the timeline, press and hold the mouse on the time ruler (top).\
|
||||
<p>For more options, such as zooming and saving raw data to file, right-click the mouse for a popup menu.\
|
||||
<p><b>Radio RX/TX</b>\
|
||||
<br>Shows radio connection events. Transmissions are painted blue, receptions are green, and interfered radios are red.\
|
||||
<p><b>Radio ON/OFF</b>\
|
||||
<br>Shows whether the mote radio is on or off. Turned on radios are indicated with gray color.\
|
||||
<p><b>LEDs</b>\
|
||||
<br>Shows LED state: red, green, and blue. (Assumes all mote types have exactly three LEDs.)\
|
||||
<p><b>Watchpoints</b>\
|
||||
<br>Shows triggered watchpoints, currently only supported by MSPSim-based motes. To add watchpoints, use the Msp Code Watcher plugin.
|
||||
|
||||
se.sics.cooja.plugins.SimControl = \
|
||||
<b>Control Panel</b>\
|
||||
<p>Use the control panel to start and stop the current simulation. \
|
||||
<p>Note that toggling simulation execution is also possible by the keyboard shortcut <i>Ctrl+S</i>. \
|
||||
<p><i>Step millisecond</i> executes all events within the next simulated millisecond. \
|
||||
<p>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. \
|
||||
<p>By setting the slider to <i>Real time</i>, the execution speed is limited to at maximum real time. \
|
||||
The <i>Real time</i> slider value is to the right of <i>No simulation delay</i>: select the slider button and use to keyboard to navigate here. \
|
||||
<p><i>Run until</i> can be used to configure a time (in milliseconds) where the simulation will automatically pause.
|
||||
|
||||
se.sics.cooja.mspmote.plugins.MspCLI = \
|
||||
<b>MSPSim's Command Line Interface</b>\
|
||||
<br><br>help<br><i>lists available commands</i>\
|
||||
<br><br>info CC2420<br><i>shows radio chip details</i>\
|
||||
<br><br>log CC2420 > mylog.txt<br><i>logs radio chip details to file</i>\
|
||||
<br><br>stacktrace<br><i>shows current stacktrace</i>
|
||||
|
||||
KEYBOARD_SHORTCUTS = \
|
||||
<b>Keyboard shortcuts</b><br>\
|
||||
<br><i>Ctrl+N:</i> New simulation\
|
||||
<br><i>Ctrl+S:</i> Start/pause simulation\
|
||||
<br><i>Ctrl+R:</i> Reload current simulation. If no simulation exists, the last used simulation config is loaded\
|
||||
<br><i>Ctrl+Shift+R:</i> Reload current simulation with another random seed\
|
||||
<br><i>Ctrl+X:</i> Quit COOJA\
|
||||
<br>\
|
||||
<br><i>F1:</i> Toggle quick help
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
}
|
|
@ -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 <jni.h>
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
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 <jni.h>
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
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));
|
||||
}
|
||||
|
|
|
@ -1,125 +1,125 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<simconf>
|
||||
<project>[CONTIKI_DIR]/tools/cooja/apps/mrm</project>
|
||||
<project>[CONTIKI_DIR]/tools/cooja/apps/mspsim</project>
|
||||
<project>[CONTIKI_DIR]/tools/cooja/apps/avrora</project>
|
||||
<simulation>
|
||||
<title>My simulation</title>
|
||||
<delaytime>0</delaytime>
|
||||
<randomseed>generated</randomseed>
|
||||
<motedelay_us>1000000</motedelay_us>
|
||||
<radiomedium>
|
||||
se.sics.cooja.radiomediums.UDGM
|
||||
<transmitting_range>50.0</transmitting_range>
|
||||
<interference_range>100.0</interference_range>
|
||||
<success_ratio_tx>1.0</success_ratio_tx>
|
||||
<success_ratio_rx>1.0</success_ratio_rx>
|
||||
</radiomedium>
|
||||
<events>
|
||||
<logoutput>40000</logoutput>
|
||||
</events>
|
||||
<motetype>
|
||||
se.sics.cooja.mspmote.ESBMoteType
|
||||
<identifier>esb1</identifier>
|
||||
<description>ESB Mote Type #esb1</description>
|
||||
<source>[CONTIKI_DIR]/examples/hello-world/hello-world.c</source>
|
||||
<commands>make clean TARGET=esb
|
||||
make hello-world.esb TARGET=esb</commands>
|
||||
<firmware>[CONTIKI_DIR]/examples/hello-world/hello-world.esb</firmware>
|
||||
<moteinterface>se.sics.cooja.interfaces.Position</moteinterface>
|
||||
<moteinterface>se.sics.cooja.interfaces.RimeAddress</moteinterface>
|
||||
<moteinterface>se.sics.cooja.interfaces.IPAddress</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspSerial</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspClock</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.ESBLED</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.ESBButton</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspMoteID</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.TR1001Radio</moteinterface>
|
||||
<moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
||||
</motetype>
|
||||
<mote>
|
||||
se.sics.cooja.mspmote.ESBMote
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
se.sics.cooja.interfaces.Position
|
||||
<x>57.296459690977144</x>
|
||||
<y>73.20759478605089</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
se.sics.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>1</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>esb1</motetype_identifier>
|
||||
</mote>
|
||||
</simulation>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.SimControl
|
||||
<width>259</width>
|
||||
<z>6</z>
|
||||
<height>184</height>
|
||||
<location_x>60</location_x>
|
||||
<location_y>60</location_y>
|
||||
<minimized>false</minimized>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.Visualizer
|
||||
<plugin_config>
|
||||
<skin>se.sics.cooja.plugins.skins.IDVisualizerSkin</skin>
|
||||
<skin>se.sics.cooja.plugins.skins.LogVisualizerSkin</skin>
|
||||
<viewport>0.9090909090909091 0.0 0.0 0.9090909090909091 91.91230937183896 53.4476411035901</viewport>
|
||||
</plugin_config>
|
||||
<width>300</width>
|
||||
<z>3</z>
|
||||
<height>300</height>
|
||||
<location_x>945</location_x>
|
||||
<location_y>0</location_y>
|
||||
<minimized>false</minimized>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.LogListener
|
||||
<plugin_config>
|
||||
<filter />
|
||||
</plugin_config>
|
||||
<width>1245</width>
|
||||
<z>5</z>
|
||||
<height>150</height>
|
||||
<location_x>0</location_x>
|
||||
<location_y>530</location_y>
|
||||
<minimized>false</minimized>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.TimeLine
|
||||
<plugin_config>
|
||||
<mote>0</mote>
|
||||
<showRadioRXTX />
|
||||
<showRadioHW />
|
||||
<showLEDs />
|
||||
<split>109</split>
|
||||
<zoom>9</zoom>
|
||||
</plugin_config>
|
||||
<width>1245</width>
|
||||
<z>1</z>
|
||||
<height>150</height>
|
||||
<location_x>0</location_x>
|
||||
<location_y>680</location_y>
|
||||
<minimized>false</minimized>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.ScriptRunner
|
||||
<plugin_config>
|
||||
<script>TIMEOUT(5000, log.log("last message: " + msg + "\n"));
|
||||
|
||||
WAIT_UNTIL(msg.equals('Hello, world'));
|
||||
log.testOK();</script>
|
||||
<active>true</active>
|
||||
</plugin_config>
|
||||
<width>600</width>
|
||||
<z>0</z>
|
||||
<height>453</height>
|
||||
<location_x>337</location_x>
|
||||
<location_y>25</location_y>
|
||||
<minimized>false</minimized>
|
||||
</plugin>
|
||||
</simconf>
|
||||
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<simconf>
|
||||
<project>[CONTIKI_DIR]/tools/cooja/apps/mrm</project>
|
||||
<project>[CONTIKI_DIR]/tools/cooja/apps/mspsim</project>
|
||||
<project>[CONTIKI_DIR]/tools/cooja/apps/avrora</project>
|
||||
<simulation>
|
||||
<title>My simulation</title>
|
||||
<delaytime>0</delaytime>
|
||||
<randomseed>generated</randomseed>
|
||||
<motedelay_us>1000000</motedelay_us>
|
||||
<radiomedium>
|
||||
se.sics.cooja.radiomediums.UDGM
|
||||
<transmitting_range>50.0</transmitting_range>
|
||||
<interference_range>100.0</interference_range>
|
||||
<success_ratio_tx>1.0</success_ratio_tx>
|
||||
<success_ratio_rx>1.0</success_ratio_rx>
|
||||
</radiomedium>
|
||||
<events>
|
||||
<logoutput>40000</logoutput>
|
||||
</events>
|
||||
<motetype>
|
||||
se.sics.cooja.mspmote.ESBMoteType
|
||||
<identifier>esb1</identifier>
|
||||
<description>ESB Mote Type #esb1</description>
|
||||
<source>[CONTIKI_DIR]/examples/hello-world/hello-world.c</source>
|
||||
<commands>make clean TARGET=esb
|
||||
make hello-world.esb TARGET=esb</commands>
|
||||
<firmware>[CONTIKI_DIR]/examples/hello-world/hello-world.esb</firmware>
|
||||
<moteinterface>se.sics.cooja.interfaces.Position</moteinterface>
|
||||
<moteinterface>se.sics.cooja.interfaces.RimeAddress</moteinterface>
|
||||
<moteinterface>se.sics.cooja.interfaces.IPAddress</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspSerial</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspClock</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.ESBLED</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.ESBButton</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspMoteID</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.TR1001Radio</moteinterface>
|
||||
<moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
||||
</motetype>
|
||||
<mote>
|
||||
se.sics.cooja.mspmote.ESBMote
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
se.sics.cooja.interfaces.Position
|
||||
<x>57.296459690977144</x>
|
||||
<y>73.20759478605089</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
se.sics.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>1</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>esb1</motetype_identifier>
|
||||
</mote>
|
||||
</simulation>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.SimControl
|
||||
<width>259</width>
|
||||
<z>6</z>
|
||||
<height>184</height>
|
||||
<location_x>60</location_x>
|
||||
<location_y>60</location_y>
|
||||
<minimized>false</minimized>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.Visualizer
|
||||
<plugin_config>
|
||||
<skin>se.sics.cooja.plugins.skins.IDVisualizerSkin</skin>
|
||||
<skin>se.sics.cooja.plugins.skins.LogVisualizerSkin</skin>
|
||||
<viewport>0.9090909090909091 0.0 0.0 0.9090909090909091 91.91230937183896 53.4476411035901</viewport>
|
||||
</plugin_config>
|
||||
<width>300</width>
|
||||
<z>3</z>
|
||||
<height>300</height>
|
||||
<location_x>945</location_x>
|
||||
<location_y>0</location_y>
|
||||
<minimized>false</minimized>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.LogListener
|
||||
<plugin_config>
|
||||
<filter />
|
||||
</plugin_config>
|
||||
<width>1245</width>
|
||||
<z>5</z>
|
||||
<height>150</height>
|
||||
<location_x>0</location_x>
|
||||
<location_y>530</location_y>
|
||||
<minimized>false</minimized>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.TimeLine
|
||||
<plugin_config>
|
||||
<mote>0</mote>
|
||||
<showRadioRXTX />
|
||||
<showRadioHW />
|
||||
<showLEDs />
|
||||
<split>109</split>
|
||||
<zoom>9</zoom>
|
||||
</plugin_config>
|
||||
<width>1245</width>
|
||||
<z>1</z>
|
||||
<height>150</height>
|
||||
<location_x>0</location_x>
|
||||
<location_y>680</location_y>
|
||||
<minimized>false</minimized>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.ScriptRunner
|
||||
<plugin_config>
|
||||
<script>TIMEOUT(5000, log.log("last message: " + msg + "\n"));
|
||||
|
||||
WAIT_UNTIL(msg.equals('Hello, world'));
|
||||
log.testOK();</script>
|
||||
<active>true</active>
|
||||
</plugin_config>
|
||||
<width>600</width>
|
||||
<z>0</z>
|
||||
<height>453</height>
|
||||
<location_x>337</location_x>
|
||||
<location_y>25</location_y>
|
||||
<minimized>false</minimized>
|
||||
</plugin>
|
||||
</simconf>
|
||||
|
||||
|
|
|
@ -1,316 +1,316 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<simconf>
|
||||
<project EXPORT="discard">[CONTIKI_DIR]/tools/cooja/apps/mrm</project>
|
||||
<project EXPORT="discard">[CONTIKI_DIR]/tools/cooja/apps/mspsim</project>
|
||||
<project EXPORT="discard">[CONTIKI_DIR]/tools/cooja/apps/avrora</project>
|
||||
<project EXPORT="discard">[CONTIKI_DIR]/tools/cooja/apps/native_gateway</project>
|
||||
<project EXPORT="discard">[CONTIKI_DIR]/tools/cooja/apps/serial_socket</project>
|
||||
<project EXPORT="discard">/home/user/contikiprojects/sics.se/mobility</project>
|
||||
<simulation>
|
||||
<title>Servreg hack test</title>
|
||||
<delaytime>0</delaytime>
|
||||
<randomseed>123456</randomseed>
|
||||
<motedelay_us>1000000</motedelay_us>
|
||||
<radiomedium>
|
||||
se.sics.cooja.radiomediums.UDGM
|
||||
<transmitting_range>40.0</transmitting_range>
|
||||
<interference_range>40.0</interference_range>
|
||||
<success_ratio_tx>1.0</success_ratio_tx>
|
||||
<success_ratio_rx>1.0</success_ratio_rx>
|
||||
</radiomedium>
|
||||
<events>
|
||||
<logoutput>40000</logoutput>
|
||||
</events>
|
||||
<motetype>
|
||||
se.sics.cooja.mspmote.SkyMoteType
|
||||
<identifier>sky1</identifier>
|
||||
<description>Servreg server</description>
|
||||
<source EXPORT="discard">[CONTIKI_DIR]/examples/servreg-hack/example-servreg-server.c</source>
|
||||
<commands EXPORT="discard">make example-servreg-server.sky TARGET=sky</commands>
|
||||
<firmware EXPORT="copy">[CONTIKI_DIR]/examples/servreg-hack/example-servreg-server.sky</firmware>
|
||||
<moteinterface>se.sics.cooja.interfaces.Position</moteinterface>
|
||||
<moteinterface>se.sics.cooja.interfaces.RimeAddress</moteinterface>
|
||||
<moteinterface>se.sics.cooja.interfaces.IPAddress</moteinterface>
|
||||
<moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
||||
<moteinterface>se.sics.cooja.interfaces.MoteAttributes</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspClock</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspMoteID</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyButton</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyFlash</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyCoffeeFilesystem</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyByteRadio</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspSerial</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyLED</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspDebugOutput</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyTemperature</moteinterface>
|
||||
</motetype>
|
||||
<motetype>
|
||||
se.sics.cooja.mspmote.SkyMoteType
|
||||
<identifier>sky2</identifier>
|
||||
<description>Servreg hack client</description>
|
||||
<source EXPORT="discard">[CONTIKI_DIR]/examples/servreg-hack/example-servreg-client.c</source>
|
||||
<commands EXPORT="discard">make example-servreg-client.sky TARGET=sky</commands>
|
||||
<firmware EXPORT="copy">[CONTIKI_DIR]/examples/servreg-hack/example-servreg-client.sky</firmware>
|
||||
<moteinterface>se.sics.cooja.interfaces.Position</moteinterface>
|
||||
<moteinterface>se.sics.cooja.interfaces.RimeAddress</moteinterface>
|
||||
<moteinterface>se.sics.cooja.interfaces.IPAddress</moteinterface>
|
||||
<moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
||||
<moteinterface>se.sics.cooja.interfaces.MoteAttributes</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspClock</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspMoteID</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyButton</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyFlash</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyCoffeeFilesystem</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyByteRadio</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspSerial</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyLED</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspDebugOutput</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyTemperature</moteinterface>
|
||||
</motetype>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
se.sics.cooja.interfaces.Position
|
||||
<x>45.693987609497896</x>
|
||||
<y>26.353051242505675</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
se.sics.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>1</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky1</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
se.sics.cooja.interfaces.Position
|
||||
<x>18.451397050087735</x>
|
||||
<y>55.93074152489276</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
se.sics.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>2</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
se.sics.cooja.interfaces.Position
|
||||
<x>45.082598269523864</x>
|
||||
<y>52.7178388400784</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
se.sics.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>3</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
se.sics.cooja.interfaces.Position
|
||||
<x>11.116935333105516</x>
|
||||
<y>49.070534908051414</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
se.sics.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>4</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
se.sics.cooja.interfaces.Position
|
||||
<x>85.11866272622683</x>
|
||||
<y>30.030092430999066</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
se.sics.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>5</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
se.sics.cooja.interfaces.Position
|
||||
<x>30.71302161006234</x>
|
||||
<y>13.877842534368446</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
se.sics.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>6</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
se.sics.cooja.interfaces.Position
|
||||
<x>44.43705509785284</x>
|
||||
<y>69.81167027376168</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
se.sics.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>7</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
se.sics.cooja.interfaces.Position
|
||||
<x>64.10992023465046</x>
|
||||
<y>20.589540162635835</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
se.sics.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>8</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
se.sics.cooja.interfaces.Position
|
||||
<x>32.29787406276132</x>
|
||||
<y>18.754900913594753</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
se.sics.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>9</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
se.sics.cooja.interfaces.Position
|
||||
<x>25.28398611019028</x>
|
||||
<y>69.27186586570369</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
se.sics.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>10</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
se.sics.cooja.interfaces.Position
|
||||
<x>19.3359466030565</x>
|
||||
<y>17.321986704081503</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
se.sics.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>11</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
</simulation>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.SimControl
|
||||
<width>318</width>
|
||||
<z>1</z>
|
||||
<height>172</height>
|
||||
<location_x>0</location_x>
|
||||
<location_y>0</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.Visualizer
|
||||
<plugin_config>
|
||||
<skin>se.sics.cooja.plugins.skins.IDVisualizerSkin</skin>
|
||||
<skin>se.sics.cooja.plugins.skins.MoteTypeVisualizerSkin</skin>
|
||||
<skin>se.sics.cooja.plugins.skins.AttributeVisualizerSkin</skin>
|
||||
<skin>se.sics.cooja.plugins.skins.UDGMVisualizerSkin</skin>
|
||||
<skin>se.sics.cooja.plugins.skins.GridVisualizerSkin</skin>
|
||||
<viewport>3.56257040103728 0.0 0.0 3.56257040103728 -26.423046586149052 -28.07489060373735</viewport>
|
||||
</plugin_config>
|
||||
<width>300</width>
|
||||
<z>2</z>
|
||||
<height>300</height>
|
||||
<location_x>1140</location_x>
|
||||
<location_y>0</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.LogListener
|
||||
<plugin_config>
|
||||
<filter />
|
||||
</plugin_config>
|
||||
<width>1440</width>
|
||||
<z>3</z>
|
||||
<height>324</height>
|
||||
<location_x>2</location_x>
|
||||
<location_y>270</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.TimeLine
|
||||
<plugin_config>
|
||||
<mote>0</mote>
|
||||
<mote>1</mote>
|
||||
<mote>2</mote>
|
||||
<mote>3</mote>
|
||||
<mote>4</mote>
|
||||
<mote>5</mote>
|
||||
<mote>6</mote>
|
||||
<mote>7</mote>
|
||||
<mote>8</mote>
|
||||
<mote>9</mote>
|
||||
<mote>10</mote>
|
||||
<showRadioRXTX />
|
||||
<showRadioHW />
|
||||
<split>125</split>
|
||||
<zoomfactor>1633.2339825135305</zoomfactor>
|
||||
</plugin_config>
|
||||
<width>1440</width>
|
||||
<z>4</z>
|
||||
<height>238</height>
|
||||
<location_x>0</location_x>
|
||||
<location_y>595</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.ScriptRunner
|
||||
<plugin_config>
|
||||
<script>/*
|
||||
* 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(120000);
|
||||
|
||||
num = 0;
|
||||
|
||||
while(true) {
|
||||
YIELD();
|
||||
WAIT_UNTIL(msg.startsWith('Id'));
|
||||
num++;
|
||||
if(num == 9) {
|
||||
log.testOK();
|
||||
}
|
||||
}</script>
|
||||
<active>true</active>
|
||||
</plugin_config>
|
||||
<width>600</width>
|
||||
<z>0</z>
|
||||
<height>700</height>
|
||||
<location_x>526</location_x>
|
||||
<location_y>6</location_y>
|
||||
</plugin>
|
||||
</simconf>
|
||||
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<simconf>
|
||||
<project EXPORT="discard">[CONTIKI_DIR]/tools/cooja/apps/mrm</project>
|
||||
<project EXPORT="discard">[CONTIKI_DIR]/tools/cooja/apps/mspsim</project>
|
||||
<project EXPORT="discard">[CONTIKI_DIR]/tools/cooja/apps/avrora</project>
|
||||
<project EXPORT="discard">[CONTIKI_DIR]/tools/cooja/apps/native_gateway</project>
|
||||
<project EXPORT="discard">[CONTIKI_DIR]/tools/cooja/apps/serial_socket</project>
|
||||
<project EXPORT="discard">/home/user/contikiprojects/sics.se/mobility</project>
|
||||
<simulation>
|
||||
<title>Servreg hack test</title>
|
||||
<delaytime>0</delaytime>
|
||||
<randomseed>123456</randomseed>
|
||||
<motedelay_us>1000000</motedelay_us>
|
||||
<radiomedium>
|
||||
se.sics.cooja.radiomediums.UDGM
|
||||
<transmitting_range>40.0</transmitting_range>
|
||||
<interference_range>40.0</interference_range>
|
||||
<success_ratio_tx>1.0</success_ratio_tx>
|
||||
<success_ratio_rx>1.0</success_ratio_rx>
|
||||
</radiomedium>
|
||||
<events>
|
||||
<logoutput>40000</logoutput>
|
||||
</events>
|
||||
<motetype>
|
||||
se.sics.cooja.mspmote.SkyMoteType
|
||||
<identifier>sky1</identifier>
|
||||
<description>Servreg server</description>
|
||||
<source EXPORT="discard">[CONTIKI_DIR]/examples/servreg-hack/example-servreg-server.c</source>
|
||||
<commands EXPORT="discard">make example-servreg-server.sky TARGET=sky</commands>
|
||||
<firmware EXPORT="copy">[CONTIKI_DIR]/examples/servreg-hack/example-servreg-server.sky</firmware>
|
||||
<moteinterface>se.sics.cooja.interfaces.Position</moteinterface>
|
||||
<moteinterface>se.sics.cooja.interfaces.RimeAddress</moteinterface>
|
||||
<moteinterface>se.sics.cooja.interfaces.IPAddress</moteinterface>
|
||||
<moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
||||
<moteinterface>se.sics.cooja.interfaces.MoteAttributes</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspClock</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspMoteID</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyButton</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyFlash</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyCoffeeFilesystem</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyByteRadio</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspSerial</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyLED</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspDebugOutput</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyTemperature</moteinterface>
|
||||
</motetype>
|
||||
<motetype>
|
||||
se.sics.cooja.mspmote.SkyMoteType
|
||||
<identifier>sky2</identifier>
|
||||
<description>Servreg hack client</description>
|
||||
<source EXPORT="discard">[CONTIKI_DIR]/examples/servreg-hack/example-servreg-client.c</source>
|
||||
<commands EXPORT="discard">make example-servreg-client.sky TARGET=sky</commands>
|
||||
<firmware EXPORT="copy">[CONTIKI_DIR]/examples/servreg-hack/example-servreg-client.sky</firmware>
|
||||
<moteinterface>se.sics.cooja.interfaces.Position</moteinterface>
|
||||
<moteinterface>se.sics.cooja.interfaces.RimeAddress</moteinterface>
|
||||
<moteinterface>se.sics.cooja.interfaces.IPAddress</moteinterface>
|
||||
<moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
||||
<moteinterface>se.sics.cooja.interfaces.MoteAttributes</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspClock</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspMoteID</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyButton</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyFlash</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyCoffeeFilesystem</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyByteRadio</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspSerial</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyLED</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspDebugOutput</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyTemperature</moteinterface>
|
||||
</motetype>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
se.sics.cooja.interfaces.Position
|
||||
<x>45.693987609497896</x>
|
||||
<y>26.353051242505675</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
se.sics.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>1</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky1</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
se.sics.cooja.interfaces.Position
|
||||
<x>18.451397050087735</x>
|
||||
<y>55.93074152489276</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
se.sics.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>2</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
se.sics.cooja.interfaces.Position
|
||||
<x>45.082598269523864</x>
|
||||
<y>52.7178388400784</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
se.sics.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>3</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
se.sics.cooja.interfaces.Position
|
||||
<x>11.116935333105516</x>
|
||||
<y>49.070534908051414</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
se.sics.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>4</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
se.sics.cooja.interfaces.Position
|
||||
<x>85.11866272622683</x>
|
||||
<y>30.030092430999066</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
se.sics.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>5</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
se.sics.cooja.interfaces.Position
|
||||
<x>30.71302161006234</x>
|
||||
<y>13.877842534368446</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
se.sics.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>6</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
se.sics.cooja.interfaces.Position
|
||||
<x>44.43705509785284</x>
|
||||
<y>69.81167027376168</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
se.sics.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>7</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
se.sics.cooja.interfaces.Position
|
||||
<x>64.10992023465046</x>
|
||||
<y>20.589540162635835</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
se.sics.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>8</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
se.sics.cooja.interfaces.Position
|
||||
<x>32.29787406276132</x>
|
||||
<y>18.754900913594753</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
se.sics.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>9</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
se.sics.cooja.interfaces.Position
|
||||
<x>25.28398611019028</x>
|
||||
<y>69.27186586570369</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
se.sics.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>10</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
se.sics.cooja.interfaces.Position
|
||||
<x>19.3359466030565</x>
|
||||
<y>17.321986704081503</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
se.sics.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>11</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
</simulation>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.SimControl
|
||||
<width>318</width>
|
||||
<z>1</z>
|
||||
<height>172</height>
|
||||
<location_x>0</location_x>
|
||||
<location_y>0</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.Visualizer
|
||||
<plugin_config>
|
||||
<skin>se.sics.cooja.plugins.skins.IDVisualizerSkin</skin>
|
||||
<skin>se.sics.cooja.plugins.skins.MoteTypeVisualizerSkin</skin>
|
||||
<skin>se.sics.cooja.plugins.skins.AttributeVisualizerSkin</skin>
|
||||
<skin>se.sics.cooja.plugins.skins.UDGMVisualizerSkin</skin>
|
||||
<skin>se.sics.cooja.plugins.skins.GridVisualizerSkin</skin>
|
||||
<viewport>3.56257040103728 0.0 0.0 3.56257040103728 -26.423046586149052 -28.07489060373735</viewport>
|
||||
</plugin_config>
|
||||
<width>300</width>
|
||||
<z>2</z>
|
||||
<height>300</height>
|
||||
<location_x>1140</location_x>
|
||||
<location_y>0</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.LogListener
|
||||
<plugin_config>
|
||||
<filter />
|
||||
</plugin_config>
|
||||
<width>1440</width>
|
||||
<z>3</z>
|
||||
<height>324</height>
|
||||
<location_x>2</location_x>
|
||||
<location_y>270</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.TimeLine
|
||||
<plugin_config>
|
||||
<mote>0</mote>
|
||||
<mote>1</mote>
|
||||
<mote>2</mote>
|
||||
<mote>3</mote>
|
||||
<mote>4</mote>
|
||||
<mote>5</mote>
|
||||
<mote>6</mote>
|
||||
<mote>7</mote>
|
||||
<mote>8</mote>
|
||||
<mote>9</mote>
|
||||
<mote>10</mote>
|
||||
<showRadioRXTX />
|
||||
<showRadioHW />
|
||||
<split>125</split>
|
||||
<zoomfactor>1633.2339825135305</zoomfactor>
|
||||
</plugin_config>
|
||||
<width>1440</width>
|
||||
<z>4</z>
|
||||
<height>238</height>
|
||||
<location_x>0</location_x>
|
||||
<location_y>595</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.ScriptRunner
|
||||
<plugin_config>
|
||||
<script>/*
|
||||
* 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(120000);
|
||||
|
||||
num = 0;
|
||||
|
||||
while(true) {
|
||||
YIELD();
|
||||
WAIT_UNTIL(msg.startsWith('Id'));
|
||||
num++;
|
||||
if(num == 9) {
|
||||
log.testOK();
|
||||
}
|
||||
}</script>
|
||||
<active>true</active>
|
||||
</plugin_config>
|
||||
<width>600</width>
|
||||
<z>0</z>
|
||||
<height>700</height>
|
||||
<location_x>526</location_x>
|
||||
<location_y>6</location_y>
|
||||
</plugin>
|
||||
</simconf>
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,147 +1,147 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<simconf>
|
||||
<project EXPORT="discard">[CONTIKI_DIR]/tools/cooja/apps/mrm</project>
|
||||
<project EXPORT="discard">[CONTIKI_DIR]/tools/cooja/apps/mspsim</project>
|
||||
<project EXPORT="discard">[CONTIKI_DIR]/tools/cooja/apps/avrora</project>
|
||||
<simulation>
|
||||
<title>My simulation</title>
|
||||
<delaytime>0</delaytime>
|
||||
<randomseed>generated</randomseed>
|
||||
<motedelay_us>1000000</motedelay_us>
|
||||
<radiomedium>
|
||||
se.sics.cooja.radiomediums.UDGM
|
||||
<transmitting_range>50.0</transmitting_range>
|
||||
<interference_range>100.0</interference_range>
|
||||
<success_ratio_tx>1.0</success_ratio_tx>
|
||||
<success_ratio_rx>1.0</success_ratio_rx>
|
||||
</radiomedium>
|
||||
<events>
|
||||
<logoutput>40000</logoutput>
|
||||
</events>
|
||||
<motetype>
|
||||
se.sics.cooja.mspmote.SkyMoteType
|
||||
<identifier>sky1</identifier>
|
||||
<description>Sky Mote Type #1</description>
|
||||
<source EXPORT="discard">[CONTIKI_DIR]/examples/udp-ipv6/udp-client.c</source>
|
||||
<commands EXPORT="discard">make clean TARGET=sky
|
||||
make udp-client.sky TARGET=sky DEFINES=UDP_CONNECTION_ADDR=fe80::212:7402:2:202</commands>
|
||||
<firmware EXPORT="copy">[CONTIKI_DIR]/examples/udp-ipv6/udp-client.sky</firmware>
|
||||
<moteinterface>se.sics.cooja.interfaces.Position</moteinterface>
|
||||
<moteinterface>se.sics.cooja.interfaces.IPAddress</moteinterface>
|
||||
<moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspClock</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspMoteID</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyButton</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyFlash</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyByteRadio</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspSerial</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyLED</moteinterface>
|
||||
</motetype>
|
||||
<motetype>
|
||||
se.sics.cooja.mspmote.SkyMoteType
|
||||
<identifier>sky2</identifier>
|
||||
<description>Sky Mote Type #2</description>
|
||||
<source EXPORT="discard">[CONTIKI_DIR]/examples/udp-ipv6/udp-server.c</source>
|
||||
<commands EXPORT="discard">make udp-server.sky TARGET=sky</commands>
|
||||
<firmware EXPORT="copy">[CONTIKI_DIR]/examples/udp-ipv6/udp-server.sky</firmware>
|
||||
<moteinterface>se.sics.cooja.interfaces.Position</moteinterface>
|
||||
<moteinterface>se.sics.cooja.interfaces.IPAddress</moteinterface>
|
||||
<moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspClock</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspMoteID</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyButton</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyFlash</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyByteRadio</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspSerial</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyLED</moteinterface>
|
||||
</motetype>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
se.sics.cooja.interfaces.Position
|
||||
<x>65.934608127183</x>
|
||||
<y>63.70462190529231</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
se.sics.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>1</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky1</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
se.sics.cooja.interfaces.Position
|
||||
<x>67.66105781539623</x>
|
||||
<y>63.13924301161143</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
se.sics.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>2</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
</simulation>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.SimControl
|
||||
<width>248</width>
|
||||
<z>0</z>
|
||||
<height>200</height>
|
||||
<location_x>0</location_x>
|
||||
<location_y>0</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.LogListener
|
||||
<plugin_config>
|
||||
<filter />
|
||||
</plugin_config>
|
||||
<width>816</width>
|
||||
<z>3</z>
|
||||
<height>333</height>
|
||||
<location_x>1</location_x>
|
||||
<location_y>365</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.Visualizer
|
||||
<plugin_config>
|
||||
<skin>se.sics.cooja.plugins.skins.IDVisualizerSkin</skin>
|
||||
<skin>se.sics.cooja.plugins.skins.AddressVisualizerSkin</skin>
|
||||
<skin>se.sics.cooja.plugins.skins.UDGMVisualizerSkin</skin>
|
||||
<viewport>123.21660699387752 0.0 0.0 123.21660699387752 -8113.602333266065 -7760.635326525308</viewport>
|
||||
</plugin_config>
|
||||
<width>246</width>
|
||||
<z>2</z>
|
||||
<height>167</height>
|
||||
<location_x>0</location_x>
|
||||
<location_y>198</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.ScriptRunner
|
||||
<plugin_config>
|
||||
<script>TIMEOUT(100000, log.log("last msg: " + msg + "\n")); /* print last msg at timeout */
|
||||
count = 0;
|
||||
while (count++ < 5) {
|
||||
/* Message from sender process to receiver process */
|
||||
YIELD_THEN_WAIT_UNTIL(msg.contains("Client sending"));
|
||||
YIELD_THEN_WAIT_UNTIL(msg.contains("Server received"));
|
||||
log.log(count + ": Sender -> Receiver OK\n");
|
||||
|
||||
/* Message from receiver process to sender process */
|
||||
YIELD_THEN_WAIT_UNTIL(msg.contains("Responding with"));
|
||||
YIELD_THEN_WAIT_UNTIL(msg.contains("Response from"));
|
||||
log.log(count + ": Receiver -> Sender OK\n");
|
||||
}
|
||||
|
||||
log.testOK(); /* Report test success and quit */</script>
|
||||
<active>true</active>
|
||||
</plugin_config>
|
||||
<width>572</width>
|
||||
<z>1</z>
|
||||
<height>700</height>
|
||||
<location_x>441</location_x>
|
||||
<location_y>2</location_y>
|
||||
</plugin>
|
||||
</simconf>
|
||||
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<simconf>
|
||||
<project EXPORT="discard">[CONTIKI_DIR]/tools/cooja/apps/mrm</project>
|
||||
<project EXPORT="discard">[CONTIKI_DIR]/tools/cooja/apps/mspsim</project>
|
||||
<project EXPORT="discard">[CONTIKI_DIR]/tools/cooja/apps/avrora</project>
|
||||
<simulation>
|
||||
<title>My simulation</title>
|
||||
<delaytime>0</delaytime>
|
||||
<randomseed>generated</randomseed>
|
||||
<motedelay_us>1000000</motedelay_us>
|
||||
<radiomedium>
|
||||
se.sics.cooja.radiomediums.UDGM
|
||||
<transmitting_range>50.0</transmitting_range>
|
||||
<interference_range>100.0</interference_range>
|
||||
<success_ratio_tx>1.0</success_ratio_tx>
|
||||
<success_ratio_rx>1.0</success_ratio_rx>
|
||||
</radiomedium>
|
||||
<events>
|
||||
<logoutput>40000</logoutput>
|
||||
</events>
|
||||
<motetype>
|
||||
se.sics.cooja.mspmote.SkyMoteType
|
||||
<identifier>sky1</identifier>
|
||||
<description>Sky Mote Type #1</description>
|
||||
<source EXPORT="discard">[CONTIKI_DIR]/examples/udp-ipv6/udp-client.c</source>
|
||||
<commands EXPORT="discard">make clean TARGET=sky
|
||||
make udp-client.sky TARGET=sky DEFINES=UDP_CONNECTION_ADDR=fe80::212:7402:2:202</commands>
|
||||
<firmware EXPORT="copy">[CONTIKI_DIR]/examples/udp-ipv6/udp-client.sky</firmware>
|
||||
<moteinterface>se.sics.cooja.interfaces.Position</moteinterface>
|
||||
<moteinterface>se.sics.cooja.interfaces.IPAddress</moteinterface>
|
||||
<moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspClock</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspMoteID</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyButton</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyFlash</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyByteRadio</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspSerial</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyLED</moteinterface>
|
||||
</motetype>
|
||||
<motetype>
|
||||
se.sics.cooja.mspmote.SkyMoteType
|
||||
<identifier>sky2</identifier>
|
||||
<description>Sky Mote Type #2</description>
|
||||
<source EXPORT="discard">[CONTIKI_DIR]/examples/udp-ipv6/udp-server.c</source>
|
||||
<commands EXPORT="discard">make udp-server.sky TARGET=sky</commands>
|
||||
<firmware EXPORT="copy">[CONTIKI_DIR]/examples/udp-ipv6/udp-server.sky</firmware>
|
||||
<moteinterface>se.sics.cooja.interfaces.Position</moteinterface>
|
||||
<moteinterface>se.sics.cooja.interfaces.IPAddress</moteinterface>
|
||||
<moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspClock</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspMoteID</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyButton</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyFlash</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyByteRadio</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspSerial</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyLED</moteinterface>
|
||||
</motetype>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
se.sics.cooja.interfaces.Position
|
||||
<x>65.934608127183</x>
|
||||
<y>63.70462190529231</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
se.sics.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>1</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky1</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
se.sics.cooja.interfaces.Position
|
||||
<x>67.66105781539623</x>
|
||||
<y>63.13924301161143</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
se.sics.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>2</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
</simulation>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.SimControl
|
||||
<width>248</width>
|
||||
<z>0</z>
|
||||
<height>200</height>
|
||||
<location_x>0</location_x>
|
||||
<location_y>0</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.LogListener
|
||||
<plugin_config>
|
||||
<filter />
|
||||
</plugin_config>
|
||||
<width>816</width>
|
||||
<z>3</z>
|
||||
<height>333</height>
|
||||
<location_x>1</location_x>
|
||||
<location_y>365</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.Visualizer
|
||||
<plugin_config>
|
||||
<skin>se.sics.cooja.plugins.skins.IDVisualizerSkin</skin>
|
||||
<skin>se.sics.cooja.plugins.skins.AddressVisualizerSkin</skin>
|
||||
<skin>se.sics.cooja.plugins.skins.UDGMVisualizerSkin</skin>
|
||||
<viewport>123.21660699387752 0.0 0.0 123.21660699387752 -8113.602333266065 -7760.635326525308</viewport>
|
||||
</plugin_config>
|
||||
<width>246</width>
|
||||
<z>2</z>
|
||||
<height>167</height>
|
||||
<location_x>0</location_x>
|
||||
<location_y>198</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.ScriptRunner
|
||||
<plugin_config>
|
||||
<script>TIMEOUT(100000, log.log("last msg: " + msg + "\n")); /* print last msg at timeout */
|
||||
count = 0;
|
||||
while (count++ < 5) {
|
||||
/* Message from sender process to receiver process */
|
||||
YIELD_THEN_WAIT_UNTIL(msg.contains("Client sending"));
|
||||
YIELD_THEN_WAIT_UNTIL(msg.contains("Server received"));
|
||||
log.log(count + ": Sender -> Receiver OK\n");
|
||||
|
||||
/* Message from receiver process to sender process */
|
||||
YIELD_THEN_WAIT_UNTIL(msg.contains("Responding with"));
|
||||
YIELD_THEN_WAIT_UNTIL(msg.contains("Response from"));
|
||||
log.log(count + ": Receiver -> Sender OK\n");
|
||||
}
|
||||
|
||||
log.testOK(); /* Report test success and quit */</script>
|
||||
<active>true</active>
|
||||
</plugin_config>
|
||||
<width>572</width>
|
||||
<z>1</z>
|
||||
<height>700</height>
|
||||
<location_x>441</location_x>
|
||||
<location_y>2</location_y>
|
||||
</plugin>
|
||||
</simconf>
|
||||
|
||||
|
|
|
@ -1,148 +1,148 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<simconf>
|
||||
<project EXPORT="discard">[CONTIKI_DIR]/tools/cooja/apps/mrm</project>
|
||||
<project EXPORT="discard">[CONTIKI_DIR]/tools/cooja/apps/mspsim</project>
|
||||
<project EXPORT="discard">[CONTIKI_DIR]/tools/cooja/apps/avrora</project>
|
||||
<simulation>
|
||||
<title>My simulation</title>
|
||||
<delaytime>0</delaytime>
|
||||
<randomseed>generated</randomseed>
|
||||
<motedelay_us>1000000</motedelay_us>
|
||||
<radiomedium>
|
||||
se.sics.cooja.radiomediums.UDGM
|
||||
<transmitting_range>50.0</transmitting_range>
|
||||
<interference_range>100.0</interference_range>
|
||||
<success_ratio_tx>1.0</success_ratio_tx>
|
||||
<success_ratio_rx>1.0</success_ratio_rx>
|
||||
</radiomedium>
|
||||
<events>
|
||||
<logoutput>40000</logoutput>
|
||||
</events>
|
||||
<motetype>
|
||||
se.sics.cooja.mspmote.SkyMoteType
|
||||
<identifier>sky1</identifier>
|
||||
<description>Sky Mote Type #1</description>
|
||||
<source EXPORT="discard">[CONTIKI_DIR]/examples/udp-ipv6/udp-client.c</source>
|
||||
<commands EXPORT="discard">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</commands>
|
||||
<firmware EXPORT="copy">[CONTIKI_DIR]/examples/udp-ipv6/udp-client.sky</firmware>
|
||||
<moteinterface>se.sics.cooja.interfaces.Position</moteinterface>
|
||||
<moteinterface>se.sics.cooja.interfaces.IPAddress</moteinterface>
|
||||
<moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspClock</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspMoteID</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyButton</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyFlash</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyByteRadio</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspSerial</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyLED</moteinterface>
|
||||
</motetype>
|
||||
<motetype>
|
||||
se.sics.cooja.mspmote.SkyMoteType
|
||||
<identifier>sky2</identifier>
|
||||
<description>Sky Mote Type #2</description>
|
||||
<source EXPORT="discard">[CONTIKI_DIR]/examples/udp-ipv6/udp-server.c</source>
|
||||
<commands EXPORT="discard">make udp-server.sky TARGET=sky DEFINES=SICSLOWPAN_CONF_FRAG=1</commands>
|
||||
<firmware EXPORT="copy">[CONTIKI_DIR]/examples/udp-ipv6/udp-server.sky</firmware>
|
||||
<moteinterface>se.sics.cooja.interfaces.Position</moteinterface>
|
||||
<moteinterface>se.sics.cooja.interfaces.IPAddress</moteinterface>
|
||||
<moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspClock</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspMoteID</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyButton</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyFlash</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyByteRadio</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspSerial</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyLED</moteinterface>
|
||||
</motetype>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
se.sics.cooja.interfaces.Position
|
||||
<x>65.934608127183</x>
|
||||
<y>63.70462190529231</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
se.sics.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>1</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky1</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
se.sics.cooja.interfaces.Position
|
||||
<x>67.66105781539623</x>
|
||||
<y>63.13924301161143</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
se.sics.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>2</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
</simulation>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.SimControl
|
||||
<width>248</width>
|
||||
<z>2</z>
|
||||
<height>200</height>
|
||||
<location_x>0</location_x>
|
||||
<location_y>0</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.LogListener
|
||||
<plugin_config>
|
||||
<filter />
|
||||
</plugin_config>
|
||||
<width>816</width>
|
||||
<z>1</z>
|
||||
<height>333</height>
|
||||
<location_x>1</location_x>
|
||||
<location_y>366</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.Visualizer
|
||||
<plugin_config>
|
||||
<skin>se.sics.cooja.plugins.skins.IDVisualizerSkin</skin>
|
||||
<skin>se.sics.cooja.plugins.skins.AddressVisualizerSkin</skin>
|
||||
<skin>se.sics.cooja.plugins.skins.UDGMVisualizerSkin</skin>
|
||||
<viewport>123.21660699387752 0.0 0.0 123.21660699387752 -8113.602333266065 -7760.635326525308</viewport>
|
||||
</plugin_config>
|
||||
<width>246</width>
|
||||
<z>3</z>
|
||||
<height>167</height>
|
||||
<location_x>0</location_x>
|
||||
<location_y>198</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.ScriptRunner
|
||||
<plugin_config>
|
||||
<script>TIMEOUT(150000, log.log("last msg: " + msg + "\n")); /* print last msg at timeout */
|
||||
|
||||
count = 0;
|
||||
while (count++ < 5) {
|
||||
/* Message from sender process to receiver process */
|
||||
YIELD_THEN_WAIT_UNTIL(msg.contains("Client sending"));
|
||||
YIELD_THEN_WAIT_UNTIL(msg.contains("Server received"));
|
||||
log.log(count + ": Sender -> Receiver OK\n");
|
||||
|
||||
/* Message from receiver process to sender process */
|
||||
YIELD_THEN_WAIT_UNTIL(msg.contains("Responding with message"));
|
||||
YIELD_THEN_WAIT_UNTIL(msg.contains("Response from"));
|
||||
log.log(count + ": Receiver -> Sender OK\n");
|
||||
}
|
||||
|
||||
log.testOK(); /* Report test success and quit */</script>
|
||||
<active>true</active>
|
||||
</plugin_config>
|
||||
<width>572</width>
|
||||
<z>0</z>
|
||||
<height>700</height>
|
||||
<location_x>380</location_x>
|
||||
<location_y>-11</location_y>
|
||||
</plugin>
|
||||
</simconf>
|
||||
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<simconf>
|
||||
<project EXPORT="discard">[CONTIKI_DIR]/tools/cooja/apps/mrm</project>
|
||||
<project EXPORT="discard">[CONTIKI_DIR]/tools/cooja/apps/mspsim</project>
|
||||
<project EXPORT="discard">[CONTIKI_DIR]/tools/cooja/apps/avrora</project>
|
||||
<simulation>
|
||||
<title>My simulation</title>
|
||||
<delaytime>0</delaytime>
|
||||
<randomseed>generated</randomseed>
|
||||
<motedelay_us>1000000</motedelay_us>
|
||||
<radiomedium>
|
||||
se.sics.cooja.radiomediums.UDGM
|
||||
<transmitting_range>50.0</transmitting_range>
|
||||
<interference_range>100.0</interference_range>
|
||||
<success_ratio_tx>1.0</success_ratio_tx>
|
||||
<success_ratio_rx>1.0</success_ratio_rx>
|
||||
</radiomedium>
|
||||
<events>
|
||||
<logoutput>40000</logoutput>
|
||||
</events>
|
||||
<motetype>
|
||||
se.sics.cooja.mspmote.SkyMoteType
|
||||
<identifier>sky1</identifier>
|
||||
<description>Sky Mote Type #1</description>
|
||||
<source EXPORT="discard">[CONTIKI_DIR]/examples/udp-ipv6/udp-client.c</source>
|
||||
<commands EXPORT="discard">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</commands>
|
||||
<firmware EXPORT="copy">[CONTIKI_DIR]/examples/udp-ipv6/udp-client.sky</firmware>
|
||||
<moteinterface>se.sics.cooja.interfaces.Position</moteinterface>
|
||||
<moteinterface>se.sics.cooja.interfaces.IPAddress</moteinterface>
|
||||
<moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspClock</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspMoteID</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyButton</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyFlash</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyByteRadio</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspSerial</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyLED</moteinterface>
|
||||
</motetype>
|
||||
<motetype>
|
||||
se.sics.cooja.mspmote.SkyMoteType
|
||||
<identifier>sky2</identifier>
|
||||
<description>Sky Mote Type #2</description>
|
||||
<source EXPORT="discard">[CONTIKI_DIR]/examples/udp-ipv6/udp-server.c</source>
|
||||
<commands EXPORT="discard">make udp-server.sky TARGET=sky DEFINES=SICSLOWPAN_CONF_FRAG=1</commands>
|
||||
<firmware EXPORT="copy">[CONTIKI_DIR]/examples/udp-ipv6/udp-server.sky</firmware>
|
||||
<moteinterface>se.sics.cooja.interfaces.Position</moteinterface>
|
||||
<moteinterface>se.sics.cooja.interfaces.IPAddress</moteinterface>
|
||||
<moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspClock</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspMoteID</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyButton</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyFlash</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyByteRadio</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspSerial</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyLED</moteinterface>
|
||||
</motetype>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
se.sics.cooja.interfaces.Position
|
||||
<x>65.934608127183</x>
|
||||
<y>63.70462190529231</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
se.sics.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>1</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky1</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
se.sics.cooja.interfaces.Position
|
||||
<x>67.66105781539623</x>
|
||||
<y>63.13924301161143</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
se.sics.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>2</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky2</motetype_identifier>
|
||||
</mote>
|
||||
</simulation>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.SimControl
|
||||
<width>248</width>
|
||||
<z>2</z>
|
||||
<height>200</height>
|
||||
<location_x>0</location_x>
|
||||
<location_y>0</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.LogListener
|
||||
<plugin_config>
|
||||
<filter />
|
||||
</plugin_config>
|
||||
<width>816</width>
|
||||
<z>1</z>
|
||||
<height>333</height>
|
||||
<location_x>1</location_x>
|
||||
<location_y>366</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.Visualizer
|
||||
<plugin_config>
|
||||
<skin>se.sics.cooja.plugins.skins.IDVisualizerSkin</skin>
|
||||
<skin>se.sics.cooja.plugins.skins.AddressVisualizerSkin</skin>
|
||||
<skin>se.sics.cooja.plugins.skins.UDGMVisualizerSkin</skin>
|
||||
<viewport>123.21660699387752 0.0 0.0 123.21660699387752 -8113.602333266065 -7760.635326525308</viewport>
|
||||
</plugin_config>
|
||||
<width>246</width>
|
||||
<z>3</z>
|
||||
<height>167</height>
|
||||
<location_x>0</location_x>
|
||||
<location_y>198</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.ScriptRunner
|
||||
<plugin_config>
|
||||
<script>TIMEOUT(150000, log.log("last msg: " + msg + "\n")); /* print last msg at timeout */
|
||||
|
||||
count = 0;
|
||||
while (count++ < 5) {
|
||||
/* Message from sender process to receiver process */
|
||||
YIELD_THEN_WAIT_UNTIL(msg.contains("Client sending"));
|
||||
YIELD_THEN_WAIT_UNTIL(msg.contains("Server received"));
|
||||
log.log(count + ": Sender -> Receiver OK\n");
|
||||
|
||||
/* Message from receiver process to sender process */
|
||||
YIELD_THEN_WAIT_UNTIL(msg.contains("Responding with message"));
|
||||
YIELD_THEN_WAIT_UNTIL(msg.contains("Response from"));
|
||||
log.log(count + ": Receiver -> Sender OK\n");
|
||||
}
|
||||
|
||||
log.testOK(); /* Report test success and quit */</script>
|
||||
<active>true</active>
|
||||
</plugin_config>
|
||||
<width>572</width>
|
||||
<z>0</z>
|
||||
<height>700</height>
|
||||
<location_x>380</location_x>
|
||||
<location_y>-11</location_y>
|
||||
</plugin>
|
||||
</simconf>
|
||||
|
||||
|
|
|
@ -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
|
|
@ -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
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
DESCRIPTION = Example plugin
|
||||
se.sics.cooja.GUI.PLUGINS = + MyDummyPlugin
|
||||
DESCRIPTION = Example plugin
|
||||
se.sics.cooja.GUI.PLUGINS = + MyDummyPlugin
|
||||
|
|
|
@ -1 +1 @@
|
|||
se.sics.cooja.GUI.RADIOMEDIUMS = + DummyRadioMedium
|
||||
se.sics.cooja.GUI.RADIOMEDIUMS = + DummyRadioMedium
|
||||
|
|
|
@ -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("<html><b>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("</b><br>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("<html><b>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("</b><br>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]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
116
tools/cooja/java/se/sics/cooja/plugins/analyzers/PcapExporter.java
Executable file → Normal file
116
tools/cooja/java/se/sics/cooja/plugins/analyzers/PcapExporter.java
Executable file → Normal file
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue