Merge pull request #70 from simonduq/pr/layer-config
Layer configuration and NullNet
This commit is contained in:
commit
326507653a
|
@ -102,6 +102,7 @@ env:
|
|||
- BUILD_TYPE='rpl-lite' BUILD_CATEGORY='sim'
|
||||
- BUILD_TYPE='rpl-classic' BUILD_CATEGORY='sim'
|
||||
- BUILD_TYPE='ipv6' BUILD_CATEGORY='sim'
|
||||
- BUILD_TYPE='nullnet' BUILD_CATEGORY='sim'
|
||||
- BUILD_TYPE='base' BUILD_CATEGORY='sim'
|
||||
- BUILD_TYPE='ieee802154' BUILD_CATEGORY='sim'
|
||||
- BUILD_TYPE='6tisch' BUILD_CATEGORY='sim'
|
||||
|
|
|
@ -74,22 +74,60 @@ endif
|
|||
|
||||
MODULES += os os/sys os/dev os/lib os/services
|
||||
|
||||
# Include IPv6, RPL
|
||||
# Configure MAC layer
|
||||
|
||||
HAS_STACK = 0
|
||||
# The different options
|
||||
MAKE_MAC_NULLMAC = 0
|
||||
MAKE_MAC_CSMA = 1
|
||||
MAKE_MAC_TSCH = 2
|
||||
MAKE_MAC_OTHER = 3
|
||||
|
||||
# Make CSMA the default MAC
|
||||
MAKE_MAC ?= MAKE_MAC_CSMA
|
||||
|
||||
ifeq ($(MAKE_MAC),MAKE_MAC_NULLMAC)
|
||||
CFLAGS += -DMAC_CONF_WITH_NULLMAC=1
|
||||
endif
|
||||
|
||||
ifeq ($(MAKE_MAC),MAKE_MAC_CSMA)
|
||||
MODULES += os/net/mac/csma
|
||||
CFLAGS += -DMAC_CONF_WITH_CSMA=1
|
||||
endif
|
||||
|
||||
ifeq ($(MAKE_MAC),MAKE_MAC_TSCH)
|
||||
MODULES += os/net/mac/tsch
|
||||
CFLAGS += -DMAC_CONF_WITH_TSCH=1
|
||||
endif
|
||||
|
||||
ifeq ($(MAKE_MAC),MAKE_MAC_OTHER)
|
||||
CFLAGS += -DMAC_CONF_WITH_OTHER=1
|
||||
endif
|
||||
|
||||
# Configure IPv6, RPL
|
||||
|
||||
MAKE_NET_NULLNET = 0
|
||||
MAKE_NET_IPV6 = 1
|
||||
MAKE_NET_OTHER = 2
|
||||
|
||||
# Make IPv6 the default stack
|
||||
ifeq ($(HAS_STACK),0)
|
||||
ifneq ($(CONTIKI_WITH_IPV6),0)
|
||||
CONTIKI_WITH_IPV6 = 1
|
||||
endif
|
||||
MAKE_NET ?= MAKE_NET_IPV6
|
||||
|
||||
ifeq ($(MAKE_NET),MAKE_NET_NULLNET)
|
||||
CFLAGS += -DNETSTACK_CONF_WITH_NULLNET=1
|
||||
endif
|
||||
|
||||
ifeq ($(CONTIKI_WITH_IPV6),1)
|
||||
ifeq ($(MAKE_NET),MAKE_NET_IPV6)
|
||||
CFLAGS += -DNETSTACK_CONF_WITH_IPV6=1
|
||||
CONTIKI_WITH_RPL ?= 1
|
||||
CONTIKI_WITH_RPL_LITE ?= 1
|
||||
MODULES += os/net/ipv6 os/net/ip
|
||||
else
|
||||
CFLAGS += -DNETSTACK_CONF_WITH_NULLNET=1
|
||||
MODULES += os/net/nullnet
|
||||
endif
|
||||
|
||||
ifeq ($(MAKE_NET),MAKE_NET_OTHER)
|
||||
CFLAGS += -DNETSTACK_CONF_WITH_OTHER=1
|
||||
endif
|
||||
|
||||
ifeq ($(CONTIKI_WITH_RPL),1)
|
||||
|
|
|
@ -51,9 +51,9 @@ endif
|
|||
### Banking Guesswork:
|
||||
### Generic examples do not specify banking.
|
||||
### We automatically turn it on if its unspecified and if we are building with
|
||||
### CONTIKI_WITH_IPV6
|
||||
### MAKE_NET_IPV6
|
||||
ifndef HAVE_BANKING
|
||||
ifeq ($(CONTIKI_WITH_IPV6),1)
|
||||
ifeq ($(MAKE_NET),MAKE_NET_IPV6)
|
||||
HAVE_BANKING=1
|
||||
else
|
||||
HAVE_BANKING=0
|
||||
|
|
|
@ -11,7 +11,7 @@ ifeq ($(NRF52_JLINK_PATH),)
|
|||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(CONTIKI_WITH_IPV6),1)
|
||||
ifneq ($(MAKE_NET),MAKE_NET_IPV6)
|
||||
$(error Only IPv6 stack is supported!)
|
||||
endif
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ CONTIKI_CPU=$(CONTIKI)/arch/cpu/cc2538
|
|||
include $(CONTIKI_CPU)/Makefile.cc2538
|
||||
|
||||
MODULES += os/net os/net/mac os/net/mac/framer \
|
||||
os/net/mac/csma os/net/mac/nullmac \
|
||||
os/storage/cfs
|
||||
|
||||
PYTHON = python
|
||||
|
|
|
@ -57,6 +57,10 @@ typedef uint32_t rtimer_clock_t;
|
|||
*/
|
||||
#define TSCH_CONF_BASE_DRIFT_PPM -977
|
||||
#endif
|
||||
|
||||
#if MAC_CONF_WITH_TSCH
|
||||
#define TSCH_CONF_HW_FRAME_FILTERING 0
|
||||
#endif /* MAC_CONF_WITH_TSCH */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/**
|
||||
* \name Serial Boot Loader Backdoor configuration
|
||||
|
|
|
@ -40,6 +40,39 @@ ARCHIVE = $(OBJECTDIR)/$(LIBNAME).a
|
|||
JNILIB = $(OBJECTDIR)/$(LIBNAME).$(TARGET)
|
||||
CONTIKI_APP_OBJ = $(CONTIKI_APP).co
|
||||
|
||||
# Modules
|
||||
MODULES += os/net os/net/mac os/net/mac/framer os/net/ip64-addr
|
||||
|
||||
## Copied from Makefile.include, since Cooja overrides CFLAGS et al
|
||||
MAKE_NET_NULLNET = 0
|
||||
MAKE_NET_IPV6 = 1
|
||||
MAKE_NET_OTHER = 2
|
||||
|
||||
# Make IPv6 the default stack
|
||||
MAKE_NET ?= MAKE_NET_IPV6
|
||||
|
||||
ifeq ($(MAKE_NET),MAKE_NET_IPV6)
|
||||
CFLAGS += -DNETSTACK_CONF_WITH_IPV6=1
|
||||
CONTIKI_WITH_RPL ?= 1
|
||||
CONTIKI_WITH_RPL_LITE ?= 1
|
||||
MODULES += os/net/ipv6 os/net/ip
|
||||
COOJA_NET = uip-driver.c
|
||||
else
|
||||
COOJA_NET =
|
||||
endif
|
||||
|
||||
ifeq ($(CONTIKI_WITH_RPL),1)
|
||||
CFLAGS += -DUIP_CONF_IPV6_RPL=1
|
||||
ifeq ($(CONTIKI_WITH_RPL_LITE),1)
|
||||
CFLAGS += -DUIP_CONF_IPV6_RPL_LITE=1
|
||||
MODULES += os/net/rpl-lite
|
||||
else
|
||||
MODULES += os/net/rpl
|
||||
endif
|
||||
else
|
||||
CFLAGS += -DUIP_CONF_IPV6_RPL=0
|
||||
endif
|
||||
|
||||
### COOJA platform sources
|
||||
COOJA = $(CONTIKI)/arch/platform/$(TARGET)
|
||||
CONTIKI_TARGET_DIRS = . dev lib sys cfs net
|
||||
|
@ -56,8 +89,6 @@ COOJA_INTFS = beep.c button-sensor.c ip.c leds-arch.c moteid.c \
|
|||
|
||||
COOJA_CORE = random.c sensors.c leds.c
|
||||
|
||||
COOJA_NET = uip-driver.c
|
||||
|
||||
# (COOJA_SOURCEFILES contains additional sources set from simulator)
|
||||
CONTIKI_TARGET_SOURCEFILES = \
|
||||
$(COOJA_BASE) $(COOJA_INTFS) $(COOJA_CORE) $(COOJA_NET) $(COOJA_SOURCEFILES)
|
||||
|
@ -76,21 +107,3 @@ ifeq ($(WERROR),1)
|
|||
CFLAGSNO += -Werror
|
||||
endif
|
||||
CFLAGS += $(CFLAGSNO)
|
||||
|
||||
MODULES += os/net os/net/mac os/net/mac/framer os/net/ip64-addr \
|
||||
os/net/mac/csma os/net/mac/nullmac
|
||||
|
||||
## Copied from Makefile.include, since Cooja overrides CFLAGS et al
|
||||
HAS_STACK = 0
|
||||
|
||||
# Make IPv6 the default stack
|
||||
ifeq ($(HAS_STACK),0)
|
||||
CONTIKI_WITH_IPV6 = 1
|
||||
endif
|
||||
|
||||
ifeq ($(CONTIKI_WITH_IPV6),1)
|
||||
CFLAGS += -DNETSTACK_CONF_WITH_IPV6=1
|
||||
ifneq ($(CONTIKI_WITH_RPL),0)
|
||||
CFLAGS += -DUIP_CONF_IPV6_RPL=1
|
||||
endif
|
||||
endif
|
||||
|
|
|
@ -57,8 +57,6 @@
|
|||
#else /* NETSTACK_CONF_H */
|
||||
|
||||
/* Default network config */
|
||||
#if NETSTACK_CONF_WITH_IPV6
|
||||
|
||||
#define CSMA_CONF_SEND_SOFT_ACK 1
|
||||
#define CSMA_CONF_ACK_WAIT_TIME RTIMER_SECOND / 500
|
||||
#define CSMA_CONF_AFTER_ACK_DETECTED_WAIT_TIME 0
|
||||
|
@ -66,8 +64,6 @@
|
|||
/* Radio setup */
|
||||
#define NETSTACK_CONF_RADIO cooja_radio_driver
|
||||
|
||||
#endif /* NETSTACK_CONF_WITH_IPV6 */
|
||||
|
||||
#endif /* NETSTACK_CONF_H */
|
||||
|
||||
/* Default network config */
|
||||
|
@ -122,8 +118,15 @@ typedef uint64_t rtimer_clock_t;
|
|||
|
||||
#define UIP_ARCH_IPCHKSUM 1
|
||||
|
||||
#if NETSTACK_CONF_WITH_IPV6
|
||||
#endif /* NETSTACK_CONF_WITH_IPV6 */
|
||||
#if MAC_CONF_WITH_TSCH
|
||||
#define COOJA_CONF_SIMULATE_TURNAROUND 0
|
||||
/* A bug in cooja causes many EBs to be missed at scan. Increase EB
|
||||
frequency to shorten the join process */
|
||||
#undef TSCH_CONF_EB_PERIOD
|
||||
#define TSCH_CONF_EB_PERIOD (4 * CLOCK_SECOND)
|
||||
#undef TSCH_CONF_MAX_EB_PERIOD
|
||||
#define TSCH_CONF_MAX_EB_PERIOD (4 * CLOCK_SECOND)
|
||||
#endif /* MAC_CONF_WITH_TSCH */
|
||||
|
||||
/* Turn off example-provided putchars */
|
||||
#define SLIP_BRIDGE_CONF_NO_PUTCHAR 1
|
||||
|
|
|
@ -143,8 +143,7 @@ endif
|
|||
CLEAN += *.jn516x
|
||||
CLEAN += *.jn516x.bin
|
||||
|
||||
MODULES += os/net os/net/mac os/net/mac/framer \
|
||||
os/net/mac/csma os/net/mac/nullmac
|
||||
MODULES += os/net os/net/mac os/net/mac/framer
|
||||
|
||||
CONTIKI_TARGET_SOURCEFILES += $(ARCH)
|
||||
CONTIKI_SOURCEFILES += $(CONTIKI_TARGET_SOURCEFILES)
|
||||
|
|
|
@ -251,8 +251,8 @@ typedef uint32_t clock_time_t;
|
|||
|
||||
/* Shall we calibrate the DCO periodically? */
|
||||
#ifndef DCOSYNCH_CONF_ENABLED
|
||||
#define DCOSYNCH_CONF_ENABLED 1
|
||||
#endif
|
||||
#define DCOSYNCH_CONF_ENABLED (!(MAC_CONF_WITH_TSCH))
|
||||
#endif /* DCOSYNCH_CONF_ENABLED */
|
||||
|
||||
/* How often shall we attempt to calibrate DCO?
|
||||
* PS: It should be calibrated upon temperature changes,
|
||||
|
|
|
@ -19,7 +19,7 @@ TARGET_LIBFILES = /lib/w32api/libws2_32.a /lib/w32api/libiphlpapi.a
|
|||
else
|
||||
CONTIKI_TARGET_SOURCEFILES += tapdev-drv.c linuxradio-drv.c
|
||||
#math
|
||||
ifneq ($(CONTIKI_WITH_IPV6),1)
|
||||
ifneq ($(MAKE_NET),MAKE_NET_IPV6)
|
||||
CONTIKI_TARGET_SOURCEFILES += tapdev.c
|
||||
else
|
||||
CONTIKI_TARGET_SOURCEFILES += tapdev6.c
|
||||
|
@ -30,6 +30,9 @@ CONTIKI_SOURCEFILES += $(CONTIKI_TARGET_SOURCEFILES)
|
|||
|
||||
.SUFFIXES:
|
||||
|
||||
# Enable nullmac by default
|
||||
MAKE_MAC ?= MAKE_MAC_NULLMAC
|
||||
|
||||
### Define the CPU directory
|
||||
CONTIKI_CPU=$(CONTIKI)/arch/cpu/native
|
||||
include $(CONTIKI)/arch/cpu/native/Makefile.native
|
||||
|
@ -42,5 +45,4 @@ CURSES_LIBS ?= -lncurses
|
|||
|
||||
TARGET_LIBFILES += $(CURSES_LIBS)
|
||||
|
||||
MODULES+=os/net os/net/mac os/net/mac/framer os/net/ip64-addr/ \
|
||||
os/net/mac/csma os/net/mac/nullmac
|
||||
MODULES+=os/net os/net/mac os/net/mac/framer os/net/ip64-addr/
|
||||
|
|
|
@ -68,10 +68,6 @@ typedef unsigned short uip_stats_t;
|
|||
|
||||
#if NETSTACK_CONF_WITH_IPV6
|
||||
|
||||
#ifndef NETSTACK_CONF_MAC
|
||||
#define NETSTACK_CONF_MAC nullmac_driver
|
||||
#endif /* NETSTACK_CONF_MAC */
|
||||
|
||||
#ifndef NETSTACK_CONF_RADIO
|
||||
#define NETSTACK_CONF_RADIO nullradio_driver
|
||||
#endif /* NETSTACK_CONF_RADIO */
|
||||
|
|
|
@ -24,9 +24,11 @@ CLEAN += *.nrf52dk
|
|||
### Unless the example dictates otherwise, build with code size optimisations switched off
|
||||
SMALL ?= 0
|
||||
|
||||
# Custom MAC layer for BLE (ble_ipsp_mac_driver)
|
||||
MAKE_MAC = MAKE_MAC_OTHER
|
||||
|
||||
### Define the CPU directory and pull in the correct CPU makefile.
|
||||
CONTIKI_CPU=$(CONTIKI)/arch/cpu/nrf52832
|
||||
include $(CONTIKI_CPU)/Makefile.nrf52832
|
||||
|
||||
MODULES += os/net os/net/mac os/net/mac/framer \
|
||||
os/net/mac/csma os/net/mac/nullmac
|
||||
MODULES += os/net os/net/mac os/net/mac/framer
|
||||
|
|
|
@ -56,9 +56,8 @@
|
|||
* @{
|
||||
*/
|
||||
|
||||
#ifndef NETSTACK_CONF_MAC
|
||||
#define NETSTACK_CONF_MAC ble_ipsp_mac_driver
|
||||
#endif /* NETSTACK_CONF_MAC */
|
||||
/* Selected in netstack.h because our Makefile sets MAKE_MAC = MAKE_MAC_OTHER */
|
||||
#define NETSTACK_CONF_OTHER_MAC ble_ipsp_mac_driver
|
||||
|
||||
/* 6LoWPAN */
|
||||
#define SICSLOWPAN_CONF_MAC_MAX_PAYLOAD 1280
|
||||
|
|
|
@ -27,7 +27,6 @@ CONTIKI_CPU=$(CONTIKI)/arch/cpu/cc2538
|
|||
include $(CONTIKI_CPU)/Makefile.cc2538
|
||||
|
||||
MODULES += os/net os/net/mac os/net/mac/framer \
|
||||
os/net/mac/csma os/net/mac/nullmac \
|
||||
os/storage/cfs
|
||||
|
||||
PYTHON = python
|
||||
|
|
|
@ -96,6 +96,10 @@ typedef uint32_t rtimer_clock_t;
|
|||
*/
|
||||
#define TSCH_CONF_BASE_DRIFT_PPM -977
|
||||
#endif
|
||||
|
||||
#if MAC_CONF_WITH_TSCH
|
||||
#define TSCH_CONF_HW_FRAME_FILTERING 0
|
||||
#endif /* MAC_CONF_WITH_TSCH */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/**
|
||||
* \name Serial Boot Loader Backdoor configuration
|
||||
|
|
|
@ -7,6 +7,5 @@ CONTIKI_TARGET_SOURCEFILES += contiki-sky-platform.c \
|
|||
include $(CONTIKI)/arch/platform/sky/Makefile.common
|
||||
|
||||
MODULES += os/net/mac os/net/mac/framer os/net \
|
||||
os/net/mac/csma os/net/mac/nullmac \
|
||||
arch/dev/cc2420 arch/dev/sht11 arch/dev/ds2411 \
|
||||
os/storage/cfs
|
||||
|
|
|
@ -289,7 +289,7 @@ main(int argc, char **argv)
|
|||
NETSTACK_NETWORK.init();
|
||||
|
||||
PRINTF("%s, radio channel %u\n",
|
||||
NETSTACK_MAC.name CC2420_CONF_CHANNEL);
|
||||
NETSTACK_MAC.name, CC2420_CONF_CHANNEL);
|
||||
#endif /* NETSTACK_CONF_WITH_IPV6 */
|
||||
|
||||
#if !NETSTACK_CONF_WITH_IPV6
|
||||
|
|
|
@ -99,8 +99,14 @@ typedef long off_t;
|
|||
|
||||
/* DCO speed resynchronization for more robust UART, etc. */
|
||||
#ifndef DCOSYNCH_CONF_ENABLED
|
||||
#define DCOSYNCH_CONF_ENABLED 1
|
||||
#define DCOSYNCH_CONF_ENABLED (!(MAC_CONF_WITH_TSCH)) /* TSCH needs timerB
|
||||
for SFD timestamping */
|
||||
#endif /* DCOSYNCH_CONF_ENABLED */
|
||||
|
||||
#ifndef CC2420_CONF_SFD_TIMESTAMPS
|
||||
#define CC2420_CONF_SFD_TIMESTAMPS (MAC_CONF_WITH_TSCH) /* TSCH needs SFD timestamping */
|
||||
#endif /* CC2420_CONF_SFD_TIMESTAMPS */
|
||||
|
||||
#ifndef DCOSYNCH_CONF_PERIOD
|
||||
#define DCOSYNCH_CONF_PERIOD 30
|
||||
#endif /* DCOSYNCH_CONF_PERIOD */
|
||||
|
|
|
@ -32,5 +32,4 @@ SMALL ?= 0
|
|||
CONTIKI_CPU=$(CONTIKI)/arch/cpu/cc26xx-cc13xx
|
||||
include $(CONTIKI_CPU)/Makefile.$(CPU_FAMILY)
|
||||
|
||||
MODULES += os/net os/net/mac os/net/mac/framer \
|
||||
os/net/mac/csma os/net/mac/nullmac
|
||||
MODULES += os/net os/net/mac os/net/mac/framer
|
||||
|
|
|
@ -46,7 +46,6 @@ CONTIKI_CPU=$(CONTIKI)/arch/cpu/cc2538
|
|||
include $(CONTIKI_CPU)/Makefile.cc2538
|
||||
|
||||
MODULES += os/net os/net/mac os/net/mac/framer \
|
||||
os/net/mac/csma os/net/mac/nullmac \
|
||||
arch/dev/cc1200 \
|
||||
os/storage/cfs
|
||||
|
||||
|
|
|
@ -94,6 +94,10 @@ typedef uint32_t rtimer_clock_t;
|
|||
*/
|
||||
#define TSCH_CONF_BASE_DRIFT_PPM -977
|
||||
#endif
|
||||
|
||||
#if MAC_CONF_WITH_TSCH
|
||||
#define TSCH_CONF_HW_FRAME_FILTERING 0
|
||||
#endif /* MAC_CONF_WITH_TSCH */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/**
|
||||
* \name Serial Boot Loader Backdoor configuration
|
||||
|
|
|
@ -3,6 +3,8 @@ PROJECT_SOURCEFILES += test-sf.c
|
|||
|
||||
CONTIKI = ../../../
|
||||
CFLAGS += -DPROJECT_CONF_H=\"project-conf.h\"
|
||||
MODULES += os/net/mac/tsch os/net/mac/tsch/sixtop
|
||||
|
||||
MAKE_MAC = MAKE_MAC_TSCH
|
||||
MODULES += os/net/mac/tsch/sixtop
|
||||
|
||||
include $(CONTIKI)/Makefile.include
|
||||
|
|
|
@ -42,8 +42,6 @@
|
|||
#error "This example is intended to be used for Cooja mote."
|
||||
#endif /* CONTIKI_TARGET_COOJA */
|
||||
|
||||
#define NETSTACK_CONF_MAC tschmac_driver
|
||||
|
||||
#define TSCH_CONF_WITH_SIXTOP 1
|
||||
#define TSCH_LOG_CONF_LEVEL 2
|
||||
#define TSCH_CONF_AUTOSTART 1
|
||||
|
|
|
@ -2,7 +2,6 @@ all: http-example
|
|||
CONTIKI=../..
|
||||
MODULES += os/net/app-layer/http-socket
|
||||
|
||||
CONTIKI_WITH_IPV6 = 1
|
||||
CONTIKI_WITH_RPL_LITE = 0
|
||||
CFLAGS += -DUIP_CONF_TCP=1
|
||||
include $(CONTIKI)/Makefile.include
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
all: ip64-router
|
||||
CONTIKI=../..
|
||||
|
||||
CONTIKI_WITH_IPV6 = 1
|
||||
CONTIKI_WITH_RPL_LITE = 0
|
||||
CFLAGS += -DUIP_CONF_TCP=1
|
||||
include $(CONTIKI)/Makefile.include
|
||||
|
|
|
@ -11,7 +11,6 @@ MODULES += os/services/lwm2m
|
|||
MODULES += os/services/ipso-objects
|
||||
|
||||
CONTIKI=../..
|
||||
CONTIKI_WITH_IPV6 = 1
|
||||
include $(CONTIKI)/Makefile.include
|
||||
|
||||
# border router rules
|
||||
|
|
|
@ -27,7 +27,6 @@ MODULES += os/net/app-layer/coap
|
|||
#CUSTOM_RULE_C_TO_OBJECTDIR_O = 1
|
||||
#CUSTOM_RULE_S_TO_OBJECTDIR_O = 1
|
||||
|
||||
CONTIKI_WITH_IPV6 = 1
|
||||
include $(CONTIKI)/Makefile.include
|
||||
|
||||
# optional rules to get assembly
|
||||
|
|
|
@ -23,5 +23,4 @@ ifneq ($(TARGET),)
|
|||
all: websense-$(TARGET)
|
||||
endif
|
||||
|
||||
CONTIKI_WITH_IPV6 = 1
|
||||
include $(CONTIKI)/Makefile.include
|
||||
|
|
|
@ -7,6 +7,5 @@ CONTIKI = ../../..
|
|||
|
||||
MODULES += os/net/ipv6/multicast
|
||||
|
||||
CONTIKI_WITH_IPV6 = 1
|
||||
CONTIKI_WITH_RPL_LITE = 1
|
||||
include $(CONTIKI)/Makefile.include
|
||||
|
|
|
@ -17,7 +17,8 @@ MODULES += $(WITH_WEBSERVER)
|
|||
CFLAGS += -DWEBSERVER=2
|
||||
endif
|
||||
|
||||
CONTIKI_WITH_IPV6 = 1
|
||||
# Custom MAC layer (border_router_mac_driver)
|
||||
MAKE_MAC = MAKE_MAC_OTHER
|
||||
include $(CONTIKI)/Makefile.include
|
||||
|
||||
connect-router: border-router.native
|
||||
|
|
|
@ -42,8 +42,8 @@
|
|||
|
||||
#define CMD_CONF_OUTPUT border_router_cmd_output
|
||||
|
||||
#undef NETSTACK_CONF_MAC
|
||||
#define NETSTACK_CONF_MAC border_router_mac_driver
|
||||
/* Selected in netstack.h because our Makefile sets MAKE_MAC = MAKE_MAC_OTHER */
|
||||
#define NETSTACK_CONF_OTHER_MAC border_router_mac_driver
|
||||
|
||||
/* used by wpcap (see /cpu/native/net/wpcap-drv.c) */
|
||||
#define SELECT_CALLBACK 1
|
||||
|
|
|
@ -30,7 +30,6 @@ ifeq ($(PREFIX),)
|
|||
PREFIX = fd00::1/64
|
||||
endif
|
||||
|
||||
CONTIKI_WITH_IPV6 = 1
|
||||
include $(CONTIKI)/Makefile.include
|
||||
|
||||
$(CONTIKI)/tools/tunslip6: $(CONTIKI)/tools/tunslip6.c
|
||||
|
|
|
@ -3,13 +3,7 @@ CONTIKI=../../..
|
|||
|
||||
CFLAGS += -DPROJECT_CONF_H=\"project-conf.h\"
|
||||
|
||||
WITH_TSCH ?= 0
|
||||
# Set MAKE_MAC = MAKE_MAC_TSCH to run TSCH instead
|
||||
MAKE_MAC = MAKE_MAC_CSMA
|
||||
|
||||
ifeq ($(WITH_TSCH),1)
|
||||
MODULES += os/net/mac/tsch
|
||||
endif
|
||||
CFLAGS += -DWITH_TSCH=$(WITH_TSCH)
|
||||
|
||||
CONTIKI_WITH_IPV6 = 1
|
||||
CONTIKI_WITH_RPL_LITE = 1
|
||||
include $(CONTIKI)/Makefile.include
|
||||
|
|
|
@ -148,9 +148,9 @@ PROCESS_THREAD(node_process, ev, data)
|
|||
etimer_set(&periodic, START_INTERVAL);
|
||||
PROCESS_WAIT_EVENT_UNTIL(etimer_expired(&periodic));
|
||||
|
||||
#if WITH_TSCH
|
||||
#if MAC_CONF_WITH_TSCH
|
||||
NETSTACK_MAC.on();
|
||||
#endif /* WITH_TSCH */
|
||||
#endif /* MAC_CONF_WITH_TSCH */
|
||||
|
||||
if(!uip_ip6addr_cmp(&destination_ipaddr, &node_ipaddr)) {
|
||||
/* Send data periodically */
|
||||
|
|
|
@ -46,31 +46,18 @@
|
|||
#undef SICSLOWPAN_CONF_FRAG
|
||||
#define SICSLOWPAN_CONF_FRAG 0
|
||||
|
||||
#if WITH_TSCH
|
||||
#if MAC_CONF_WITH_TSCH
|
||||
|
||||
/*******************************************************/
|
||||
/********************* Enable TSCH *********************/
|
||||
/********************* Configure TSCH *********************/
|
||||
/*******************************************************/
|
||||
|
||||
/* Netstack layers */
|
||||
#undef NETSTACK_CONF_MAC
|
||||
#define NETSTACK_CONF_MAC tschmac_driver
|
||||
|
||||
/* TSCH and RPL callbacks */
|
||||
#define RPL_CALLBACK_PARENT_SWITCH tsch_rpl_callback_parent_switch
|
||||
#define RPL_CALLBACK_NEW_DIO_INTERVAL tsch_rpl_callback_new_dio_interval
|
||||
#define TSCH_CALLBACK_JOINING_NETWORK tsch_rpl_callback_joining_network
|
||||
#define TSCH_CALLBACK_LEAVING_NETWORK tsch_rpl_callback_leaving_network
|
||||
|
||||
/* Needed for CC2538 platforms only */
|
||||
/* For TSCH we have to use the more accurate crystal oscillator
|
||||
* by default the RC oscillator is activated */
|
||||
#undef SYS_CTRL_CONF_OSC32K_USE_XTAL
|
||||
#define SYS_CTRL_CONF_OSC32K_USE_XTAL 1
|
||||
|
||||
#undef TSCH_CONF_HW_FRAME_FILTERING
|
||||
#define TSCH_CONF_HW_FRAME_FILTERING 0
|
||||
|
||||
/*******************************************************/
|
||||
/******************* Configure TSCH ********************/
|
||||
/*******************************************************/
|
||||
|
@ -91,6 +78,6 @@
|
|||
#undef TSCH_SCHEDULE_CONF_MAX_LINKS
|
||||
#define TSCH_SCHEDULE_CONF_MAX_LINKS 4
|
||||
|
||||
#endif /* WITH_TSCH */
|
||||
#endif /* MAC_CONF_WITH_TSCH */
|
||||
|
||||
#endif
|
||||
|
|
|
@ -5,10 +5,9 @@ PROJECT_SOURCEFILES += sf-simple.c
|
|||
CONTIKI=../../..
|
||||
CFLAGS += -DPROJECT_CONF_H=\"project-conf.h\"
|
||||
|
||||
CONTIKI_WITH_IPV6 = 1
|
||||
MAKE_WITH_SECURITY ?= 0 # force Security from command line
|
||||
|
||||
MODULES += os/net/mac/tsch
|
||||
MAKE_MAC = MAKE_MAC_TSCH
|
||||
MODULES += os/net/mac/tsch/sixtop
|
||||
|
||||
ifeq ($(MAKE_WITH_SECURITY),1)
|
||||
|
|
|
@ -51,18 +51,6 @@
|
|||
/********************* Enable TSCH *********************/
|
||||
/*******************************************************/
|
||||
|
||||
/* Netstack layers */
|
||||
#undef NETSTACK_CONF_MAC
|
||||
#define NETSTACK_CONF_MAC tschmac_driver
|
||||
#undef NETSTACK_CONF_RDC
|
||||
#define NETSTACK_CONF_RDC nordc_driver
|
||||
#undef NETSTACK_CONF_FRAMER
|
||||
#define NETSTACK_CONF_FRAMER framer_802154
|
||||
|
||||
/* IEEE802.15.4 frame version */
|
||||
#undef FRAME802154_CONF_VERSION
|
||||
#define FRAME802154_CONF_VERSION FRAME802154_IEEE802154_2015
|
||||
|
||||
/* TSCH and RPL callbacks */
|
||||
#define RPL_CALLBACK_PARENT_SWITCH tsch_rpl_callback_parent_switch
|
||||
#define RPL_CALLBACK_NEW_DIO_INTERVAL tsch_rpl_callback_new_dio_interval
|
||||
|
|
|
@ -4,12 +4,12 @@ all: $(CONTIKI_PROJECT)
|
|||
CONTIKI=../../..
|
||||
CFLAGS += -DPROJECT_CONF_H=\"project-conf.h\"
|
||||
|
||||
CONTIKI_WITH_IPV6 = 1
|
||||
MAKE_WITH_ORCHESTRA ?= 0 # force Orchestra from command line
|
||||
MAKE_WITH_SECURITY ?= 0 # force Security from command line
|
||||
MAKE_WITH_PERIODIC_ROUTES_PRINT ?= 0 # print #routes periodically, used for regression tests
|
||||
|
||||
MODULES += os/net/mac/tsch os/services/shell os/services/orchestra
|
||||
MAKE_MAC = MAKE_MAC_TSCH
|
||||
MODULES += os/services/shell os/services/orchestra
|
||||
|
||||
ifeq ($(MAKE_WITH_ORCHESTRA),1)
|
||||
CFLAGS += -DWITH_ORCHESTRA=1
|
||||
|
|
|
@ -58,13 +58,9 @@
|
|||
#define ORCHESTRA_CONF_RULES { &eb_per_time_source, &unicast_per_neighbor_rpl_ns, &default_common } /* Orchestra in non-storing */
|
||||
|
||||
/*******************************************************/
|
||||
/********************* Enable TSCH *********************/
|
||||
/********************* Configure TSCH *********************/
|
||||
/*******************************************************/
|
||||
|
||||
/* Netstack layers */
|
||||
#undef NETSTACK_CONF_MAC
|
||||
#define NETSTACK_CONF_MAC tschmac_driver
|
||||
|
||||
/* TSCH and RPL callbacks */
|
||||
#define RPL_CALLBACK_PARENT_SWITCH tsch_rpl_callback_parent_switch
|
||||
#define RPL_CALLBACK_NEW_DIO_INTERVAL tsch_rpl_callback_new_dio_interval
|
||||
|
@ -72,12 +68,6 @@
|
|||
#define TSCH_CALLBACK_JOINING_NETWORK tsch_rpl_callback_joining_network
|
||||
#define TSCH_CALLBACK_LEAVING_NETWORK tsch_rpl_callback_leaving_network
|
||||
|
||||
/* Needed for CC2538 platforms only */
|
||||
/* For TSCH we have to use the more accurate crystal oscillator
|
||||
* by default the RC oscillator is activated */
|
||||
#undef SYS_CTRL_CONF_OSC32K_USE_XTAL
|
||||
#define SYS_CTRL_CONF_OSC32K_USE_XTAL 1
|
||||
|
||||
#if WITH_SHELL
|
||||
/* Needed for CC2538 platforms, for serial */
|
||||
#define USB_SERIAL_CONF_ENABLE 1
|
||||
|
@ -90,14 +80,6 @@
|
|||
|
||||
#endif /* WITH_SHELL */
|
||||
|
||||
/* Needed for cc2420 platforms only */
|
||||
/* Disable DCO calibration (uses timerB) */
|
||||
#undef DCOSYNCH_CONF_ENABLED
|
||||
#define DCOSYNCH_CONF_ENABLED 0
|
||||
/* Enable SFD timestamps (uses timerB) */
|
||||
#undef CC2420_CONF_SFD_TIMESTAMPS
|
||||
#define CC2420_CONF_SFD_TIMESTAMPS 1
|
||||
|
||||
/*******************************************************/
|
||||
/******************* Configure TSCH ********************/
|
||||
/*******************************************************/
|
||||
|
@ -140,22 +122,6 @@
|
|||
/************* Other system configuration **************/
|
||||
/*******************************************************/
|
||||
|
||||
#if CONTIKI_TARGET_CC2538DK || CONTIKI_TARGET_ZOUL || \
|
||||
CONTIKI_TARGET_OPENMOTE_CC2538
|
||||
#define TSCH_CONF_HW_FRAME_FILTERING 0
|
||||
#endif /* CONTIKI_TARGET_CC2538DK || CONTIKI_TARGET_ZOUL \
|
||||
|| CONTIKI_TARGET_OPENMOTE_CC2538 */
|
||||
|
||||
#if CONTIKI_TARGET_COOJA
|
||||
#define COOJA_CONF_SIMULATE_TURNAROUND 0
|
||||
/* A bug in cooja causes many EBs to be missed at scan. Increase EB
|
||||
frequency to shorten the join process */
|
||||
#undef TSCH_CONF_EB_PERIOD
|
||||
#define TSCH_CONF_EB_PERIOD (4 * CLOCK_SECOND)
|
||||
#undef TSCH_CONF_MAX_EB_PERIOD
|
||||
#define TSCH_CONF_MAX_EB_PERIOD (4 * CLOCK_SECOND)
|
||||
#endif /* CONTIKI_TARGET_COOJA */
|
||||
|
||||
/* Logging */
|
||||
#define LOG_CONF_LEVEL_RPL LOG_LEVEL_INFO
|
||||
#define LOG_CONF_LEVEL_TCPIP LOG_LEVEL_WARN
|
||||
|
|
|
@ -8,5 +8,4 @@ ifdef PERIOD
|
|||
CFLAGS+=-DPERIOD=$(PERIOD)
|
||||
endif
|
||||
|
||||
CONTIKI_WITH_IPV6 = 1
|
||||
include $(CONTIKI)/Makefile.include
|
||||
|
|
|
@ -9,7 +9,7 @@ endif
|
|||
CONTIKI=../../..
|
||||
|
||||
CFLAGS += -DPROJECT_CONF_H=\"project-conf.h\"
|
||||
PROJECT_SOURCEFILES += slip-net.c no-framer.c
|
||||
PROJECT_SOURCEFILES += slip-net.c
|
||||
ifeq ($(TARGET),sky)
|
||||
PROJECT_SOURCEFILES += slip-radio-cc2420.c slip-radio-sky-sensors.c
|
||||
endif
|
||||
|
@ -17,6 +17,9 @@ ifeq ($(TARGET),nooliberry)
|
|||
PROJECT_SOURCEFILES += slip-radio-rf230.c
|
||||
endif
|
||||
|
||||
# custom net layer, but with IPv6 enabled
|
||||
MAKE_NET = MAKE_NET_OTHER
|
||||
CFLAGS += -DNETSTACK_CONF_WITH_IPV6=1
|
||||
CONTIKI_WITH_RPL = 0
|
||||
CONTIKI_WITH_IPV6 = 1
|
||||
MODULES += os/net/ipv6 os/net/ip
|
||||
include $(CONTIKI)/Makefile.include
|
||||
|
|
|
@ -52,9 +52,9 @@
|
|||
#define CMD_CONF_HANDLERS slip_radio_cmd_handler
|
||||
#endif
|
||||
|
||||
/* configuration for the slipradio/network driver */
|
||||
#undef NETSTACK_CONF_NETWORK
|
||||
#define NETSTACK_CONF_NETWORK slipnet_driver
|
||||
/* Configuration for the slipradio/network driver. Selected through the Makefile,
|
||||
with MAKE_NET = MAKE_NET_OTHER */
|
||||
#define NETSTACK_CONF_OTHER_NETWORK slipnet_driver
|
||||
|
||||
#undef NETSTACK_CONF_FRAMER
|
||||
#define NETSTACK_CONF_FRAMER no_framer
|
||||
|
|
|
@ -53,8 +53,7 @@ extern const struct slip_radio_sensors SLIP_RADIO_CONF_SENSORS;
|
|||
#endif
|
||||
|
||||
void slip_send_packet(const uint8_t *ptr, int len);
|
||||
void no_framer_parse_802154_frame(void);
|
||||
|
||||
|
||||
/* max 16 packets at the same time??? */
|
||||
uint8_t packet_ids[16];
|
||||
int packet_pos;
|
||||
|
@ -73,6 +72,45 @@ CMD_HANDLERS(CMD_CONF_HANDLERS);
|
|||
#else
|
||||
CMD_HANDLERS(slip_radio_cmd_handler);
|
||||
#endif
|
||||
|
||||
static const uint16_t mac_src_pan_id = IEEE802154_PANID;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static int
|
||||
is_broadcast_addr(uint8_t mode, uint8_t *addr)
|
||||
{
|
||||
int i = mode == FRAME802154_SHORTADDRMODE ? 2 : 8;
|
||||
while(i-- > 0) {
|
||||
if(addr[i] != 0xff) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static int
|
||||
parse_frame(void)
|
||||
{
|
||||
frame802154_t frame;
|
||||
int len;
|
||||
len = packetbuf_datalen();
|
||||
if(frame802154_parse(packetbuf_dataptr(), len, &frame)) {
|
||||
if(frame.fcf.dest_addr_mode) {
|
||||
if(frame.dest_pid != mac_src_pan_id &&
|
||||
frame.dest_pid != FRAME802154_BROADCASTPANDID) {
|
||||
/* Packet to another PAN */
|
||||
return 0;
|
||||
}
|
||||
if(!is_broadcast_addr(frame.fcf.dest_addr_mode, frame.dest_addr)) {
|
||||
packetbuf_set_addr(PACKETBUF_ADDR_RECEIVER, (linkaddr_t *)&frame.dest_addr);
|
||||
}
|
||||
}
|
||||
packetbuf_set_addr(PACKETBUF_ADDR_SENDER, (linkaddr_t *)&frame.src_addr);
|
||||
packetbuf_set_attr(PACKETBUF_ATTR_MAC_SEQNO, frame.seq);
|
||||
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static void
|
||||
packet_sent(void *ptr, int status, int transmissions)
|
||||
|
@ -123,7 +161,7 @@ slip_radio_cmd_handler(const uint8_t *data, int len)
|
|||
data[2], packetbuf_datalen());
|
||||
|
||||
/* parse frame before sending to get addresses, etc. */
|
||||
no_framer_parse_802154_frame();
|
||||
parse_frame();
|
||||
NETSTACK_MAC.send(packet_sent, &packet_ids[packet_pos]);
|
||||
|
||||
packet_pos++;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
all: udp-server udp-client
|
||||
|
||||
CONTIKI = ../../..
|
||||
CONTIKI_WITH_IPV6 = 1
|
||||
CFLAGS += -DUIP_CONF_ND6_SEND_NS=1
|
||||
include $(CONTIKI)/Makefile.include
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
CONTIKI_PROJECT = nullnet-unicast nullnet-broadcast
|
||||
all: $(CONTIKI_PROJECT)
|
||||
|
||||
CONTIKI = ../..
|
||||
|
||||
#use this to enable TSCH: MAKE_MAC = MAKE_MAC_TSCH
|
||||
MAKE_MAC ?= MAKE_MAC_CSMA
|
||||
MAKE_NET = MAKE_NET_NULLNET
|
||||
include $(CONTIKI)/Makefile.include
|
|
@ -0,0 +1,99 @@
|
|||
/*
|
||||
* Copyright (c) 2017, RISE SICS.
|
||||
* 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.
|
||||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file
|
||||
* NullNet broadcast example
|
||||
* \author
|
||||
* Simon Duquennoy <simon.duquennoy@ri.se>
|
||||
*
|
||||
*/
|
||||
|
||||
#include "contiki.h"
|
||||
#include "net/netstack.h"
|
||||
#include "net/nullnet/nullnet.h"
|
||||
|
||||
#include <stdio.h> /* For printf() */
|
||||
|
||||
/* Log configuration */
|
||||
#include "sys/log.h"
|
||||
#define LOG_MODULE "App"
|
||||
#define LOG_LEVEL LOG_LEVEL_INFO
|
||||
|
||||
/* Configuration */
|
||||
#define SEND_INTERVAL (8 * CLOCK_SECOND)
|
||||
|
||||
#if MAC_CONF_WITH_TSCH
|
||||
#include "net/mac/tsch/tsch.h"
|
||||
static linkaddr_t coordinator_addr = {{ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }};
|
||||
#endif /* MAC_CONF_WITH_TSCH */
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
PROCESS(nullnet_example_process, "NullNet broadcast example");
|
||||
AUTOSTART_PROCESSES(&nullnet_example_process);
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void input_callback(const void *data, uint16_t len,
|
||||
const linkaddr_t *src, const linkaddr_t *dest)
|
||||
{
|
||||
LOG_INFO("Received %u from ", *(unsigned *)data);
|
||||
LOG_INFO_LLADDR(src);
|
||||
LOG_INFO_("\n");
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
PROCESS_THREAD(nullnet_example_process, ev, data)
|
||||
{
|
||||
static struct etimer periodic_timer;
|
||||
static unsigned count = 0;
|
||||
|
||||
PROCESS_BEGIN();
|
||||
|
||||
#if MAC_CONF_WITH_TSCH
|
||||
tsch_set_coordinator(linkaddr_cmp(&coordinator_addr, &linkaddr_node_addr));
|
||||
#endif /* MAC_CONF_WITH_TSCH */
|
||||
|
||||
nullnet_set_input_callback(input_callback);
|
||||
|
||||
etimer_set(&periodic_timer, SEND_INTERVAL);
|
||||
while(1) {
|
||||
PROCESS_WAIT_EVENT_UNTIL(etimer_expired(&periodic_timer));
|
||||
LOG_INFO("Sending %u to ", count);
|
||||
LOG_INFO_LLADDR(NULL);
|
||||
LOG_INFO_("\n");
|
||||
nullnet_output(&count, sizeof(count), NULL);
|
||||
count++;
|
||||
etimer_reset(&periodic_timer);
|
||||
}
|
||||
|
||||
PROCESS_END();
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
|
@ -0,0 +1,179 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<simconf>
|
||||
<project EXPORT="discard">[APPS_DIR]/mrm</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/mspsim</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/avrora</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/serial_socket</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/collect-view</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/powertracker</project>
|
||||
<simulation>
|
||||
<title>NullNet Broadcast Example</title>
|
||||
<randomseed>123456</randomseed>
|
||||
<motedelay_us>1000000</motedelay_us>
|
||||
<radiomedium>
|
||||
org.contikios.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>
|
||||
org.contikios.cooja.contikimote.ContikiMoteType
|
||||
<identifier>mtype928</identifier>
|
||||
<description>Cooja Mote Type #1</description>
|
||||
<source>[CONTIKI_DIR]/examples/nullnet/nullnet-broadcast.c</source>
|
||||
<commands>make nullnet-broadcast.cooja TARGET=cooja</commands>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Position</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Battery</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiVib</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiMoteID</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiRS232</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiBeeper</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.RimeAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiIPAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiRadio</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiButton</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiPIR</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiClock</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiLED</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiCFS</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiEEPROM</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.MoteAttributes</moteinterface>
|
||||
<symbols>false</symbols>
|
||||
</motetype>
|
||||
<mote>
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>41.086521947449974</x>
|
||||
<y>65.60589922041163</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
||||
<id>1</id>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
||||
<bitrate>250.0</bitrate>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiEEPROM
|
||||
<eeprom>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==</eeprom>
|
||||
</interface_config>
|
||||
<motetype_identifier>mtype928</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>28.458497515673685</x>
|
||||
<y>52.43866085432446</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
||||
<id>2</id>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
||||
<bitrate>250.0</bitrate>
|
||||
</interface_config>
|
||||
<interface_config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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==</eeprom>
|
||||
</interface_config>
|
||||
<motetype_identifier>mtype928</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>6.830522087791668</x>
|
||||
<y>77.15936959931379</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
||||
<id>3</id>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
||||
<bitrate>250.0</bitrate>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiEEPROM
|
||||
<eeprom>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==</eeprom>
|
||||
</interface_config>
|
||||
<motetype_identifier>mtype928</motetype_identifier>
|
||||
</mote>
|
||||
</simulation>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.SimControl
|
||||
<width>280</width>
|
||||
<z>4</z>
|
||||
<height>160</height>
|
||||
<location_x>400</location_x>
|
||||
<location_y>0</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.Visualizer
|
||||
<plugin_config>
|
||||
<moterelations>true</moterelations>
|
||||
<skin>org.contikios.cooja.plugins.skins.IDVisualizerSkin</skin>
|
||||
<skin>org.contikios.cooja.plugins.skins.UDGMVisualizerSkin</skin>
|
||||
<viewport>6.180735450568881 0.0 0.0 6.180735450568881 49.41871362245591 -238.19717905203652</viewport>
|
||||
</plugin_config>
|
||||
<width>400</width>
|
||||
<z>3</z>
|
||||
<height>400</height>
|
||||
<location_x>1</location_x>
|
||||
<location_y>1</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.LogListener
|
||||
<plugin_config>
|
||||
<filter />
|
||||
<formatted_time />
|
||||
<coloring />
|
||||
</plugin_config>
|
||||
<width>1179</width>
|
||||
<z>1</z>
|
||||
<height>704</height>
|
||||
<location_x>679</location_x>
|
||||
<location_y>0</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.TimeLine
|
||||
<plugin_config>
|
||||
<mote>0</mote>
|
||||
<mote>1</mote>
|
||||
<mote>2</mote>
|
||||
<showRadioRXTX />
|
||||
<showRadioHW />
|
||||
<showLEDs />
|
||||
<zoomfactor>1.7067792216977151</zoomfactor>
|
||||
</plugin_config>
|
||||
<width>1858</width>
|
||||
<z>0</z>
|
||||
<height>166</height>
|
||||
<location_x>9</location_x>
|
||||
<location_y>723</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.RadioLogger
|
||||
<plugin_config>
|
||||
<split>150</split>
|
||||
<formatted_time />
|
||||
<showdups>false</showdups>
|
||||
<hidenodests>false</hidenodests>
|
||||
</plugin_config>
|
||||
<width>500</width>
|
||||
<z>2</z>
|
||||
<height>300</height>
|
||||
<location_x>19</location_x>
|
||||
<location_y>409</location_y>
|
||||
</plugin>
|
||||
</simconf>
|
||||
|
|
@ -0,0 +1,102 @@
|
|||
/*
|
||||
* Copyright (c) 2017, RISE SICS.
|
||||
* 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.
|
||||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file
|
||||
* NullNet unicast example
|
||||
* \author
|
||||
* Simon Duquennoy <simon.duquennoy@ri.se>
|
||||
*
|
||||
*/
|
||||
|
||||
#include "contiki.h"
|
||||
#include "net/netstack.h"
|
||||
#include "net/nullnet/nullnet.h"
|
||||
|
||||
#include <stdio.h> /* For printf() */
|
||||
|
||||
/* Log configuration */
|
||||
#include "sys/log.h"
|
||||
#define LOG_MODULE "App"
|
||||
#define LOG_LEVEL LOG_LEVEL_INFO
|
||||
|
||||
/* Configuration */
|
||||
#define SEND_INTERVAL (8 * CLOCK_SECOND)
|
||||
static linkaddr_t dest_addr = {{ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }};
|
||||
|
||||
#if MAC_CONF_WITH_TSCH
|
||||
#include "net/mac/tsch/tsch.h"
|
||||
static linkaddr_t coordinator_addr = {{ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }};
|
||||
#endif /* MAC_CONF_WITH_TSCH */
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
PROCESS(nullnet_example_process, "NullNet unicast example");
|
||||
AUTOSTART_PROCESSES(&nullnet_example_process);
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void input_callback(const void *data, uint16_t len,
|
||||
const linkaddr_t *src, const linkaddr_t *dest)
|
||||
{
|
||||
LOG_INFO("Received %u from ", *(unsigned *)data);
|
||||
LOG_INFO_LLADDR(src);
|
||||
LOG_INFO_("\n");
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
PROCESS_THREAD(nullnet_example_process, ev, data)
|
||||
{
|
||||
static struct etimer periodic_timer;
|
||||
static unsigned count = 0;
|
||||
|
||||
PROCESS_BEGIN();
|
||||
|
||||
#if MAC_CONF_WITH_TSCH
|
||||
tsch_set_coordinator(linkaddr_cmp(&coordinator_addr, &linkaddr_node_addr));
|
||||
#endif /* MAC_CONF_WITH_TSCH */
|
||||
|
||||
nullnet_set_input_callback(input_callback);
|
||||
|
||||
if(!linkaddr_cmp(&dest_addr, &linkaddr_node_addr)) {
|
||||
etimer_set(&periodic_timer, SEND_INTERVAL);
|
||||
while(1) {
|
||||
PROCESS_WAIT_EVENT_UNTIL(etimer_expired(&periodic_timer));
|
||||
LOG_INFO("Sending %u to ", count);
|
||||
LOG_INFO_LLADDR(&dest_addr);
|
||||
LOG_INFO_("\n");
|
||||
nullnet_output(&count, sizeof(count), &dest_addr);
|
||||
count++;
|
||||
etimer_reset(&periodic_timer);
|
||||
}
|
||||
}
|
||||
|
||||
PROCESS_END();
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
|
@ -0,0 +1,179 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<simconf>
|
||||
<project EXPORT="discard">[APPS_DIR]/mrm</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/mspsim</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/avrora</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/serial_socket</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/collect-view</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/powertracker</project>
|
||||
<simulation>
|
||||
<title>NullNet Broadcast Example</title>
|
||||
<randomseed>123456</randomseed>
|
||||
<motedelay_us>1000000</motedelay_us>
|
||||
<radiomedium>
|
||||
org.contikios.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>
|
||||
org.contikios.cooja.contikimote.ContikiMoteType
|
||||
<identifier>mtype634</identifier>
|
||||
<description>Cooja Mote Type #1</description>
|
||||
<source>[CONTIKI_DIR]/examples/nullnet/nullnet-broadcast.c</source>
|
||||
<commands>make nullnet-broadcast.cooja TARGET=cooja</commands>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Position</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Battery</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiVib</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiMoteID</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiRS232</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiBeeper</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.RimeAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiIPAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiRadio</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiButton</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiPIR</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiClock</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiLED</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiCFS</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiEEPROM</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.MoteAttributes</moteinterface>
|
||||
<symbols>false</symbols>
|
||||
</motetype>
|
||||
<mote>
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>41.086521947449974</x>
|
||||
<y>65.60589922041163</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
||||
<id>1</id>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
||||
<bitrate>250.0</bitrate>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiEEPROM
|
||||
<eeprom>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==</eeprom>
|
||||
</interface_config>
|
||||
<motetype_identifier>mtype634</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>28.458497515673685</x>
|
||||
<y>52.43866085432446</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
||||
<id>2</id>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
||||
<bitrate>250.0</bitrate>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiEEPROM
|
||||
<eeprom>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==</eeprom>
|
||||
</interface_config>
|
||||
<motetype_identifier>mtype634</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>6.830522087791668</x>
|
||||
<y>77.15936959931379</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
||||
<id>3</id>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
||||
<bitrate>250.0</bitrate>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiEEPROM
|
||||
<eeprom>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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||||
</interface_config>
|
||||
<motetype_identifier>mtype634</motetype_identifier>
|
||||
</mote>
|
||||
</simulation>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.SimControl
|
||||
<width>280</width>
|
||||
<z>4</z>
|
||||
<height>160</height>
|
||||
<location_x>400</location_x>
|
||||
<location_y>0</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.Visualizer
|
||||
<plugin_config>
|
||||
<moterelations>true</moterelations>
|
||||
<skin>org.contikios.cooja.plugins.skins.IDVisualizerSkin</skin>
|
||||
<skin>org.contikios.cooja.plugins.skins.UDGMVisualizerSkin</skin>
|
||||
<viewport>6.180735450568881 0.0 0.0 6.180735450568881 49.41871362245591 -238.19717905203652</viewport>
|
||||
</plugin_config>
|
||||
<width>400</width>
|
||||
<z>1</z>
|
||||
<height>400</height>
|
||||
<location_x>1</location_x>
|
||||
<location_y>1</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.LogListener
|
||||
<plugin_config>
|
||||
<filter />
|
||||
<formatted_time />
|
||||
<coloring />
|
||||
</plugin_config>
|
||||
<width>1179</width>
|
||||
<z>0</z>
|
||||
<height>704</height>
|
||||
<location_x>679</location_x>
|
||||
<location_y>0</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.TimeLine
|
||||
<plugin_config>
|
||||
<mote>0</mote>
|
||||
<mote>1</mote>
|
||||
<mote>2</mote>
|
||||
<showRadioRXTX />
|
||||
<showRadioHW />
|
||||
<showLEDs />
|
||||
<zoomfactor>1.7067792216977151</zoomfactor>
|
||||
</plugin_config>
|
||||
<width>1858</width>
|
||||
<z>3</z>
|
||||
<height>166</height>
|
||||
<location_x>9</location_x>
|
||||
<location_y>723</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.RadioLogger
|
||||
<plugin_config>
|
||||
<split>150</split>
|
||||
<formatted_time />
|
||||
<showdups>false</showdups>
|
||||
<hidenodests>false</hidenodests>
|
||||
</plugin_config>
|
||||
<width>500</width>
|
||||
<z>2</z>
|
||||
<height>300</height>
|
||||
<location_x>109</location_x>
|
||||
<location_y>408</location_y>
|
||||
</plugin>
|
||||
</simconf>
|
||||
|
|
@ -2,7 +2,6 @@ DEFINES+=PROJECT_CONF_H=\"project-conf.h\"
|
|||
|
||||
all: mqtt-demo
|
||||
|
||||
CONTIKI_WITH_IPV6 = 1
|
||||
|
||||
MODULES += os/net/app-layer/mqtt
|
||||
|
||||
|
|
|
@ -3,6 +3,5 @@ CONTIKI_PROJECT = udp-echo-server
|
|||
all: $(CONTIKI_PROJECT)
|
||||
|
||||
CONTIKI = ../../../..
|
||||
CONTIKI_WITH_IPV6 = 1
|
||||
CFLAGS += -DUIP_CONF_ND6_SEND_NS=1
|
||||
include $(CONTIKI)/Makefile.include
|
||||
|
|
|
@ -3,7 +3,5 @@ CONTIKI_PROJECT = cc26xx-demo
|
|||
|
||||
all: $(CONTIKI_PROJECT)
|
||||
|
||||
CONTIKI_WITH_IPV6 = 1
|
||||
|
||||
CONTIKI = ../../..
|
||||
include $(CONTIKI)/Makefile.include
|
||||
|
|
|
@ -13,8 +13,6 @@ PROJECT_SOURCEFILES += $(REST_RESOURCES_FILES)
|
|||
PROJECT_SOURCEFILES += cetic-6lbr-client.c coap-server.c net-uart.c mqtt-client.c
|
||||
PROJECT_SOURCEFILES += httpd-simple.c
|
||||
|
||||
CONTIKI_WITH_IPV6 = 1
|
||||
|
||||
# REST Engine shall use Erbium CoAP implementation
|
||||
MODULES += os/net/app-layer/mqtt
|
||||
MODULES += os/net/app-layer/coap
|
||||
|
|
|
@ -3,8 +3,6 @@ CONTIKI_PROJECT = very-sleepy-demo
|
|||
|
||||
all: $(CONTIKI_PROJECT)
|
||||
|
||||
CONTIKI_WITH_IPV6 = 1
|
||||
|
||||
MODULES += os/net/app-layer/coap
|
||||
|
||||
CONTIKI = ../../../..
|
||||
|
|
|
@ -5,9 +5,7 @@ TARGET ?= jn516x
|
|||
|
||||
CONTIKI=../../../../..
|
||||
|
||||
CONTIKI_WITH_IPV6 = 1
|
||||
|
||||
MODULES += os/net/mac/tsch
|
||||
MAKE_MAC = MAKE_MAC_TSCH
|
||||
PROJECTDIRS += .. ../tools
|
||||
PROJECT_SOURCEFILES += rpl-tools.c
|
||||
CFLAGS += -DPROJECT_CONF_H=\"project-conf.h\"
|
||||
|
|
|
@ -6,9 +6,8 @@ JN516x_WITH_DONGLE = 1
|
|||
|
||||
CONTIKI=../../../../..
|
||||
|
||||
CONTIKI_WITH_IPV6 = 1
|
||||
|
||||
MODULES += os/net/mac/tsch os/lib/json
|
||||
MAKE_MAC = MAKE_MAC_TSCH
|
||||
MODULES += os/lib/json
|
||||
PROJECTDIRS += .. ../tools
|
||||
PROJECT_SOURCEFILES += rpl-tools.c
|
||||
CFLAGS += -DPROJECT_CONF_H=\"project-conf.h\"
|
||||
|
|
|
@ -6,9 +6,8 @@ JN516x_WITH_DR1175 = 1
|
|||
|
||||
CONTIKI=../../../../..
|
||||
|
||||
CONTIKI_WITH_IPV6 = 1
|
||||
|
||||
MODULES += os/net/mac/tsch os/lib/json
|
||||
MAKE_MAC = MAKE_MAC_TSCH
|
||||
MODULES += os/lib/json
|
||||
PROJECTDIRS += .. ../tools
|
||||
PROJECT_SOURCEFILES += rpl-tools.c
|
||||
CFLAGS += -DPROJECT_CONF_H=\"project-conf.h\"
|
||||
|
|
|
@ -6,9 +6,8 @@ JN516x_WITH_DR1199 = 1
|
|||
|
||||
CONTIKI=../../../../..
|
||||
|
||||
CONTIKI_WITH_IPV6 = 1
|
||||
|
||||
MODULES += os/net/mac/tsch os/lib/json
|
||||
MAKE_MAC = MAKE_MAC_TSCH
|
||||
MODULES += os/lib/json
|
||||
PROJECTDIRS += .. ../tools
|
||||
PROJECT_SOURCEFILES += rpl-tools.c
|
||||
CFLAGS += -DPROJECT_CONF_H=\"project-conf.h\"
|
||||
|
|
|
@ -39,9 +39,6 @@
|
|||
/* Select a MAC configuration */
|
||||
#define MAC_CONFIG MAC_CONFIG_TSCH
|
||||
|
||||
#undef NETSTACK_CONF_MAC
|
||||
#undef NETSTACK_CONF_FRAMER
|
||||
|
||||
#if MAC_CONFIG == MAC_CONFIG_CSMA
|
||||
|
||||
#elif MAC_CONFIG == MAC_CONFIG_TSCH
|
||||
|
@ -56,8 +53,6 @@
|
|||
#define WITH_SECURITY 0
|
||||
#endif /* WITH_SECURITY */
|
||||
|
||||
#define NETSTACK_CONF_MAC tschmac_driver
|
||||
|
||||
/* TSCH and RPL callbacks */
|
||||
#define RPL_CALLBACK_PARENT_SWITCH tsch_rpl_callback_parent_switch
|
||||
#define RPL_CALLBACK_NEW_DIO_INTERVAL tsch_rpl_callback_new_dio_interval
|
||||
|
|
|
@ -5,9 +5,7 @@ TARGET ?= jn516x
|
|||
|
||||
CONTIKI=../../../../..
|
||||
|
||||
CONTIKI_WITH_IPV6 = 1
|
||||
|
||||
MODULES += os/net/mac/tsch
|
||||
MAKE_MAC = MAKE_MAC_TSCH
|
||||
PROJECTDIRS += .. ../tools
|
||||
PROJECT_SOURCEFILES += rpl-tools.c
|
||||
CFLAGS += -DPROJECT_CONF_H=\"project-conf.h\"
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
|
||||
/* Global config flags */
|
||||
|
||||
#define WITH_TSCH 1
|
||||
#define WITH_TSCH_SECURITY 0
|
||||
#define TSCH_LOG_CONF_PER_SLOT 1
|
||||
#define WITH_COAP_RESOURCES 0
|
||||
|
@ -129,13 +128,7 @@
|
|||
#define TSCH_CONF_JOIN_SECURED_ONLY 0
|
||||
#endif /* WITH_TSCH_SECURITY */
|
||||
|
||||
#if WITH_TSCH
|
||||
|
||||
/* Contiki netstack: MAC */
|
||||
#undef NETSTACK_CONF_MAC
|
||||
#define NETSTACK_CONF_MAC tschmac_driver
|
||||
|
||||
#else /* No TSCH, use Csma with ACK (default MAC) */
|
||||
#if MAC_CONF_WITH_CSMA /* Configure Csma with ACK (default MAC) */
|
||||
|
||||
#undef MICROMAC_CONF_CHANNEL
|
||||
#define MICROMAC_CONF_CHANNEL 26
|
||||
|
@ -147,7 +140,7 @@
|
|||
#undef MIRCOMAC_CONF_BUF_NUM
|
||||
#define MIRCOMAC_CONF_BUF_NUM 4
|
||||
|
||||
#endif
|
||||
#endif /* MAC_CONF_WITH_CSMA */
|
||||
|
||||
#undef CONTIKI_VERSION_STRING
|
||||
#define CONTIKI_VERSION_STRING "Contiki 3.x"
|
||||
|
|
|
@ -5,16 +5,15 @@ JN516x_WITH_DONGLE = 1
|
|||
|
||||
CONTIKI=../../../../../..
|
||||
|
||||
CONTIKI_WITH_IPV6 = 1
|
||||
|
||||
CFLAGS += -DPROJECT_CONF_H=\"project-conf.h\"
|
||||
PROJECTDIRS += .. ../../tools
|
||||
PROJECT_SOURCEFILES += rpl-tools.c
|
||||
CFLAGS += -DWITH_COAP
|
||||
CFLAGS += -DREST=coap_rest_implementation
|
||||
CFLAGS += -DUIP_CONF_TCP=0
|
||||
MAKE_MAC = MAKE_MAC_TSCH
|
||||
MODULES += os/net/app-layer/coap
|
||||
MODULES += os/net/mac/tsch os/services/orchestra os/lib/json
|
||||
MODULES += os/services/orchestra os/lib/json
|
||||
|
||||
all: $(CONTIKI_PROJECT)
|
||||
|
||||
|
|
|
@ -167,9 +167,9 @@ PROCESS_THREAD(node_process, ev, data)
|
|||
printf("Init: node starting with role %s\n",
|
||||
node_role == role_6ln ? "6ln" : (node_role == role_6dr) ? "6dr" : "6dr-sec");
|
||||
|
||||
#if WITH_TSCH
|
||||
#if MAC_CONF_WITH_TSCH
|
||||
tsch_set_pan_secured(LLSEC802154_ENABLED && (node_role == role_6dr_sec));
|
||||
#endif /* WITH_TSCH */
|
||||
#endif /* MAC_CONF_WITH_TSCH */
|
||||
is_coordinator = node_role > role_6ln;
|
||||
|
||||
if(is_coordinator) {
|
||||
|
|
|
@ -4,8 +4,6 @@ TARGET ?= jn516x
|
|||
JN516x_WITH_DONGLE = 1
|
||||
CONTIKI=../../../../../..
|
||||
|
||||
CONTIKI_WITH_IPV6 = 1
|
||||
|
||||
CFLAGS += -DPROJECT_CONF_H=\"project-conf.h\"
|
||||
PROJECT_SOURCEFILES += slip-bridge.c slip.c
|
||||
|
||||
|
@ -15,8 +13,9 @@ PROJECT_SOURCEFILES += rpl-tools.c
|
|||
CFLAGS += -DWITH_COAP
|
||||
CFLAGS += -DREST=coap_rest_implementation
|
||||
CFLAGS += -DUIP_CONF_TCP=0
|
||||
MAKE_MAC = MAKE_MAC_TSCH
|
||||
MODULES += os/net/app-layer/coap
|
||||
MODULES += os/net/mac/tsch os/services/orchestra os/lib/json
|
||||
MODULES += os/services/orchestra os/lib/json
|
||||
|
||||
all: $(CONTIKI_PROJECT)
|
||||
include $(CONTIKI)/Makefile.include
|
||||
|
|
|
@ -4,7 +4,6 @@ TARGET ?= jn516x
|
|||
JN516x_WITH_DONGLE = 1
|
||||
|
||||
CONTIKI=../../../../../..
|
||||
CONTIKI_WITH_IPV6 = 1
|
||||
|
||||
CFLAGS += -DPROJECT_CONF_H=\"project-conf.h\"
|
||||
PROJECTDIRS += .. ../../tools
|
||||
|
@ -13,8 +12,9 @@ PROJECT_SOURCEFILES += rpl-tools.c
|
|||
CFLAGS += -DWITH_COAP
|
||||
CFLAGS += -DREST=coap_rest_implementation
|
||||
CFLAGS += -DUIP_CONF_TCP=0
|
||||
MAKE_MAC = MAKE_MAC_TSCH
|
||||
MODULES += os/net/app-layer/coap
|
||||
MODULES += os/net/mac/tsch os/services/orchestra os/lib/json
|
||||
MODULES += os/services/orchestra os/lib/json
|
||||
|
||||
all: $(CONTIKI_PROJECT)
|
||||
|
||||
|
|
|
@ -5,8 +5,6 @@ JN516x_WITH_DONGLE = 1
|
|||
|
||||
CONTIKI=../../../../../..
|
||||
|
||||
CONTIKI_WITH_IPV6 = 1
|
||||
|
||||
CFLAGS += -DPROJECT_CONF_H=\"project-conf.h\"
|
||||
PROJECT_SOURCEFILES += slip-bridge.c slip.c
|
||||
|
||||
|
@ -15,8 +13,9 @@ PROJECT_SOURCEFILES += rpl-tools.c
|
|||
|
||||
CFLAGS += -DWITH_COAP
|
||||
CFLAGS += -DUIP_CONF_TCP=0
|
||||
MAKE_MAC = MAKE_MAC_TSCH
|
||||
MODULES += os/net/app-layer/coap
|
||||
MODULES += os/net/mac/tsch os/services/orchestra os/lib/json
|
||||
MODULES += os/services/orchestra os/lib/json
|
||||
|
||||
all: $(CONTIKI_PROJECT)
|
||||
include $(CONTIKI)/Makefile.include
|
||||
|
|
|
@ -5,7 +5,6 @@ JN516x_WITH_DR1174 = 1
|
|||
TARGET_WITH_UART1 = 1
|
||||
|
||||
CONTIKI=../../../../..
|
||||
CONTIKI_WITH_IPV6 = 1
|
||||
|
||||
CFLAGS += -DPROJECT_CONF_H=\"project-conf.h\"
|
||||
PROJECTDIRS += .. ../tools
|
||||
|
@ -14,8 +13,9 @@ PROJECT_SOURCEFILES += rpl-tools.c
|
|||
CFLAGS += -DWITH_COAP
|
||||
CFLAGS += -DREST=coap_rest_implementation
|
||||
CFLAGS += -DUIP_CONF_TCP=0
|
||||
MAKE_MAC = MAKE_MAC_TSCH
|
||||
MODULES += os/net/app-layer/coap
|
||||
MODULES += os/net/mac/tsch os/services/orchestra os/lib/json
|
||||
MODULES += os/services/orchestra os/lib/json
|
||||
|
||||
all: $(CONTIKI_PROJECT)
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@ DEFINES+=PROJECT_CONF_H=\"project-conf.h\"
|
|||
|
||||
all: mqtt-demo
|
||||
|
||||
CONTIKI_WITH_IPV6 = 1
|
||||
CONTIKI_WITH_RPL = 0
|
||||
|
||||
MODULES += os/net/app-layer/mqtt
|
||||
|
|
|
@ -7,10 +7,8 @@ BOARD = orion
|
|||
CONTIKI = ../../../../..
|
||||
|
||||
WITH_IP64 = 1
|
||||
CONTIKI_WITH_IPV6 = 1
|
||||
|
||||
DEFINES += UIP_CONF_TCP=1
|
||||
PROJECT_SOURCEFILES += httpd-simple.c
|
||||
|
||||
include $(CONTIKI)/Makefile.include
|
||||
|
||||
|
|
|
@ -17,6 +17,9 @@ endif
|
|||
### add more source files to the build or define make variables.
|
||||
-include $(TARGET)/Makefile.$(TARGET)
|
||||
|
||||
# Custom MAC layer for sensniff (sensniff_mac_driver)
|
||||
MAKE_MAC = MAKE_MAC_OTHER
|
||||
|
||||
all: $(CONTIKI_PROJECT)
|
||||
|
||||
CONTIKI = ../..
|
||||
|
|
|
@ -32,8 +32,8 @@
|
|||
#ifndef PROJECT_CONF_H_
|
||||
#define PROJECT_CONF_H_
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#undef NETSTACK_CONF_MAC
|
||||
#define NETSTACK_CONF_MAC sensniff_mac_driver
|
||||
/* Selected in netstack.h because our Makefile sets MAKE_MAC = MAKE_MAC_OTHER */
|
||||
#define NETSTACK_CONF_OTHER_MAC sensniff_mac_driver
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Include platform-specific header */
|
||||
#include "target-conf.h"
|
||||
|
|
|
@ -4,5 +4,4 @@ all: $(CONTIKI_PROJECT)
|
|||
|
||||
CONTIKI = ../..
|
||||
|
||||
CONTIKI_WITH_IPV6 = 1
|
||||
include $(CONTIKI)/Makefile.include
|
||||
|
|
|
@ -32,43 +32,6 @@
|
|||
#ifndef CONTIKI_DEFAULT_CONF_H
|
||||
#define CONTIKI_DEFAULT_CONF_H
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Netstack configuration
|
||||
*
|
||||
* The netstack configuration is typically overridden by the platform
|
||||
* configuration, as defined in contiki-conf.h
|
||||
*/
|
||||
|
||||
/* NETSTACK_CONF_RADIO specifies the radio driver. The radio driver
|
||||
typically depends on the radio used on the target hardware. */
|
||||
#ifndef NETSTACK_CONF_RADIO
|
||||
#define NETSTACK_CONF_RADIO nullradio_driver
|
||||
/* #define NETSTACK_CONF_RADIO cc2420_driver */
|
||||
#endif /* NETSTACK_CONF_RADIO */
|
||||
|
||||
/* NETSTACK_CONF_FRAMER specifies the over-the-air frame format used
|
||||
by Contiki radio packets. For IEEE 802.15.4 radios, use the
|
||||
framer_802154 driver. */
|
||||
#ifndef NETSTACK_CONF_FRAMER
|
||||
#define NETSTACK_CONF_FRAMER framer_802154
|
||||
/* #define NETSTACK_CONF_FRAMER framer_802154 */
|
||||
#endif /* NETSTACK_CONF_FRAMER */
|
||||
|
||||
/* NETSTACK_CONF_MAC specifies the Medium Access Control (MAC)
|
||||
layer. The nullmac_driver does not provide any MAC
|
||||
functionality. The csma_driver is the default CSMA MAC layer, but
|
||||
is not compatible with all radios. */
|
||||
#ifndef NETSTACK_CONF_MAC
|
||||
#define NETSTACK_CONF_MAC csma_driver
|
||||
/* #define NETSTACK_CONF_MAC csma_driver */
|
||||
#endif /* NETSTACK_CONF_MAC */
|
||||
|
||||
/* NETSTACK_CONF_NETWORK specifies the network layer and can be either
|
||||
sicslowpan_driver, for IPv6 networking. */
|
||||
#ifndef NETSTACK_CONF_NETWORK
|
||||
#define NETSTACK_CONF_NETWORK sicslowpan_driver
|
||||
#endif /* NETSTACK_CONF_NETWORK */
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Packet buffer size options.
|
||||
*
|
||||
|
|
|
@ -112,7 +112,7 @@ create_frame(int do_create)
|
|||
} else if(packetbuf_hdralloc(hdr_len)) {
|
||||
frame802154_create(¶ms, packetbuf_hdrptr());
|
||||
|
||||
LOG_INFO("15.4-OUT: %2X ", params.fcf.frame_type);
|
||||
LOG_INFO("Out: %2X ", params.fcf.frame_type);
|
||||
LOG_INFO_LLADDR((const linkaddr_t *)params.dest_addr);
|
||||
LOG_INFO_(" %d %u (%u)\n", hdr_len, packetbuf_datalen(), packetbuf_totlen());
|
||||
|
||||
|
|
|
@ -36,44 +36,7 @@
|
|||
* Joakim Eriksson <joakime@sics.se>
|
||||
*/
|
||||
#include "net/mac/framer/framer.h"
|
||||
#include "net/mac/framer/frame802154.h"
|
||||
#include "net/packetbuf.h"
|
||||
#include <string.h>
|
||||
|
||||
#define DEBUG 0
|
||||
|
||||
#if DEBUG
|
||||
#include <stdio.h>
|
||||
#define PRINTF(...) printf(__VA_ARGS__)
|
||||
#define PRINTADDR(addr) PRINTF(" %02x%02x:%02x%02x:%02x%02x:%02x%02x ", ((uint8_t *)addr)[0], ((uint8_t *)addr)[1], ((uint8_t *)addr)[2], ((uint8_t *)addr)[3], ((uint8_t *)addr)[4], ((uint8_t *)addr)[5], ((uint8_t *)addr)[6], ((uint8_t *)addr)[7])
|
||||
#else
|
||||
#define PRINTF(...)
|
||||
#define PRINTADDR(addr)
|
||||
#endif
|
||||
|
||||
/** \brief The 16-bit identifier of the PAN on which the device is
|
||||
* sending to. If this value is 0xffff, the device is not
|
||||
* associated.
|
||||
*/
|
||||
static const uint16_t mac_dst_pan_id = IEEE802154_PANID;
|
||||
|
||||
/** \brief The 16-bit identifier of the PAN on which the device is
|
||||
* operating. If this value is 0xffff, the device is not
|
||||
* associated.
|
||||
*/
|
||||
static const uint16_t mac_src_pan_id = IEEE802154_PANID;
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static int
|
||||
is_broadcast_addr(uint8_t mode, uint8_t *addr)
|
||||
{
|
||||
int i = mode == FRAME802154_SHORTADDRMODE ? 2 : 8;
|
||||
while(i-- > 0) {
|
||||
if(addr[i] != 0xff) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static int
|
||||
hdr_length(void)
|
||||
|
@ -95,37 +58,6 @@ parse(void)
|
|||
return 0;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
int
|
||||
no_framer_parse_802154_frame(void)
|
||||
{
|
||||
frame802154_t frame;
|
||||
int len;
|
||||
len = packetbuf_datalen();
|
||||
if(frame802154_parse(packetbuf_dataptr(), len, &frame)) {
|
||||
if(frame.fcf.dest_addr_mode) {
|
||||
if(frame.dest_pid != mac_src_pan_id &&
|
||||
frame.dest_pid != FRAME802154_BROADCASTPANDID) {
|
||||
/* Packet to another PAN */
|
||||
PRINTF("15.4: for another pan %u\n", frame.dest_pid);
|
||||
return 0;
|
||||
}
|
||||
if(!is_broadcast_addr(frame.fcf.dest_addr_mode, frame.dest_addr)) {
|
||||
packetbuf_set_addr(PACKETBUF_ADDR_RECEIVER, (linkaddr_t *)&frame.dest_addr);
|
||||
}
|
||||
}
|
||||
packetbuf_set_addr(PACKETBUF_ADDR_SENDER, (linkaddr_t *)&frame.src_addr);
|
||||
packetbuf_set_attr(PACKETBUF_ATTR_MAC_SEQNO, frame.seq);
|
||||
|
||||
PRINTF("15.4-IN: %2X", frame.fcf.frame_type);
|
||||
PRINTADDR(packetbuf_addr(PACKETBUF_ADDR_SENDER));
|
||||
PRINTADDR(packetbuf_addr(PACKETBUF_ADDR_RECEIVER));
|
||||
PRINTF("%u (%u)\n", packetbuf_datalen(), len);
|
||||
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
const struct framer no_framer = {
|
||||
hdr_length,
|
||||
create,
|
|
@ -89,25 +89,9 @@ To use TSCH, first make sure your platform supports it.
|
|||
Currently, `jn516x`, `sky`, `z1`, `cc2538dk`, `zoul`, `openmote-cc2538`, `srf06-cc26xx`, and `cooja` are the supported platforms.
|
||||
To add your own, we refer the reader to the next section.
|
||||
|
||||
To add TSCH to your application, first include the TSCH module from your makefile with:
|
||||
To add TSCH to your application, configure the TSCH module from your makefile with:
|
||||
|
||||
`MODULES += os/net/mac/tsch`
|
||||
|
||||
Then, enable TSCH from your project conf with the following:
|
||||
|
||||
```
|
||||
/* Netstack layers */
|
||||
#undef NETSTACK_CONF_MAC
|
||||
#define NETSTACK_CONF_MAC tschmac_driver
|
||||
#undef NETSTACK_CONF_RDC
|
||||
#define NETSTACK_CONF_RDC nordc_driver
|
||||
#undef NETSTACK_CONF_FRAMER
|
||||
#define NETSTACK_CONF_FRAMER framer_802154
|
||||
|
||||
/* IEEE802.15.4 frame version */
|
||||
#undef FRAME802154_CONF_VERSION
|
||||
#define FRAME802154_CONF_VERSION FRAME802154_IEEE802154E_2012
|
||||
```
|
||||
`MAKE_MAC = MAKE_MAC_TSCH`
|
||||
|
||||
If you are running with RPL, it is recommended to enable the `tsch-rpl` module with:
|
||||
|
||||
|
@ -119,18 +103,6 @@ If you are running with RPL, it is recommended to enable the `tsch-rpl` module w
|
|||
#define TSCH_CALLBACK_LEAVING_NETWORK tsch_rpl_callback_leaving_network
|
||||
```
|
||||
|
||||
On CC2420-based platforms, enable SFD timestamps with:
|
||||
|
||||
```
|
||||
/* Disable DCO calibration (uses timerB) */
|
||||
#undef DCOSYNCH_CONF_ENABLED
|
||||
#define DCOSYNCH_CONF_ENABLED 0
|
||||
|
||||
/* Enable SFD timestamps (uses timerB) */
|
||||
#undef CC2420_CONF_SFD_TIMESTAMPS
|
||||
#define CC2420_CONF_SFD_TIMESTAMPS 1
|
||||
```
|
||||
|
||||
To configure TSCH, see the macros in `.h` files under `os/net/mac/tsch/` and redefine your own in your `project-conf.h`.
|
||||
|
||||
## Using TSCH with Security
|
||||
|
@ -148,7 +120,7 @@ To include TSCH standard-compliant security, set the following:
|
|||
#define LLSEC802154_CONF_USES_FRAME_COUNTER 0
|
||||
```
|
||||
|
||||
The keys can be configured in `net/mac/tsch/tsch-security.h`.
|
||||
The keys can be configured in `os/net/mac/tsch/tsch-security.h`.
|
||||
Nodes handle security level and keys dynamically, i.e. as specified by the incoming frame header rather that compile-time defined.
|
||||
|
||||
By default, when including security, the PAN coordinator will transmit secured EBs.
|
||||
|
@ -163,7 +135,7 @@ Likewise, set `TSCH_JOIN_MY_PANID_ONLY` to force joining networks with a specifi
|
|||
By default (see `TSCH_SCHEDULE_WITH_6TISCH_MINIMAL`), our implementation runs a 6TiSCH minimal schedule, which emulates an always-on link on top of TSCH.
|
||||
The schedule consists in a single shared slot for all transmissions and receptions, in a slotframe of length `TSCH_SCHEDULE_DEFAULT_LENGTH`.
|
||||
|
||||
As an alternative, we provide Orchestra (under `apps/orchestra`), an autonomous scheduling solution for TSCH where nodes maintain their own schedule locally, solely based on their local RPL state.
|
||||
As an alternative, we provide Orchestra (under `os/services/orchestra`), an autonomous scheduling solution for TSCH where nodes maintain their own schedule locally, solely based on their local RPL state.
|
||||
Orchestra can be simply enabled and should work out-of-the-box with its default settings as long as RPL is also enabled.
|
||||
See `apps/orchestra/README.md` for more information.
|
||||
|
||||
|
|
|
@ -43,37 +43,46 @@
|
|||
|
||||
#include "contiki.h"
|
||||
|
||||
#ifndef NETSTACK_NETWORK
|
||||
#ifdef NETSTACK_CONF_NETWORK
|
||||
#define NETSTACK_NETWORK NETSTACK_CONF_NETWORK
|
||||
#else /* NETSTACK_CONF_NETWORK */
|
||||
/* Network layer configuration. The NET layer is configured through the Makefile,
|
||||
via the flag MAC_NET */
|
||||
#if NETSTACK_CONF_WITH_IPV6
|
||||
#define NETSTACK_NETWORK sicslowpan_driver
|
||||
#endif /* NETSTACK_CONF_NETWORK */
|
||||
#endif /* NETSTACK_NETWORK */
|
||||
#elif NETSTACK_CONF_WITH_NULLNET
|
||||
#define NETSTACK_NETWORK nullnet_driver
|
||||
#elif NETSTACK_CONF_WITH_OTHER
|
||||
#define NETSTACK_NETWORK NETSTACK_CONF_OTHER_NETWORK
|
||||
#else
|
||||
#error Unknown NET configuration
|
||||
#endif
|
||||
|
||||
#ifndef NETSTACK_MAC
|
||||
#ifdef NETSTACK_CONF_MAC
|
||||
#define NETSTACK_MAC NETSTACK_CONF_MAC
|
||||
#else /* NETSTACK_CONF_MAC */
|
||||
/* MAC layer configuration. The MAC layer is configured through the Makefile,
|
||||
via the flag MAKE_MAC */
|
||||
#if MAC_CONF_WITH_NULLMAC
|
||||
#define NETSTACK_MAC nullmac_driver
|
||||
#elif MAC_CONF_WITH_CSMA
|
||||
#define NETSTACK_MAC csma_driver
|
||||
#endif /* NETSTACK_CONF_MAC */
|
||||
#endif /* NETSTACK_MAC */
|
||||
#elif MAC_CONF_WITH_TSCH
|
||||
#define NETSTACK_MAC tschmac_driver
|
||||
#elif MAC_CONF_WITH_OTHER
|
||||
#define NETSTACK_MAC NETSTACK_CONF_OTHER_MAC
|
||||
#else
|
||||
#error Unknown MAC configuration
|
||||
#endif
|
||||
|
||||
#ifndef NETSTACK_RADIO
|
||||
/* Radio driver configuration. Most often set by the platform. */
|
||||
#ifdef NETSTACK_CONF_RADIO
|
||||
#define NETSTACK_RADIO NETSTACK_CONF_RADIO
|
||||
#else /* NETSTACK_CONF_RADIO */
|
||||
#define NETSTACK_RADIO nullradio_driver
|
||||
#endif /* NETSTACK_CONF_RADIO */
|
||||
#endif /* NETSTACK_RADIO */
|
||||
|
||||
#ifndef NETSTACK_FRAMER
|
||||
/* Framer selection. The framer is used by the MAC implementation
|
||||
to build and parse frames. */
|
||||
#ifdef NETSTACK_CONF_FRAMER
|
||||
#define NETSTACK_FRAMER NETSTACK_CONF_FRAMER
|
||||
#else /* NETSTACK_CONF_FRAMER */
|
||||
#define NETSTACK_FRAMER framer_802154
|
||||
#endif /* NETSTACK_CONF_FRAMER */
|
||||
#endif /* NETSTACK_FRAMER */
|
||||
|
||||
#include "net/mac/mac.h"
|
||||
#include "net/mac/framer/framer.h"
|
||||
|
|
|
@ -0,0 +1,106 @@
|
|||
/*
|
||||
* Copyright (c) 2017, RISE SICS.
|
||||
* 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.
|
||||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file
|
||||
* NullNet, a minimal network layer.
|
||||
* \author
|
||||
* Simon Duquennoy <simon.duquennoy@ri.se>
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* \addtogroup nullnet
|
||||
* @{
|
||||
*/
|
||||
|
||||
#include "contiki.h"
|
||||
#include "net/packetbuf.h"
|
||||
#include "net/netstack.h"
|
||||
#include "net/nullnet/nullnet.h"
|
||||
|
||||
/* Log configuration */
|
||||
#include "sys/log.h"
|
||||
#define LOG_MODULE "NullNet"
|
||||
#define LOG_LEVEL LOG_LEVEL_NULLNET
|
||||
|
||||
static nullnet_input_callback current_callback = NULL;
|
||||
/*--------------------------------------------------------------------*/
|
||||
static void
|
||||
init(void)
|
||||
{
|
||||
LOG_INFO("init\n");
|
||||
current_callback = NULL;
|
||||
}
|
||||
/*--------------------------------------------------------------------*/
|
||||
static void
|
||||
input(void)
|
||||
{
|
||||
if(current_callback != NULL) {
|
||||
LOG_INFO("received %u bytes from ", packetbuf_datalen());
|
||||
LOG_INFO_LLADDR(packetbuf_addr(PACKETBUF_ADDR_SENDER));
|
||||
LOG_INFO_("\n");
|
||||
current_callback(packetbuf_dataptr(), packetbuf_datalen(),
|
||||
packetbuf_addr(PACKETBUF_ADDR_SENDER), packetbuf_addr(PACKETBUF_ADDR_RECEIVER));
|
||||
}
|
||||
}
|
||||
/*--------------------------------------------------------------------*/
|
||||
void
|
||||
nullnet_set_input_callback(nullnet_input_callback callback)
|
||||
{
|
||||
current_callback = callback;
|
||||
}
|
||||
/*--------------------------------------------------------------------*/
|
||||
void
|
||||
nullnet_output(const void *data, uint16_t len, const linkaddr_t *dest)
|
||||
{
|
||||
packetbuf_clear();
|
||||
packetbuf_copyfrom(data, len);
|
||||
if(dest != NULL) {
|
||||
packetbuf_set_addr(PACKETBUF_ADDR_RECEIVER, dest);
|
||||
} else {
|
||||
packetbuf_set_addr(PACKETBUF_ADDR_RECEIVER, &linkaddr_null);
|
||||
}
|
||||
packetbuf_set_addr(PACKETBUF_ADDR_SENDER, &linkaddr_node_addr);
|
||||
LOG_INFO("sending %u bytes to ", packetbuf_datalen());
|
||||
LOG_INFO_LLADDR(packetbuf_addr(PACKETBUF_ADDR_RECEIVER));
|
||||
LOG_INFO_("\n");
|
||||
NETSTACK_MAC.send(NULL, NULL);
|
||||
}
|
||||
/*--------------------------------------------------------------------*/
|
||||
const struct network_driver nullnet_driver = {
|
||||
"nullnet",
|
||||
init,
|
||||
input
|
||||
};
|
||||
/*--------------------------------------------------------------------*/
|
||||
/** @} */
|
|
@ -0,0 +1,59 @@
|
|||
/*
|
||||
* Copyright (c) 2017, RISE SICS.
|
||||
* 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.
|
||||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file
|
||||
* NullNet, a minimal network layer.
|
||||
* \author
|
||||
* Simon Duquennoy <simon.duquennoy@ri.se>
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* \addtogroup nullnet
|
||||
* @{
|
||||
*/
|
||||
|
||||
#ifndef NULLNET_H_
|
||||
#define NULLNET_H_
|
||||
|
||||
#include "contiki.h"
|
||||
#include "net/linkaddr.h"
|
||||
|
||||
typedef void (* nullnet_input_callback)(const void *data, uint16_t len,
|
||||
const linkaddr_t *src, const linkaddr_t *dest);
|
||||
|
||||
void nullnet_set_input_callback(nullnet_input_callback callback);
|
||||
void nullnet_output(const void *data, uint16_t len, const linkaddr_t *dest);
|
||||
|
||||
#endif /* NULLNET_H_ */
|
||||
/** @} */
|
|
@ -94,6 +94,10 @@
|
|||
#define LOG_CONF_LEVEL_6LOWPAN LOG_LEVEL_NONE
|
||||
#endif /* LOG_CONF_LEVEL_6LOWPAN */
|
||||
|
||||
#ifndef LOG_CONF_LEVEL_NULLNET
|
||||
#define LOG_CONF_LEVEL_NULLNET LOG_LEVEL_INFO
|
||||
#endif /* LOG_CONF_LEVEL_NULLNET */
|
||||
|
||||
#ifndef LOG_CONF_LEVEL_MAC
|
||||
#define LOG_CONF_LEVEL_MAC LOG_LEVEL_NONE
|
||||
#endif /* LOG_CONF_LEVEL_MAC */
|
||||
|
|
|
@ -48,16 +48,14 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#if NETSTACK_CONF_WITH_IPV6
|
||||
|
||||
#include "sys/log.h"
|
||||
#include "net/ip/ip64-addr.h"
|
||||
|
||||
|
||||
int curr_log_level_rpl = LOG_CONF_LEVEL_RPL;
|
||||
int curr_log_level_tcpip = LOG_CONF_LEVEL_TCPIP;
|
||||
int curr_log_level_ipv6 = LOG_CONF_LEVEL_IPV6;
|
||||
int curr_log_level_6lowpan = LOG_CONF_LEVEL_6LOWPAN;
|
||||
int curr_log_level_nullnet = LOG_CONF_LEVEL_NULLNET;
|
||||
int curr_log_level_mac = LOG_CONF_LEVEL_MAC;
|
||||
int curr_log_level_framer = LOG_CONF_LEVEL_FRAMER;
|
||||
int curr_log_level_6top = LOG_CONF_LEVEL_6TOP;
|
||||
|
@ -67,12 +65,15 @@ struct log_module all_modules[] = {
|
|||
{"tcpip", &curr_log_level_tcpip, LOG_CONF_LEVEL_TCPIP},
|
||||
{"ipv6", &curr_log_level_ipv6, LOG_CONF_LEVEL_IPV6},
|
||||
{"6lowpan", &curr_log_level_6lowpan, LOG_CONF_LEVEL_6LOWPAN},
|
||||
{"nullnet", &curr_log_level_nullnet, LOG_CONF_LEVEL_NULLNET},
|
||||
{"mac", &curr_log_level_mac, LOG_CONF_LEVEL_MAC},
|
||||
{"framer", &curr_log_level_framer, LOG_CONF_LEVEL_FRAMER},
|
||||
{"6top", &curr_log_level_6top, LOG_CONF_LEVEL_6TOP},
|
||||
{NULL, NULL, 0},
|
||||
};
|
||||
|
||||
#if NETSTACK_CONF_WITH_IPV6
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
log_6addr(const uip_ipaddr_t *ipaddr)
|
||||
|
|
|
@ -77,6 +77,7 @@ extern int curr_log_level_rpl;
|
|||
extern int curr_log_level_tcpip;
|
||||
extern int curr_log_level_ipv6;
|
||||
extern int curr_log_level_6lowpan;
|
||||
extern int curr_log_level_nullnet;
|
||||
extern int curr_log_level_mac;
|
||||
extern int curr_log_level_framer;
|
||||
extern int curr_log_level_6top;
|
||||
|
@ -87,6 +88,7 @@ extern struct log_module all_modules[];
|
|||
#define LOG_LEVEL_TCPIP MIN((LOG_CONF_LEVEL_TCPIP), curr_log_level_tcpip)
|
||||
#define LOG_LEVEL_IPV6 MIN((LOG_CONF_LEVEL_IPV6), curr_log_level_ipv6)
|
||||
#define LOG_LEVEL_6LOWPAN MIN((LOG_CONF_LEVEL_6LOWPAN), curr_log_level_6lowpan)
|
||||
#define LOG_LEVEL_NULLNET MIN((LOG_CONF_LEVEL_NULLNET), curr_log_level_nullnet)
|
||||
#define LOG_LEVEL_MAC MIN((LOG_CONF_LEVEL_MAC), curr_log_level_mac)
|
||||
#define LOG_LEVEL_FRAMER MIN((LOG_CONF_LEVEL_FRAMER), curr_log_level_framer)
|
||||
#define LOG_LEVEL_6TOP MIN((LOG_CONF_LEVEL_6TOP), curr_log_level_6top)
|
||||
|
|
|
@ -4,5 +4,4 @@ CFLAGS += -D PROJECT_CONF_H=\"project-conf.h\"
|
|||
MODULES += os/services/unit-test
|
||||
|
||||
CONTIKI = ../../..
|
||||
CONTIKI_WITH_IPV6 = 1
|
||||
include $(CONTIKI)/Makefile.include
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
all: wait-dag
|
||||
CONTIKI=../../..
|
||||
|
||||
CONTIKI_WITH_IPV6 = 1
|
||||
include $(CONTIKI)/Makefile.include
|
||||
|
|
|
@ -2,5 +2,4 @@ CONTIKI=../../../..
|
|||
|
||||
CFLAGS+= -DPROJECT_CONF_H=\"project-conf.h\"
|
||||
|
||||
CONTIKI_WITH_IPV6 = 1
|
||||
include $(CONTIKI)/Makefile.include
|
||||
|
|
|
@ -2,5 +2,4 @@ CONTIKI=../../../..
|
|||
|
||||
CFLAGS+= -DPROJECT_CONF_H=\"project-conf.h\"
|
||||
|
||||
CONTIKI_WITH_IPV6 = 1
|
||||
include $(CONTIKI)/Makefile.include
|
||||
|
|
|
@ -0,0 +1,205 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<simconf>
|
||||
<project EXPORT="discard">[APPS_DIR]/mrm</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/mspsim</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/avrora</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/serial_socket</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/collect-view</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/powertracker</project>
|
||||
<simulation>
|
||||
<title>NullNet Broadcast Example</title>
|
||||
<randomseed>123456</randomseed>
|
||||
<motedelay_us>1000000</motedelay_us>
|
||||
<radiomedium>
|
||||
org.contikios.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>
|
||||
org.contikios.cooja.contikimote.ContikiMoteType
|
||||
<identifier>mtype613</identifier>
|
||||
<description>Cooja Mote Type #1</description>
|
||||
<source>[CONTIKI_DIR]/examples/nullnet/nullnet-broadcast.c</source>
|
||||
<commands>make TARGET=cooja clean
|
||||
make nullnet-broadcast.cooja TARGET=cooja</commands>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Position</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Battery</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiVib</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiMoteID</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiRS232</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiBeeper</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.RimeAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiIPAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiRadio</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiButton</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiPIR</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiClock</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiLED</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiCFS</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiEEPROM</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.MoteAttributes</moteinterface>
|
||||
<symbols>false</symbols>
|
||||
</motetype>
|
||||
<mote>
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>41.086521947449974</x>
|
||||
<y>65.60589922041163</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
||||
<id>1</id>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
||||
<bitrate>250.0</bitrate>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiEEPROM
|
||||
<eeprom>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==</eeprom>
|
||||
</interface_config>
|
||||
<motetype_identifier>mtype613</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>28.458497515673685</x>
|
||||
<y>52.43866085432446</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
||||
<id>2</id>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
||||
<bitrate>250.0</bitrate>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiEEPROM
|
||||
<eeprom>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==</eeprom>
|
||||
</interface_config>
|
||||
<motetype_identifier>mtype613</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>6.830522087791668</x>
|
||||
<y>77.15936959931379</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
||||
<id>3</id>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
||||
<bitrate>250.0</bitrate>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiEEPROM
|
||||
<eeprom>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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interface_config>
|
||||
<motetype_identifier>mtype613</motetype_identifier>
|
||||
</mote>
|
||||
</simulation>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.SimControl
|
||||
<width>280</width>
|
||||
<z>5</z>
|
||||
<height>160</height>
|
||||
<location_x>400</location_x>
|
||||
<location_y>0</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.Visualizer
|
||||
<plugin_config>
|
||||
<moterelations>true</moterelations>
|
||||
<skin>org.contikios.cooja.plugins.skins.IDVisualizerSkin</skin>
|
||||
<skin>org.contikios.cooja.plugins.skins.UDGMVisualizerSkin</skin>
|
||||
<viewport>6.180735450568881 0.0 0.0 6.180735450568881 49.41871362245591 -238.19717905203652</viewport>
|
||||
</plugin_config>
|
||||
<width>400</width>
|
||||
<z>4</z>
|
||||
<height>400</height>
|
||||
<location_x>1</location_x>
|
||||
<location_y>1</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.LogListener
|
||||
<plugin_config>
|
||||
<filter />
|
||||
<formatted_time />
|
||||
<coloring />
|
||||
</plugin_config>
|
||||
<width>1179</width>
|
||||
<z>0</z>
|
||||
<height>704</height>
|
||||
<location_x>679</location_x>
|
||||
<location_y>0</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.TimeLine
|
||||
<plugin_config>
|
||||
<mote>0</mote>
|
||||
<mote>1</mote>
|
||||
<mote>2</mote>
|
||||
<showRadioRXTX />
|
||||
<showRadioHW />
|
||||
<showLEDs />
|
||||
<zoomfactor>1.7067792216977151</zoomfactor>
|
||||
</plugin_config>
|
||||
<width>1858</width>
|
||||
<z>3</z>
|
||||
<height>166</height>
|
||||
<location_x>9</location_x>
|
||||
<location_y>723</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.RadioLogger
|
||||
<plugin_config>
|
||||
<split>150</split>
|
||||
<formatted_time />
|
||||
<showdups>false</showdups>
|
||||
<hidenodests>false</hidenodests>
|
||||
</plugin_config>
|
||||
<width>500</width>
|
||||
<z>2</z>
|
||||
<height>300</height>
|
||||
<location_x>19</location_x>
|
||||
<location_y>409</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.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
|
||||
*/
|
||||
|
||||
/* Make test automatically fail (timeout) after 100 simulated seconds */
|
||||
TIMEOUT(1000000); /* milliseconds. no action at timeout */
|
||||
|
||||
WAIT_UNTIL(id == 1 && msg.contains("Received"));
|
||||
WAIT_UNTIL(id == 2 && msg.contains("Received"));
|
||||
WAIT_UNTIL(id == 3 && msg.contains("Received"));
|
||||
|
||||
log.testOK(); /* Report test success and quit */</script>
|
||||
<active>true</active>
|
||||
</plugin_config>
|
||||
<width>823</width>
|
||||
<z>1</z>
|
||||
<height>700</height>
|
||||
<location_x>997</location_x>
|
||||
<location_y>162</location_y>
|
||||
</plugin>
|
||||
</simconf>
|
|
@ -0,0 +1,205 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<simconf>
|
||||
<project EXPORT="discard">[APPS_DIR]/mrm</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/mspsim</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/avrora</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/serial_socket</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/collect-view</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/powertracker</project>
|
||||
<simulation>
|
||||
<title>NullNet Broadcast Example</title>
|
||||
<randomseed>123456</randomseed>
|
||||
<motedelay_us>1000000</motedelay_us>
|
||||
<radiomedium>
|
||||
org.contikios.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>
|
||||
org.contikios.cooja.contikimote.ContikiMoteType
|
||||
<identifier>mtype613</identifier>
|
||||
<description>Cooja Mote Type #1</description>
|
||||
<source>[CONTIKI_DIR]/examples/nullnet/nullnet-broadcast.c</source>
|
||||
<commands>make TARGET=cooja clean
|
||||
make nullnet-broadcast.cooja MAKE_MAC=MAKE_MAC_TSCH TARGET=cooja</commands>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Position</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Battery</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiVib</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiMoteID</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiRS232</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiBeeper</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.RimeAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiIPAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiRadio</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiButton</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiPIR</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiClock</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiLED</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiCFS</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiEEPROM</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.MoteAttributes</moteinterface>
|
||||
<symbols>false</symbols>
|
||||
</motetype>
|
||||
<mote>
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>41.086521947449974</x>
|
||||
<y>65.60589922041163</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
||||
<id>1</id>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
||||
<bitrate>250.0</bitrate>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiEEPROM
|
||||
<eeprom>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==</eeprom>
|
||||
</interface_config>
|
||||
<motetype_identifier>mtype613</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>28.458497515673685</x>
|
||||
<y>52.43866085432446</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
||||
<id>2</id>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiRadio
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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==</eeprom>
|
||||
</interface_config>
|
||||
<motetype_identifier>mtype613</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>6.830522087791668</x>
|
||||
<y>77.15936959931379</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
||||
<id>3</id>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
||||
<bitrate>250.0</bitrate>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiEEPROM
|
||||
<eeprom>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==</eeprom>
|
||||
</interface_config>
|
||||
<motetype_identifier>mtype613</motetype_identifier>
|
||||
</mote>
|
||||
</simulation>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.SimControl
|
||||
<width>280</width>
|
||||
<z>5</z>
|
||||
<height>160</height>
|
||||
<location_x>400</location_x>
|
||||
<location_y>0</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.Visualizer
|
||||
<plugin_config>
|
||||
<moterelations>true</moterelations>
|
||||
<skin>org.contikios.cooja.plugins.skins.IDVisualizerSkin</skin>
|
||||
<skin>org.contikios.cooja.plugins.skins.UDGMVisualizerSkin</skin>
|
||||
<viewport>6.180735450568881 0.0 0.0 6.180735450568881 49.41871362245591 -238.19717905203652</viewport>
|
||||
</plugin_config>
|
||||
<width>400</width>
|
||||
<z>4</z>
|
||||
<height>400</height>
|
||||
<location_x>1</location_x>
|
||||
<location_y>1</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.LogListener
|
||||
<plugin_config>
|
||||
<filter />
|
||||
<formatted_time />
|
||||
<coloring />
|
||||
</plugin_config>
|
||||
<width>1179</width>
|
||||
<z>0</z>
|
||||
<height>704</height>
|
||||
<location_x>679</location_x>
|
||||
<location_y>0</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.TimeLine
|
||||
<plugin_config>
|
||||
<mote>0</mote>
|
||||
<mote>1</mote>
|
||||
<mote>2</mote>
|
||||
<showRadioRXTX />
|
||||
<showRadioHW />
|
||||
<showLEDs />
|
||||
<zoomfactor>1.7067792216977151</zoomfactor>
|
||||
</plugin_config>
|
||||
<width>1858</width>
|
||||
<z>3</z>
|
||||
<height>166</height>
|
||||
<location_x>9</location_x>
|
||||
<location_y>723</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.RadioLogger
|
||||
<plugin_config>
|
||||
<split>150</split>
|
||||
<formatted_time />
|
||||
<showdups>false</showdups>
|
||||
<hidenodests>false</hidenodests>
|
||||
</plugin_config>
|
||||
<width>500</width>
|
||||
<z>2</z>
|
||||
<height>300</height>
|
||||
<location_x>19</location_x>
|
||||
<location_y>409</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.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
|
||||
*/
|
||||
|
||||
/* Make test automatically fail (timeout) after 100 simulated seconds */
|
||||
TIMEOUT(1000000); /* milliseconds. no action at timeout */
|
||||
|
||||
WAIT_UNTIL(id == 1 && msg.contains("Received"));
|
||||
WAIT_UNTIL(id == 2 && msg.contains("Received"));
|
||||
WAIT_UNTIL(id == 3 && msg.contains("Received"));
|
||||
|
||||
log.testOK(); /* Report test success and quit */</script>
|
||||
<active>true</active>
|
||||
</plugin_config>
|
||||
<width>823</width>
|
||||
<z>1</z>
|
||||
<height>700</height>
|
||||
<location_x>997</location_x>
|
||||
<location_y>162</location_y>
|
||||
</plugin>
|
||||
</simconf>
|
|
@ -0,0 +1,203 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<simconf>
|
||||
<project EXPORT="discard">[APPS_DIR]/mrm</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/mspsim</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/avrora</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/serial_socket</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/collect-view</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/powertracker</project>
|
||||
<simulation>
|
||||
<title>NullNet Broadcast Example</title>
|
||||
<randomseed>123456</randomseed>
|
||||
<motedelay_us>1000000</motedelay_us>
|
||||
<radiomedium>
|
||||
org.contikios.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>
|
||||
org.contikios.cooja.contikimote.ContikiMoteType
|
||||
<identifier>mtype634</identifier>
|
||||
<description>Cooja Mote Type #1</description>
|
||||
<source>[CONTIKI_DIR]/examples/nullnet/nullnet-broadcast.c</source>
|
||||
<commands>make TARGET=cooja clean
|
||||
make nullnet-broadcast.cooja TARGET=cooja</commands>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Position</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Battery</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiVib</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiMoteID</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiRS232</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiBeeper</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.RimeAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiIPAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiRadio</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiButton</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiPIR</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiClock</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiLED</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiCFS</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiEEPROM</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.MoteAttributes</moteinterface>
|
||||
<symbols>false</symbols>
|
||||
</motetype>
|
||||
<mote>
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>41.086521947449974</x>
|
||||
<y>65.60589922041163</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
||||
<id>1</id>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
||||
<bitrate>250.0</bitrate>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiEEPROM
|
||||
<eeprom>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==</eeprom>
|
||||
</interface_config>
|
||||
<motetype_identifier>mtype634</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>28.458497515673685</x>
|
||||
<y>52.43866085432446</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
||||
<id>2</id>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
||||
<bitrate>250.0</bitrate>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiEEPROM
|
||||
<eeprom>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==</eeprom>
|
||||
</interface_config>
|
||||
<motetype_identifier>mtype634</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>6.830522087791668</x>
|
||||
<y>77.15936959931379</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
||||
<id>3</id>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
||||
<bitrate>250.0</bitrate>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiEEPROM
|
||||
<eeprom>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==</eeprom>
|
||||
</interface_config>
|
||||
<motetype_identifier>mtype634</motetype_identifier>
|
||||
</mote>
|
||||
</simulation>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.SimControl
|
||||
<width>280</width>
|
||||
<z>5</z>
|
||||
<height>160</height>
|
||||
<location_x>400</location_x>
|
||||
<location_y>0</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.Visualizer
|
||||
<plugin_config>
|
||||
<moterelations>true</moterelations>
|
||||
<skin>org.contikios.cooja.plugins.skins.IDVisualizerSkin</skin>
|
||||
<skin>org.contikios.cooja.plugins.skins.UDGMVisualizerSkin</skin>
|
||||
<viewport>6.180735450568881 0.0 0.0 6.180735450568881 49.41871362245591 -238.19717905203652</viewport>
|
||||
</plugin_config>
|
||||
<width>400</width>
|
||||
<z>2</z>
|
||||
<height>400</height>
|
||||
<location_x>1</location_x>
|
||||
<location_y>1</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.LogListener
|
||||
<plugin_config>
|
||||
<filter />
|
||||
<formatted_time />
|
||||
<coloring />
|
||||
</plugin_config>
|
||||
<width>1179</width>
|
||||
<z>1</z>
|
||||
<height>704</height>
|
||||
<location_x>679</location_x>
|
||||
<location_y>0</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.TimeLine
|
||||
<plugin_config>
|
||||
<mote>0</mote>
|
||||
<mote>1</mote>
|
||||
<mote>2</mote>
|
||||
<showRadioRXTX />
|
||||
<showRadioHW />
|
||||
<showLEDs />
|
||||
<zoomfactor>1.7067792216977151</zoomfactor>
|
||||
</plugin_config>
|
||||
<width>1858</width>
|
||||
<z>4</z>
|
||||
<height>166</height>
|
||||
<location_x>9</location_x>
|
||||
<location_y>723</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.RadioLogger
|
||||
<plugin_config>
|
||||
<split>150</split>
|
||||
<formatted_time />
|
||||
<showdups>false</showdups>
|
||||
<hidenodests>false</hidenodests>
|
||||
</plugin_config>
|
||||
<width>500</width>
|
||||
<z>3</z>
|
||||
<height>300</height>
|
||||
<location_x>109</location_x>
|
||||
<location_y>408</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.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
|
||||
*/
|
||||
|
||||
/* Make test automatically fail (timeout) after 100 simulated seconds */
|
||||
TIMEOUT(1000000); /* milliseconds. no action at timeout */
|
||||
|
||||
WAIT_UNTIL(id == 1 && msg.contains("Received"));
|
||||
|
||||
log.testOK(); /* Report test success and quit */</script>
|
||||
<active>true</active>
|
||||
</plugin_config>
|
||||
<width>600</width>
|
||||
<z>0</z>
|
||||
<height>700</height>
|
||||
<location_x>902</location_x>
|
||||
<location_y>108</location_y>
|
||||
</plugin>
|
||||
</simconf>
|
|
@ -0,0 +1,203 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<simconf>
|
||||
<project EXPORT="discard">[APPS_DIR]/mrm</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/mspsim</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/avrora</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/serial_socket</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/collect-view</project>
|
||||
<project EXPORT="discard">[APPS_DIR]/powertracker</project>
|
||||
<simulation>
|
||||
<title>NullNet Broadcast Example</title>
|
||||
<randomseed>123456</randomseed>
|
||||
<motedelay_us>1000000</motedelay_us>
|
||||
<radiomedium>
|
||||
org.contikios.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>
|
||||
org.contikios.cooja.contikimote.ContikiMoteType
|
||||
<identifier>mtype634</identifier>
|
||||
<description>Cooja Mote Type #1</description>
|
||||
<source>[CONTIKI_DIR]/examples/nullnet/nullnet-broadcast.c</source>
|
||||
<commands>make TARGET=cooja clean
|
||||
make nullnet-broadcast.cooja MAKE_MAC=MAKE_MAC_TSCH TARGET=cooja</commands>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Position</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Battery</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiVib</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiMoteID</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiRS232</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiBeeper</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.RimeAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiIPAddress</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiRadio</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiButton</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiPIR</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiClock</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiLED</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiCFS</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiEEPROM</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
||||
<moteinterface>org.contikios.cooja.interfaces.MoteAttributes</moteinterface>
|
||||
<symbols>false</symbols>
|
||||
</motetype>
|
||||
<mote>
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>41.086521947449974</x>
|
||||
<y>65.60589922041163</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
||||
<id>1</id>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
||||
<bitrate>250.0</bitrate>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiEEPROM
|
||||
<eeprom>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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ooja.interfaces.Position
|
||||
<x>28.458497515673685</x>
|
||||
<y>52.43866085432446</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
||||
<id>2</id>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
||||
<bitrate>250.0</bitrate>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiEEPROM
|
||||
<eeprom>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==</eeprom>
|
||||
</interface_config>
|
||||
<motetype_identifier>mtype634</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<interface_config>
|
||||
org.contikios.cooja.interfaces.Position
|
||||
<x>6.830522087791668</x>
|
||||
<y>77.15936959931379</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
||||
<id>3</id>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
||||
<bitrate>250.0</bitrate>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
org.contikios.cooja.contikimote.interfaces.ContikiEEPROM
|
||||
<eeprom>AAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==</eeprom>
|
||||
</interface_config>
|
||||
<motetype_identifier>mtype634</motetype_identifier>
|
||||
</mote>
|
||||
</simulation>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.SimControl
|
||||
<width>280</width>
|
||||
<z>5</z>
|
||||
<height>160</height>
|
||||
<location_x>400</location_x>
|
||||
<location_y>0</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.Visualizer
|
||||
<plugin_config>
|
||||
<moterelations>true</moterelations>
|
||||
<skin>org.contikios.cooja.plugins.skins.IDVisualizerSkin</skin>
|
||||
<skin>org.contikios.cooja.plugins.skins.UDGMVisualizerSkin</skin>
|
||||
<viewport>6.180735450568881 0.0 0.0 6.180735450568881 49.41871362245591 -238.19717905203652</viewport>
|
||||
</plugin_config>
|
||||
<width>400</width>
|
||||
<z>2</z>
|
||||
<height>400</height>
|
||||
<location_x>1</location_x>
|
||||
<location_y>1</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.LogListener
|
||||
<plugin_config>
|
||||
<filter />
|
||||
<formatted_time />
|
||||
<coloring />
|
||||
</plugin_config>
|
||||
<width>1179</width>
|
||||
<z>1</z>
|
||||
<height>704</height>
|
||||
<location_x>679</location_x>
|
||||
<location_y>0</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.TimeLine
|
||||
<plugin_config>
|
||||
<mote>0</mote>
|
||||
<mote>1</mote>
|
||||
<mote>2</mote>
|
||||
<showRadioRXTX />
|
||||
<showRadioHW />
|
||||
<showLEDs />
|
||||
<zoomfactor>1.7067792216977151</zoomfactor>
|
||||
</plugin_config>
|
||||
<width>1858</width>
|
||||
<z>4</z>
|
||||
<height>166</height>
|
||||
<location_x>9</location_x>
|
||||
<location_y>723</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.cooja.plugins.RadioLogger
|
||||
<plugin_config>
|
||||
<split>150</split>
|
||||
<formatted_time />
|
||||
<showdups>false</showdups>
|
||||
<hidenodests>false</hidenodests>
|
||||
</plugin_config>
|
||||
<width>500</width>
|
||||
<z>3</z>
|
||||
<height>300</height>
|
||||
<location_x>109</location_x>
|
||||
<location_y>408</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
org.contikios.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
|
||||
*/
|
||||
|
||||
/* Make test automatically fail (timeout) after 100 simulated seconds */
|
||||
TIMEOUT(1000000); /* milliseconds. no action at timeout */
|
||||
|
||||
WAIT_UNTIL(id == 1 && msg.contains("Received"));
|
||||
|
||||
log.testOK(); /* Report test success and quit */</script>
|
||||
<active>true</active>
|
||||
</plugin_config>
|
||||
<width>600</width>
|
||||
<z>0</z>
|
||||
<height>700</height>
|
||||
<location_x>902</location_x>
|
||||
<location_y>108</location_y>
|
||||
</plugin>
|
||||
</simconf>
|
|
@ -0,0 +1 @@
|
|||
include ../Makefile.simulation-test
|
|
@ -1,10 +1,10 @@
|
|||
all:
|
||||
|
||||
CFLAGS += -D PROJECT_CONF_H=\"project-conf.h\"
|
||||
MODULES += os/net/mac/tsch os/net/mac/tsch/sixtop os/services/unit-test
|
||||
MAKE_MAC = MAKE_MAC_TSCH
|
||||
MODULES += os/net/mac/tsch/sixtop os/services/unit-test
|
||||
|
||||
PROJECT_SOURCEFILES += common.c
|
||||
|
||||
CONTIKI = ../../..
|
||||
CONTIKI_WITH_IPV6 = 1
|
||||
include $(CONTIKI)/Makefile.include
|
||||
|
|
|
@ -45,9 +45,6 @@
|
|||
#undef TSCH_CONF_AUTOSTART
|
||||
#define TSCH_CONF_AUTOSTART 1
|
||||
|
||||
#undef NETSTACK_CONF_MAC
|
||||
#define NETSTACK_CONF_MAC tschmac_driver
|
||||
|
||||
#undef TSCH_CONF_WITH_SIXTOP
|
||||
#define TSCH_CONF_WITH_SIXTOP 1
|
||||
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
all: test-panid-handling test-tcsh-create-packet
|
||||
|
||||
MODULES += os/net/mac/tsch os/services/unit-test
|
||||
MAKE_MAC = MAKE_MAC_TSCH
|
||||
MODULES += os/services/unit-test
|
||||
CFLAGS += -D PROJECT_CONF_H=\"project-conf.h\"
|
||||
|
||||
WITH_TSCH ?= 0
|
||||
TEST_CONFIG_TYPE ?= DEFAULT
|
||||
|
||||
CFLAGS += -D WITH_TSCH=1
|
||||
|
||||
ifeq ($(TEST_CONFIG_TYPE), SECURITY_ON)
|
||||
CFLAGS += -D WITH_SECURITY_ON=1
|
||||
endif
|
||||
|
@ -17,5 +15,4 @@ CFLAGS += -D WITH_ALL_ENABLED=1
|
|||
endif
|
||||
|
||||
CONTIKI = ../../..
|
||||
CONTIKI_WITH_IPV6 = 1
|
||||
include $(CONTIKI)/Makefile.include
|
||||
|
|
|
@ -34,8 +34,8 @@
|
|||
|
||||
#define UNIT_TEST_PRINT_FUNCTION test_print_report
|
||||
|
||||
#if WITH_TSCH
|
||||
#if MAC_CONF_WITH_TSCH
|
||||
#include "project-tsch-conf.h"
|
||||
#endif
|
||||
#endif /* MAC_CONF_WITH_TSCH */
|
||||
|
||||
#endif /* !_PROJECT_CONF_H_ */
|
||||
|
|
|
@ -32,9 +32,6 @@
|
|||
#ifndef _PROJECT_TSCH_CONF_H
|
||||
#define _PROJECT_TSCH_CONF_H
|
||||
|
||||
#undef NETSTACK_CONF_MAC
|
||||
#define NETSTACK_CONF_MAC tschmac_driver
|
||||
|
||||
#if WITH_SECURITY_ON
|
||||
#define TEST_CONFIG_TYPE SECURITY_ON
|
||||
|
||||
|
|
|
@ -3,5 +3,4 @@ CONTIKI=../../..
|
|||
|
||||
CFLAGS+=-DPROJECT_CONF_H=\"project-conf.h\"
|
||||
|
||||
CONTIKI_WITH_IPV6 = 1
|
||||
include $(CONTIKI)/Makefile.include
|
||||
|
|
|
@ -3,6 +3,5 @@ CONTIKI=../../..
|
|||
|
||||
CFLAGS+=-DPROJECT_CONF_H=\"project-conf.h\"
|
||||
|
||||
CONTIKI_WITH_IPV6 = 1
|
||||
CONTIKI_WITH_RPL_LITE = 0
|
||||
include $(CONTIKI)/Makefile.include
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
all:
|
||||
all:
|
||||
|
||||
CFLAGS += -D PROJECT_CONF_H=\"project-conf.h\"
|
||||
APPS += unit-test
|
||||
|
@ -11,5 +11,6 @@ CFLAGS += -DSIXP_MSG_API_TEST=1
|
|||
endif
|
||||
|
||||
CONTIKI = ../../..
|
||||
CONTIKI_WITH_IPV6 = 1
|
||||
# MAC layer is test_mac_driver
|
||||
MAKE_MAC = MAKE_MAC_OTHER
|
||||
include $(CONTIKI)/Makefile.include
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue