Merge branch 'develop' into contrib/ti-simplelink
This commit is contained in:
commit
5ea0c80ae1
@ -71,7 +71,9 @@
|
|||||||
#endif /* CPU_FAMILY_CC13XX */
|
#endif /* CPU_FAMILY_CC13XX */
|
||||||
|
|
||||||
#if CC13XX_CONF_PROP_MODE
|
#if CC13XX_CONF_PROP_MODE
|
||||||
|
#ifndef NETSTACK_CONF_RADIO
|
||||||
#define NETSTACK_CONF_RADIO prop_mode_driver
|
#define NETSTACK_CONF_RADIO prop_mode_driver
|
||||||
|
#endif /* NETSTACK_CONF_RADIO */
|
||||||
|
|
||||||
/* Channels count from 0 upwards in IEEE 802.15.4g */
|
/* Channels count from 0 upwards in IEEE 802.15.4g */
|
||||||
#ifndef IEEE802154_CONF_DEFAULT_CHANNEL
|
#ifndef IEEE802154_CONF_DEFAULT_CHANNEL
|
||||||
|
26
examples/benchmarks/rpl-req-resp/Makefile
Normal file
26
examples/benchmarks/rpl-req-resp/Makefile
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
CONTIKI_PROJECT = node
|
||||||
|
all: $(CONTIKI_PROJECT)
|
||||||
|
|
||||||
|
MODULES_REL += ../testbeds
|
||||||
|
MODULES += os/services/deployment
|
||||||
|
MODULES += os/services/simple-energest
|
||||||
|
|
||||||
|
CONFIG?=CONFIG_TSCH_OPTIMS
|
||||||
|
|
||||||
|
ifeq ($(CONFIG),CONFIG_CSMA)
|
||||||
|
MAKE_MAC = MAKE_MAC_CSMA
|
||||||
|
else ifeq ($(CONFIG),CONFIG_TSCH)
|
||||||
|
MAKE_MAC = MAKE_MAC_TSCH
|
||||||
|
MODULES += os/services/orchestra
|
||||||
|
else ifeq ($(CONFIG),CONFIG_TSCH_OPTIMS)
|
||||||
|
MAKE_MAC = MAKE_MAC_TSCH
|
||||||
|
MODULES += os/services/orchestra
|
||||||
|
CFLAGS += -DCONFIG_OPTIMS=1
|
||||||
|
else ifeq ($(CONFIG),CONFIG_TSCH_OPTIMS2)
|
||||||
|
MAKE_MAC = MAKE_MAC_TSCH
|
||||||
|
MODULES += os/services/orchestra
|
||||||
|
CFLAGS += -DCONFIG_OPTIMS=2
|
||||||
|
endif
|
||||||
|
|
||||||
|
CONTIKI = ../../..
|
||||||
|
include $(CONTIKI)/Makefile.include
|
156
examples/benchmarks/rpl-req-resp/node.c
Normal file
156
examples/benchmarks/rpl-req-resp/node.c
Normal file
@ -0,0 +1,156 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2018, 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
|
||||||
|
* Benchmark: the root sends requests to all nodes in a randomized
|
||||||
|
* order, and receives resopnses back.
|
||||||
|
* \author
|
||||||
|
* Simon Duquennoy <simon.duquennoy@ri.se>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "contiki.h"
|
||||||
|
#include "contiki-net.h"
|
||||||
|
#include "services/deployment/deployment.h"
|
||||||
|
|
||||||
|
/* Log configuration */
|
||||||
|
#include "sys/log.h"
|
||||||
|
#define LOG_MODULE "App"
|
||||||
|
#define LOG_LEVEL LOG_LEVEL_INFO
|
||||||
|
|
||||||
|
#define UDP_PORT 8214
|
||||||
|
#define SEND_INTERVAL (CLOCK_SECOND)
|
||||||
|
|
||||||
|
static struct simple_udp_connection udp_conn;
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
PROCESS(app_process, "App process");
|
||||||
|
AUTOSTART_PROCESSES(&app_process);
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
static void
|
||||||
|
udp_rx_callback(struct simple_udp_connection *c,
|
||||||
|
const uip_ipaddr_t *sender_addr,
|
||||||
|
uint16_t sender_port,
|
||||||
|
const uip_ipaddr_t *receiver_addr,
|
||||||
|
uint16_t receiver_port,
|
||||||
|
const uint8_t *data,
|
||||||
|
uint16_t datalen)
|
||||||
|
{
|
||||||
|
uint32_t count;
|
||||||
|
int is_response;
|
||||||
|
/* Copy and parse payload */
|
||||||
|
memcpy(&count, data, sizeof(uint32_t));
|
||||||
|
/* Most significant bit: request (0) / response (1) */
|
||||||
|
is_response = count & 0x80000000;
|
||||||
|
count &= 0x7fffffff;
|
||||||
|
|
||||||
|
if(is_response) {
|
||||||
|
LOG_INFO("Received response %"PRIu32" from ", count);
|
||||||
|
LOG_INFO_6ADDR(sender_addr);
|
||||||
|
LOG_INFO_("\n");
|
||||||
|
} else {
|
||||||
|
LOG_INFO("Received request %"PRIu32" from ", count);
|
||||||
|
LOG_INFO_6ADDR(sender_addr);
|
||||||
|
LOG_INFO_("\n");
|
||||||
|
LOG_INFO("Sending response %"PRIu32" to ", count);
|
||||||
|
LOG_INFO_6ADDR(sender_addr);
|
||||||
|
LOG_INFO_("\n");
|
||||||
|
/* Set most significant bit to signal a response */
|
||||||
|
count |= 0x80000000;
|
||||||
|
simple_udp_sendto(&udp_conn, &count, sizeof(count), sender_addr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
PROCESS_THREAD(app_process, ev, data)
|
||||||
|
{
|
||||||
|
static struct etimer timer;
|
||||||
|
static uip_ipaddr_t dest_ipaddr;
|
||||||
|
|
||||||
|
PROCESS_BEGIN();
|
||||||
|
|
||||||
|
/* Initialize UDP connection */
|
||||||
|
simple_udp_register(&udp_conn, UDP_PORT, NULL,
|
||||||
|
UDP_PORT, udp_rx_callback);
|
||||||
|
|
||||||
|
if(node_id == ROOT_ID) {
|
||||||
|
/* Wait 5 seconds before starting */
|
||||||
|
etimer_set(&timer, CLOCK_SECOND * 5);
|
||||||
|
PROCESS_WAIT_EVENT_UNTIL(etimer_expired(&timer));
|
||||||
|
|
||||||
|
/* We are the root, start a DAG */
|
||||||
|
NETSTACK_ROUTING.root_start();
|
||||||
|
/* Set dest_ipaddr with DODAG ID, so we get the prefix */
|
||||||
|
NETSTACK_ROUTING.get_root_ipaddr(&dest_ipaddr);
|
||||||
|
/* Setup a periodic timer that expires after 10 seconds. */
|
||||||
|
etimer_set(&timer, CLOCK_SECOND * 10);
|
||||||
|
/* Wait until all nodes have joined */
|
||||||
|
do {
|
||||||
|
PROCESS_WAIT_EVENT_UNTIL(etimer_expired(&timer));
|
||||||
|
etimer_reset(&timer);
|
||||||
|
|
||||||
|
if(deployment_node_count() > NETSTACK_MAX_ROUTE_ENTRIES) {
|
||||||
|
LOG_WARN("Not enough routing entries for deployment: %u/%u\n",
|
||||||
|
deployment_node_count(), NETSTACK_MAX_ROUTE_ENTRIES);
|
||||||
|
}
|
||||||
|
LOG_INFO("Node count: %u/%u\n", uip_sr_num_nodes(), deployment_node_count());
|
||||||
|
|
||||||
|
} while(uip_sr_num_nodes() < deployment_node_count());
|
||||||
|
|
||||||
|
/* Now start requesting nodes at random */
|
||||||
|
etimer_set(&timer, SEND_INTERVAL);
|
||||||
|
while(uip_sr_num_nodes() == deployment_node_count()) {
|
||||||
|
static uint32_t count = 0;
|
||||||
|
uint16_t dest_id;
|
||||||
|
|
||||||
|
PROCESS_WAIT_EVENT_UNTIL(etimer_expired(&timer));
|
||||||
|
etimer_reset(&timer);
|
||||||
|
|
||||||
|
/* Select a destination at random. Iterate until we do not select ourselve */
|
||||||
|
do {
|
||||||
|
dest_id = deployment_id_from_index(random_rand() % deployment_node_count());
|
||||||
|
} while(dest_id == ROOT_ID);
|
||||||
|
/* Prefix was already set, set IID now */
|
||||||
|
deployment_iid_from_id(&dest_ipaddr, dest_id);
|
||||||
|
|
||||||
|
/* Request: most significant bit not unset */
|
||||||
|
LOG_INFO("Sending request %"PRIu32" to ", count);
|
||||||
|
LOG_INFO_6ADDR(&dest_ipaddr);
|
||||||
|
LOG_INFO_("\n");
|
||||||
|
simple_udp_sendto(&udp_conn, &count, sizeof(count), &dest_ipaddr);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
PROCESS_END();
|
||||||
|
}
|
||||||
|
/*---------------------------------------------------------------------------*/
|
269
examples/benchmarks/rpl-req-resp/parse.py
Normal file
269
examples/benchmarks/rpl-req-resp/parse.py
Normal file
@ -0,0 +1,269 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import re
|
||||||
|
import os
|
||||||
|
import fileinput
|
||||||
|
import math
|
||||||
|
import yaml
|
||||||
|
import pandas as pd
|
||||||
|
from pandas import *
|
||||||
|
from pylab import *
|
||||||
|
from datetime import *
|
||||||
|
from collections import OrderedDict
|
||||||
|
from IPython import embed
|
||||||
|
import matplotlib as mpl
|
||||||
|
|
||||||
|
pd.set_option('display.max_rows', 48)
|
||||||
|
pd.set_option('display.width', None)
|
||||||
|
pd.set_option('display.max_columns', None)
|
||||||
|
|
||||||
|
networkFormationTime = None
|
||||||
|
parents = {}
|
||||||
|
|
||||||
|
def calculateHops(node):
|
||||||
|
hops = 0
|
||||||
|
while(parents[node] != None):
|
||||||
|
node = parents[node]
|
||||||
|
hops += 1
|
||||||
|
# safeguard, in case of scrambled logs
|
||||||
|
if hops > 50:
|
||||||
|
return hops
|
||||||
|
return hops
|
||||||
|
|
||||||
|
def calculateChildren(node):
|
||||||
|
children = 0
|
||||||
|
for n in parents.keys():
|
||||||
|
if(parents[n] == node):
|
||||||
|
children += 1
|
||||||
|
return children
|
||||||
|
|
||||||
|
def updateTopology(child, parent):
|
||||||
|
global parents
|
||||||
|
if not child in parents:
|
||||||
|
parents[child] = {}
|
||||||
|
if not parent in parents:
|
||||||
|
parents[parent] = None
|
||||||
|
parents[child] = parent
|
||||||
|
|
||||||
|
def parseRPL(log):
|
||||||
|
res = re.compile('.*? rank (\d*).*?dioint (\d*).*?nbr count (\d*)').match(log)
|
||||||
|
if res:
|
||||||
|
rank = int(res.group(1))
|
||||||
|
trickle = (2**int(res.group(2)))/(60*1000.)
|
||||||
|
nbrCount = int(res.group(3))
|
||||||
|
return {'event': 'rank', 'rank': rank, 'trickle': trickle }
|
||||||
|
res = re.compile('parent switch: .*? -> .*?-(\d*)$').match(log)
|
||||||
|
if res:
|
||||||
|
parent = int(res.group(1))
|
||||||
|
return {'event': 'switch', 'pswitch': parent }
|
||||||
|
res = re.compile('sending a (.+?) ').match(log)
|
||||||
|
if res:
|
||||||
|
message = res.group(1)
|
||||||
|
return {'event': 'sending', 'message': message }
|
||||||
|
res = re.compile('links: 6G-(\d+)\s*to 6G-(\d+)').match(log)
|
||||||
|
if res:
|
||||||
|
child = int(res.group(1))
|
||||||
|
parent = int(res.group(2))
|
||||||
|
updateTopology(child, parent)
|
||||||
|
return None
|
||||||
|
res = re.compile('links: end of list').match(log)
|
||||||
|
if res:
|
||||||
|
# This was the last line, commit full topology
|
||||||
|
return {'event': 'topology' }
|
||||||
|
return None
|
||||||
|
|
||||||
|
def parseEnergest(log):
|
||||||
|
res = re.compile('Radio Tx\s*:\s*(\d*)/\s*(\d+)').match(log)
|
||||||
|
if res:
|
||||||
|
tx = float(res.group(1))
|
||||||
|
total = float(res.group(2))
|
||||||
|
return {'channel-utilization': 100.*tx/total }
|
||||||
|
res = re.compile('Radio total\s*:\s*(\d*)/\s*(\d+)').match(log)
|
||||||
|
if res:
|
||||||
|
radio = float(res.group(1))
|
||||||
|
total = float(res.group(2))
|
||||||
|
return {'duty-cycle': 100.*radio/total }
|
||||||
|
return None
|
||||||
|
|
||||||
|
def parseApp(log):
|
||||||
|
res = re.compile('Sending (.+?) (\d+) to 6G-(\d+)').match(log)
|
||||||
|
if res:
|
||||||
|
type = res.group(1)
|
||||||
|
id = int(res.group(2))
|
||||||
|
dest = int(res.group(3))
|
||||||
|
return {'event': 'send', 'type': type, 'id': id, 'node': dest }
|
||||||
|
res = re.compile('Received (.+?) (\d+) from 6G-(\d+)').match(log)
|
||||||
|
if res:
|
||||||
|
type = res.group(1)
|
||||||
|
id = int(res.group(2))
|
||||||
|
src = int(res.group(3))
|
||||||
|
return {'event': 'recv', 'type': type, 'id': id, 'src': src }
|
||||||
|
return None
|
||||||
|
|
||||||
|
def parseLine(line):
|
||||||
|
res = re.compile('\s*([.\d]+)\\tID:(\d+)\\t\[(.*?):(.*?)\](.*)$').match(line)
|
||||||
|
if res:
|
||||||
|
time = float(res.group(1))
|
||||||
|
nodeid = int(res.group(2))
|
||||||
|
level = res.group(3).strip()
|
||||||
|
module = res.group(4).strip()
|
||||||
|
log = res.group(5).strip()
|
||||||
|
return time, nodeid, level, module, log
|
||||||
|
return None, None, None, None, None
|
||||||
|
|
||||||
|
def doParse(file):
|
||||||
|
global networkFormationTime
|
||||||
|
|
||||||
|
time = None
|
||||||
|
lastPrintedTime = 0
|
||||||
|
|
||||||
|
arrays = {
|
||||||
|
"packets": [],
|
||||||
|
"energest": [],
|
||||||
|
"ranks": [],
|
||||||
|
"trickle": [],
|
||||||
|
"switches": [],
|
||||||
|
"topology": [],
|
||||||
|
}
|
||||||
|
|
||||||
|
# print("\nProcessing %s" %(file))
|
||||||
|
# Filter out non-printable chars from log file
|
||||||
|
os.system("cat %s | tr -dc '[:print:]\n\t' | sponge %s" %(file, file))
|
||||||
|
for line in open(file, 'r').readlines():
|
||||||
|
# match time, id, module, log; The common format for all log lines
|
||||||
|
time, nodeid, level, module, log = parseLine(line)
|
||||||
|
|
||||||
|
if time == None:
|
||||||
|
# malformed line
|
||||||
|
continue
|
||||||
|
|
||||||
|
if time - lastPrintedTime >= 60:
|
||||||
|
# print("%u, "%(time / 60),end='', flush=True)
|
||||||
|
lastPrintedTime = time
|
||||||
|
|
||||||
|
entry = {
|
||||||
|
"timestamp": timedelta(seconds=time),
|
||||||
|
"node": nodeid,
|
||||||
|
}
|
||||||
|
|
||||||
|
try:
|
||||||
|
if module == "App":
|
||||||
|
ret = parseApp(log)
|
||||||
|
if(ret != None):
|
||||||
|
entry.update(ret)
|
||||||
|
if(ret['event'] == 'send' and ret['type'] == 'request'):
|
||||||
|
# populate series of sent requests
|
||||||
|
entry['pdr'] = 0.
|
||||||
|
arrays["packets"].append(entry)
|
||||||
|
if networkFormationTime == None:
|
||||||
|
networkFormationTime = time
|
||||||
|
elif(ret['event'] == 'recv' and ret['type'] == 'response'):
|
||||||
|
# update sent request series with latency and PDR
|
||||||
|
txElement = [x for x in arrays["packets"] if x['event']=='send' and x['id']==ret['id']][0]
|
||||||
|
txElement['latency'] = time - txElement['timestamp'].seconds
|
||||||
|
txElement['pdr'] = 100.
|
||||||
|
|
||||||
|
if module == "Energest":
|
||||||
|
ret = parseEnergest(log)
|
||||||
|
if(ret != None):
|
||||||
|
entry.update(ret)
|
||||||
|
arrays["energest"].append(entry)
|
||||||
|
|
||||||
|
if module == "RPL":
|
||||||
|
ret = parseRPL(log)
|
||||||
|
if(ret != None):
|
||||||
|
entry.update(ret)
|
||||||
|
if(ret['event'] == 'rank'):
|
||||||
|
arrays["ranks"].append(entry)
|
||||||
|
arrays["trickle"].append(entry)
|
||||||
|
elif(ret['event'] == 'switch'):
|
||||||
|
arrays["switches"].append(entry)
|
||||||
|
elif(ret['event'] == 'sending'):
|
||||||
|
if not ret['message'] in arrays:
|
||||||
|
arrays[ret['message']] = []
|
||||||
|
arrays[ret['message']].append(entry)
|
||||||
|
elif(ret['event'] == 'topology'):
|
||||||
|
for n in parents.keys():
|
||||||
|
nodeEntry = entry.copy()
|
||||||
|
nodeEntry["node"] = n
|
||||||
|
nodeEntry["hops"] = calculateHops(n)
|
||||||
|
nodeEntry["children"] = calculateChildren(n)
|
||||||
|
arrays["topology"].append(nodeEntry)
|
||||||
|
except: # typical exception: failed str conversion to int, due to lossy logs
|
||||||
|
print("Exception: %s" %(str(sys.exc_info()[0])))
|
||||||
|
continue
|
||||||
|
|
||||||
|
# print("")
|
||||||
|
|
||||||
|
# Remove last few packets -- might be in-flight when test stopped
|
||||||
|
arrays["packets"] = arrays["packets"][0:-10]
|
||||||
|
|
||||||
|
dfs = {}
|
||||||
|
for key in arrays.keys():
|
||||||
|
if(len(arrays[key]) > 0):
|
||||||
|
df = DataFrame(arrays[key])
|
||||||
|
dfs[key] = df.set_index("timestamp")
|
||||||
|
|
||||||
|
return dfs
|
||||||
|
|
||||||
|
def outputStats(dfs, key, metric, agg, name, metricLabel = None):
|
||||||
|
if not key in dfs:
|
||||||
|
return
|
||||||
|
|
||||||
|
df = dfs[key]
|
||||||
|
perNode = getattr(df.groupby("node")[metric], agg)()
|
||||||
|
perTime = getattr(df.groupby([pd.Grouper(freq="2Min")])[metric], agg)()
|
||||||
|
|
||||||
|
print(" %s:" %(metricLabel if metricLabel != None else metric))
|
||||||
|
print(" name: %s" %(name))
|
||||||
|
print(" per-node:")
|
||||||
|
print(" x: [%s]" %(", ".join(["%u"%x for x in sort(df.node.unique())])))
|
||||||
|
print(" y: [%s]" %(', '.join(["%.4f"%(x) for x in perNode])))
|
||||||
|
print(" per-time:")
|
||||||
|
print(" x: [%s]" %(", ".join(["%u"%x for x in range(0, 2*len(df.groupby([pd.Grouper(freq="2Min")]).mean().index), 2)])))
|
||||||
|
print(" y: [%s]" %(', '.join(["%.4f"%(x) for x in perTime]).replace("nan", "null")))
|
||||||
|
|
||||||
|
def main():
|
||||||
|
if len(sys.argv) < 1:
|
||||||
|
return
|
||||||
|
else:
|
||||||
|
file = sys.argv[1].rstrip('/')
|
||||||
|
|
||||||
|
# Parse the original log
|
||||||
|
dfs = doParse(file)
|
||||||
|
|
||||||
|
if len(dfs) == 0:
|
||||||
|
return
|
||||||
|
|
||||||
|
print("global-stats:")
|
||||||
|
print(" pdr: %.4f" %(dfs["packets"]["pdr"].mean()))
|
||||||
|
print(" loss-rate: %.e" %(1-(dfs["packets"]["pdr"].mean()/100)))
|
||||||
|
print(" packets-sent: %u" %(dfs["packets"]["pdr"].count()))
|
||||||
|
print(" packets-received: %u" %(dfs["packets"]["pdr"].sum()/100))
|
||||||
|
print(" latency: %.4f" %(dfs["packets"]["latency"].mean()))
|
||||||
|
print(" duty-cycle: %.2f" %(dfs["energest"]["duty-cycle"].mean()))
|
||||||
|
print(" channel-utilization: %.2f" %(dfs["energest"]["channel-utilization"].mean()))
|
||||||
|
print(" network-formation-time: %.2f" %(networkFormationTime))
|
||||||
|
print("stats:")
|
||||||
|
|
||||||
|
# Output relevant metrics
|
||||||
|
outputStats(dfs, "packets", "pdr", "mean", "Round-trip PDR (%)")
|
||||||
|
outputStats(dfs, "packets", "latency", "mean", "Round-trip latency (s)")
|
||||||
|
|
||||||
|
outputStats(dfs, "energest", "duty-cycle", "mean", "Radio duty cycle (%)")
|
||||||
|
outputStats(dfs, "energest", "channel-utilization", "mean", "Channel utilization (%)")
|
||||||
|
|
||||||
|
outputStats(dfs, "ranks", "rank", "mean", "RPL rank (ETX-128)")
|
||||||
|
outputStats(dfs, "switches", "pswitch", "count", "RPL parent switches (#)")
|
||||||
|
outputStats(dfs, "trickle", "trickle", "mean", "RPL Trickle period (min)")
|
||||||
|
|
||||||
|
outputStats(dfs, "DIS", "message", "count", "RPL DIS sent (#)", "rpl-dis")
|
||||||
|
outputStats(dfs, "unicast-DIO", "message", "count", "RPL uDIO sent (#)", "rpl-udio")
|
||||||
|
outputStats(dfs, "multicast-DIO", "message", "count", "RPL mDIO sent (#)", "rpl-mdio")
|
||||||
|
outputStats(dfs, "DAO", "message", "count", "RPL DAO sent (#)", "rpl-dao")
|
||||||
|
outputStats(dfs, "DAO-ACK", "message", "count", "RPL DAO-ACK sent (#)", "rpl-daoack")
|
||||||
|
|
||||||
|
outputStats(dfs, "topology", "hops", "mean", "RPL hop count (#)")
|
||||||
|
outputStats(dfs, "topology", "children", "mean", "RPL children count (#)")
|
||||||
|
|
||||||
|
main()
|
48
examples/benchmarks/rpl-req-resp/project-conf.h
Normal file
48
examples/benchmarks/rpl-req-resp/project-conf.h
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
#ifndef PROJECT_CONF_H_
|
||||||
|
#define PROJECT_CONF_H_
|
||||||
|
|
||||||
|
/* Testbed configuration */
|
||||||
|
#define ROOT_ID 1
|
||||||
|
#if CONTIKI_TARGET_COOJA
|
||||||
|
#define DEPLOYMENT_MAPPING deployment_cooja8
|
||||||
|
#else /* CONTIKI_TARGET_COOJA */
|
||||||
|
#define DEPLOYMENT_MAPPING deployment_sics_firefly
|
||||||
|
#endif /* CONTIKI_TARGET_COOJA */
|
||||||
|
#define IEEE802154_CONF_PANID 0x8921
|
||||||
|
|
||||||
|
/* Logging */
|
||||||
|
#define LOG_CONF_LEVEL_RPL LOG_LEVEL_INFO
|
||||||
|
#define LOG_CONF_LEVEL_MAC LOG_LEVEL_WARN
|
||||||
|
#define LOG_CONF_WITH_COMPACT_ADDR 1
|
||||||
|
|
||||||
|
/* Provisioning */
|
||||||
|
#define NETSTACK_MAX_ROUTE_ENTRIES 25
|
||||||
|
#define NBR_TABLE_CONF_MAX_NEIGHBORS 8
|
||||||
|
|
||||||
|
#if CONFIG_OPTIMS >= 1
|
||||||
|
|
||||||
|
/* RPL configuration */
|
||||||
|
#define RPL_MRHOF_CONF_SQUARED_ETX 1
|
||||||
|
#define RPL_CONF_MAX_RANKINC 0
|
||||||
|
|
||||||
|
/* TSCH configuration */
|
||||||
|
#define TSCH_CONF_RX_WAIT 1000
|
||||||
|
#define ORCHESTRA_CONF_UNICAST_PERIOD 7
|
||||||
|
|
||||||
|
#if CONFIG_OPTIMS == 2
|
||||||
|
|
||||||
|
/* Five nines reliability paper used the config below */
|
||||||
|
#define RPL_CONF_DIO_INTERVAL_MIN 14 /* 2^14 ms = 16.384 s */
|
||||||
|
#define RPL_CONF_DIO_INTERVAL_DOUBLINGS 6 /* 2^(14+6) ms = 1048.576 s */
|
||||||
|
#define RPL_CONF_PROBING_INTERVAL (60 * CLOCK_SECOND)
|
||||||
|
|
||||||
|
/* Five nines reliability paper used the config below */
|
||||||
|
#define TSCH_CONF_KEEPALIVE_TIMEOUT (20 * CLOCK_SECOND)
|
||||||
|
#define TSCH_CONF_MAX_KEEPALIVE_TIMEOUT (60 * CLOCK_SECOND)
|
||||||
|
//#define TSCH_CONF_EB_PERIOD (16 * CLOCK_SECOND)
|
||||||
|
//#define TSCH_CONF_MAX_EB_PERIOD (50 * CLOCK_SECOND)
|
||||||
|
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* PROJECT_CONF_H_ */
|
275
examples/benchmarks/rpl-req-resp/sim.csc
Normal file
275
examples/benchmarks/rpl-req-resp/sim.csc
Normal file
@ -0,0 +1,275 @@
|
|||||||
|
<?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]/powertracker</project>
|
||||||
|
<simulation>
|
||||||
|
<title>My simulation</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>mtype90</identifier>
|
||||||
|
<description>Cooja Mote Type #1</description>
|
||||||
|
<source>[CONTIKI_DIR]/examples/benchmarks/rpl-req-resp/node.c</source>
|
||||||
|
<commands>make node.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>12.478629242391953</x>
|
||||||
|
<y>42.201041276604826</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>mtype90</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
org.contikios.cooja.interfaces.Position
|
||||||
|
<x>25.625935608473608</x>
|
||||||
|
<y>82.53975431376661</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>mtype90</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
org.contikios.cooja.interfaces.Position
|
||||||
|
<x>51.615094138350024</x>
|
||||||
|
<y>59.70602651475372</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>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==</eeprom>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype90</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
org.contikios.cooja.interfaces.Position
|
||||||
|
<x>41.04314122620578</x>
|
||||||
|
<y>121.24693889311891</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>4</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>mtype90</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
org.contikios.cooja.interfaces.Position
|
||||||
|
<x>64.9463558635099</x>
|
||||||
|
<y>104.25039302469283</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>5</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>mtype90</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
org.contikios.cooja.interfaces.Position
|
||||||
|
<x>93.59263858654369</x>
|
||||||
|
<y>75.40399148300003</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>6</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>mtype90</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
org.contikios.cooja.interfaces.Position
|
||||||
|
<x>75.6297158696234</x>
|
||||||
|
<y>139.97002035548905</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>7</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>mtype90</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
org.contikios.cooja.interfaces.Position
|
||||||
|
<x>104.34293924684245</x>
|
||||||
|
<y>116.07658566915099</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>8</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>mtype90</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
</simulation>
|
||||||
|
<plugin>
|
||||||
|
org.contikios.cooja.plugins.SimControl
|
||||||
|
<width>280</width>
|
||||||
|
<z>2</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.GridVisualizerSkin</skin>
|
||||||
|
<skin>org.contikios.cooja.plugins.skins.TrafficVisualizerSkin</skin>
|
||||||
|
<skin>org.contikios.cooja.plugins.skins.UDGMVisualizerSkin</skin>
|
||||||
|
<viewport>2.4250860844175466 0.0 0.0 2.4250860844175466 35.26895372864869 -46.9106236441515</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>App</filter>
|
||||||
|
<formatted_time />
|
||||||
|
<coloring />
|
||||||
|
</plugin_config>
|
||||||
|
<width>827</width>
|
||||||
|
<z>0</z>
|
||||||
|
<height>665</height>
|
||||||
|
<location_x>681</location_x>
|
||||||
|
<location_y>-1</location_y>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
org.contikios.cooja.plugins.TimeLine
|
||||||
|
<plugin_config>
|
||||||
|
<mote>0</mote>
|
||||||
|
<mote>1</mote>
|
||||||
|
<mote>2</mote>
|
||||||
|
<mote>3</mote>
|
||||||
|
<mote>4</mote>
|
||||||
|
<mote>5</mote>
|
||||||
|
<mote>6</mote>
|
||||||
|
<mote>7</mote>
|
||||||
|
<showRadioRXTX />
|
||||||
|
<showRadioHW />
|
||||||
|
<showLEDs />
|
||||||
|
<zoomfactor>500.0</zoomfactor>
|
||||||
|
</plugin_config>
|
||||||
|
<width>1539</width>
|
||||||
|
<z>1</z>
|
||||||
|
<height>263</height>
|
||||||
|
<location_x>0</location_x>
|
||||||
|
<location_y>709</location_y>
|
||||||
|
</plugin>
|
||||||
|
</simconf>
|
14
examples/benchmarks/testbeds/cooja8.c
Normal file
14
examples/benchmarks/testbeds/cooja8.c
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
#include "services/deployment/deployment.h"
|
||||||
|
|
||||||
|
/** \brief A mapping table for a 8-node Cooja mote simulation. */
|
||||||
|
const struct id_mac deployment_cooja8[] = {
|
||||||
|
{ 1, {{0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01}}},
|
||||||
|
{ 2, {{0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02}}},
|
||||||
|
{ 3, {{0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03}}},
|
||||||
|
{ 4, {{0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x04}}},
|
||||||
|
{ 5, {{0x00,0x05,0x00,0x05,0x00,0x05,0x00,0x05}}},
|
||||||
|
{ 6, {{0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06}}},
|
||||||
|
{ 7, {{0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x07}}},
|
||||||
|
{ 8, {{0x00,0x08,0x00,0x08,0x00,0x08,0x00,0x08}}},
|
||||||
|
{ 0, {{0}}}
|
||||||
|
};
|
31
examples/benchmarks/testbeds/sics-firefly.c
Normal file
31
examples/benchmarks/testbeds/sics-firefly.c
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
#include "services/deployment/deployment.h"
|
||||||
|
|
||||||
|
/** \brief The 25-node RISE SICS node testbed. Firefly-reva nodes. */
|
||||||
|
const struct id_mac deployment_sics_firefly[] = {
|
||||||
|
{ 1, {{0x00,0x12,0x4b,0x00,0x06,0x0d,0xb6,0x14}}},
|
||||||
|
{ 2, {{0x00,0x12,0x4b,0x00,0x06,0x0d,0xb1,0xe7}}},
|
||||||
|
{ 3, {{0x00,0x12,0x4b,0x00,0x06,0x0d,0xb4,0x35}}},
|
||||||
|
{ 4, {{0x00,0x12,0x4b,0x00,0x06,0x0d,0xb1,0xcf}}},
|
||||||
|
{ 5, {{0x00,0x12,0x4b,0x00,0x06,0x0d,0xb2,0x06}}},
|
||||||
|
{ 6, {{0x00,0x12,0x4b,0x00,0x06,0x0d,0xb1,0x5f}}},
|
||||||
|
{ 8, {{0x00,0x12,0x4b,0x00,0x06,0x0d,0xb1,0x91}}},
|
||||||
|
{ 7, {{0x00,0x12,0x4b,0x00,0x06,0x0d,0xb1,0x29}}},
|
||||||
|
{ 9, {{0x00,0x12,0x4b,0x00,0x06,0x0d,0xb1,0xc6}}},
|
||||||
|
{ 10, {{0x00,0x12,0x4b,0x00,0x06,0x0d,0xb1,0x63}}},
|
||||||
|
{ 12, {{0x00,0x12,0x4b,0x00,0x06,0x0d,0xb2,0x03}}},
|
||||||
|
{ 11, {{0x00,0x12,0x4b,0x00,0x06,0x0d,0xb4,0x3b}}},
|
||||||
|
{ 13, {{0x00,0x12,0x4b,0x00,0x06,0x0d,0xb6,0x0d}}},
|
||||||
|
{ 14, {{0x00,0x12,0x4b,0x00,0x06,0x0d,0xb5,0x66}}},
|
||||||
|
{ 15, {{0x00,0x12,0x4b,0x00,0x06,0x0d,0xb5,0x8a}}},
|
||||||
|
{ 16, {{0x00,0x12,0x4b,0x00,0x06,0x0d,0xb4,0x49}}},
|
||||||
|
{ 17, {{0x00,0x12,0x4b,0x00,0x06,0x0d,0xb1,0x35}}},
|
||||||
|
{ 18, {{0x00,0x12,0x4b,0x00,0x06,0x0d,0xb2,0x15}}},
|
||||||
|
{ 19, {{0x00,0x12,0x4b,0x00,0x06,0x0d,0xb5,0xfc}}},
|
||||||
|
{ 20, {{0x00,0x12,0x4b,0x00,0x06,0x0d,0xb1,0xa8}}},
|
||||||
|
{ 21, {{0x00,0x12,0x4b,0x00,0x06,0x0d,0xb1,0x6a}}},
|
||||||
|
{ 22, {{0x00,0x12,0x4b,0x00,0x06,0x0d,0xb4,0x5b}}},
|
||||||
|
{ 23, {{0x00,0x12,0x4b,0x00,0x06,0x0d,0xb1,0xe6}}},
|
||||||
|
{ 24, {{0x00,0x12,0x4b,0x00,0x06,0x0d,0xb6,0x00}}},
|
||||||
|
{ 25, {{0x00,0x12,0x4b,0x00,0x06,0x0d,0xb1,0xb8}}},
|
||||||
|
{ 0, {{0}}}
|
||||||
|
};
|
@ -1017,7 +1017,8 @@ newdata(void)
|
|||||||
|
|
||||||
namemapptr->state = STATE_DONE;
|
namemapptr->state = STATE_DONE;
|
||||||
#if RESOLV_SUPPORTS_RECORD_EXPIRATION
|
#if RESOLV_SUPPORTS_RECORD_EXPIRATION
|
||||||
namemapptr->expiration = ans->ttl[1] + (ans->ttl[0] << 8);
|
namemapptr->expiration = (uint32_t) uip_ntohs(ans->ttl[0]) << 16 |
|
||||||
|
(uint32_t) uip_ntohs(ans->ttl[1]);
|
||||||
namemapptr->expiration += clock_seconds();
|
namemapptr->expiration += clock_seconds();
|
||||||
#endif /* RESOLV_SUPPORTS_RECORD_EXPIRATION */
|
#endif /* RESOLV_SUPPORTS_RECORD_EXPIRATION */
|
||||||
|
|
||||||
|
@ -480,7 +480,7 @@ output_fallback(void)
|
|||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static void
|
static void
|
||||||
annotate_transmission(uip_ipaddr_t *nexthop)
|
annotate_transmission(const uip_ipaddr_t *nexthop)
|
||||||
{
|
{
|
||||||
#if TCPIP_CONF_ANNOTATE_TRANSMISSIONS
|
#if TCPIP_CONF_ANNOTATE_TRANSMISSIONS
|
||||||
static uint8_t annotate_last;
|
static uint8_t annotate_last;
|
||||||
@ -495,10 +495,10 @@ annotate_transmission(uip_ipaddr_t *nexthop)
|
|||||||
#endif /* TCPIP_CONF_ANNOTATE_TRANSMISSIONS */
|
#endif /* TCPIP_CONF_ANNOTATE_TRANSMISSIONS */
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static uip_ipaddr_t*
|
static const uip_ipaddr_t*
|
||||||
get_nexthop(uip_ipaddr_t *addr)
|
get_nexthop(uip_ipaddr_t *addr)
|
||||||
{
|
{
|
||||||
uip_ipaddr_t *nexthop;
|
const uip_ipaddr_t *nexthop;
|
||||||
uip_ds6_route_t *route;
|
uip_ds6_route_t *route;
|
||||||
|
|
||||||
LOG_INFO("output: processing %u bytes packet from ", uip_len);
|
LOG_INFO("output: processing %u bytes packet from ", uip_len);
|
||||||
@ -597,7 +597,7 @@ send_queued(uip_ds6_nbr_t *nbr)
|
|||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static int
|
static int
|
||||||
send_nd6_ns(uip_ipaddr_t *nexthop)
|
send_nd6_ns(const uip_ipaddr_t *nexthop)
|
||||||
{
|
{
|
||||||
int err = 1;
|
int err = 1;
|
||||||
|
|
||||||
@ -638,7 +638,7 @@ tcpip_ipv6_output(void)
|
|||||||
uip_ipaddr_t ipaddr;
|
uip_ipaddr_t ipaddr;
|
||||||
uip_ds6_nbr_t *nbr = NULL;
|
uip_ds6_nbr_t *nbr = NULL;
|
||||||
const uip_lladdr_t *linkaddr;
|
const uip_lladdr_t *linkaddr;
|
||||||
uip_ipaddr_t *nexthop;
|
const uip_ipaddr_t *nexthop;
|
||||||
|
|
||||||
if(uip_len == 0) {
|
if(uip_len == 0) {
|
||||||
return;
|
return;
|
||||||
|
@ -133,8 +133,8 @@ assert_nbr_routes_list_sane(void)
|
|||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
#if UIP_DS6_NOTIFICATIONS
|
#if UIP_DS6_NOTIFICATIONS
|
||||||
static void
|
static void
|
||||||
call_route_callback(int event, uip_ipaddr_t *route,
|
call_route_callback(int event, const uip_ipaddr_t *route,
|
||||||
uip_ipaddr_t *nexthop)
|
const uip_ipaddr_t *nexthop)
|
||||||
{
|
{
|
||||||
int num;
|
int num;
|
||||||
struct uip_ds6_notification *n;
|
struct uip_ds6_notification *n;
|
||||||
@ -199,7 +199,7 @@ uip_ds6_route_nexthop_lladdr(uip_ds6_route_t *route)
|
|||||||
}
|
}
|
||||||
#endif /* (UIP_MAX_ROUTES != 0) */
|
#endif /* (UIP_MAX_ROUTES != 0) */
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
uip_ipaddr_t *
|
const uip_ipaddr_t *
|
||||||
uip_ds6_route_nexthop(uip_ds6_route_t *route)
|
uip_ds6_route_nexthop(uip_ds6_route_t *route)
|
||||||
{
|
{
|
||||||
#if (UIP_MAX_ROUTES != 0)
|
#if (UIP_MAX_ROUTES != 0)
|
||||||
@ -263,7 +263,7 @@ uip_ds6_route_num_routes(void)
|
|||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
uip_ds6_route_t *
|
uip_ds6_route_t *
|
||||||
uip_ds6_route_lookup(uip_ipaddr_t *addr)
|
uip_ds6_route_lookup(const uip_ipaddr_t *addr)
|
||||||
{
|
{
|
||||||
#if (UIP_MAX_ROUTES != 0)
|
#if (UIP_MAX_ROUTES != 0)
|
||||||
uip_ds6_route_t *r;
|
uip_ds6_route_t *r;
|
||||||
@ -321,8 +321,8 @@ uip_ds6_route_lookup(uip_ipaddr_t *addr)
|
|||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
uip_ds6_route_t *
|
uip_ds6_route_t *
|
||||||
uip_ds6_route_add(uip_ipaddr_t *ipaddr, uint8_t length,
|
uip_ds6_route_add(const uip_ipaddr_t *ipaddr, uint8_t length,
|
||||||
uip_ipaddr_t *nexthop)
|
const uip_ipaddr_t *nexthop)
|
||||||
{
|
{
|
||||||
#if (UIP_MAX_ROUTES != 0)
|
#if (UIP_MAX_ROUTES != 0)
|
||||||
uip_ds6_route_t *r;
|
uip_ds6_route_t *r;
|
||||||
@ -350,7 +350,7 @@ uip_ds6_route_add(uip_ipaddr_t *ipaddr, uint8_t length,
|
|||||||
one first. */
|
one first. */
|
||||||
r = uip_ds6_route_lookup(ipaddr);
|
r = uip_ds6_route_lookup(ipaddr);
|
||||||
if(r != NULL) {
|
if(r != NULL) {
|
||||||
uip_ipaddr_t *current_nexthop;
|
const uip_ipaddr_t *current_nexthop;
|
||||||
current_nexthop = uip_ds6_route_nexthop(r);
|
current_nexthop = uip_ds6_route_nexthop(r);
|
||||||
if(current_nexthop != NULL && uip_ipaddr_cmp(nexthop, current_nexthop)) {
|
if(current_nexthop != NULL && uip_ipaddr_cmp(nexthop, current_nexthop)) {
|
||||||
/* no need to update route - already correct! */
|
/* no need to update route - already correct! */
|
||||||
@ -580,7 +580,7 @@ rm_routelist_callback(nbr_table_item_t *ptr)
|
|||||||
#endif /* (UIP_MAX_ROUTES != 0) */
|
#endif /* (UIP_MAX_ROUTES != 0) */
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
void
|
void
|
||||||
uip_ds6_route_rm_by_nexthop(uip_ipaddr_t *nexthop)
|
uip_ds6_route_rm_by_nexthop(const uip_ipaddr_t *nexthop)
|
||||||
{
|
{
|
||||||
#if (UIP_MAX_ROUTES != 0)
|
#if (UIP_MAX_ROUTES != 0)
|
||||||
/* Get routing entry list of this neighbor */
|
/* Get routing entry list of this neighbor */
|
||||||
@ -601,7 +601,7 @@ uip_ds6_defrt_head(void)
|
|||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
uip_ds6_defrt_t *
|
uip_ds6_defrt_t *
|
||||||
uip_ds6_defrt_add(uip_ipaddr_t *ipaddr, unsigned long interval)
|
uip_ds6_defrt_add(const uip_ipaddr_t *ipaddr, unsigned long interval)
|
||||||
{
|
{
|
||||||
uip_ds6_defrt_t *d;
|
uip_ds6_defrt_t *d;
|
||||||
|
|
||||||
@ -684,7 +684,7 @@ uip_ds6_defrt_rm(uip_ds6_defrt_t *defrt)
|
|||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
uip_ds6_defrt_t *
|
uip_ds6_defrt_t *
|
||||||
uip_ds6_defrt_lookup(uip_ipaddr_t *ipaddr)
|
uip_ds6_defrt_lookup(const uip_ipaddr_t *ipaddr)
|
||||||
{
|
{
|
||||||
uip_ds6_defrt_t *d;
|
uip_ds6_defrt_t *d;
|
||||||
if(ipaddr == NULL) {
|
if(ipaddr == NULL) {
|
||||||
@ -700,7 +700,7 @@ uip_ds6_defrt_lookup(uip_ipaddr_t *ipaddr)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
uip_ipaddr_t *
|
const uip_ipaddr_t *
|
||||||
uip_ds6_defrt_choose(void)
|
uip_ds6_defrt_choose(void)
|
||||||
{
|
{
|
||||||
uip_ds6_defrt_t *d;
|
uip_ds6_defrt_t *d;
|
||||||
|
@ -89,8 +89,8 @@ void uip_ds6_route_init(void);
|
|||||||
#define UIP_DS6_NOTIFICATION_ROUTE_RM 3
|
#define UIP_DS6_NOTIFICATION_ROUTE_RM 3
|
||||||
|
|
||||||
typedef void (* uip_ds6_notification_callback)(int event,
|
typedef void (* uip_ds6_notification_callback)(int event,
|
||||||
uip_ipaddr_t *route,
|
const uip_ipaddr_t *route,
|
||||||
uip_ipaddr_t *nexthop,
|
const uip_ipaddr_t *nexthop,
|
||||||
int num_routes);
|
int num_routes);
|
||||||
struct uip_ds6_notification {
|
struct uip_ds6_notification {
|
||||||
struct uip_ds6_notification *next;
|
struct uip_ds6_notification *next;
|
||||||
@ -201,11 +201,11 @@ typedef struct uip_ds6_defrt {
|
|||||||
/** \name Default router list basic routines */
|
/** \name Default router list basic routines */
|
||||||
/** @{ */
|
/** @{ */
|
||||||
uip_ds6_defrt_t *uip_ds6_defrt_head(void);
|
uip_ds6_defrt_t *uip_ds6_defrt_head(void);
|
||||||
uip_ds6_defrt_t *uip_ds6_defrt_add(uip_ipaddr_t *ipaddr,
|
uip_ds6_defrt_t *uip_ds6_defrt_add(const uip_ipaddr_t *ipaddr,
|
||||||
unsigned long interval);
|
unsigned long interval);
|
||||||
void uip_ds6_defrt_rm(uip_ds6_defrt_t *defrt);
|
void uip_ds6_defrt_rm(uip_ds6_defrt_t *defrt);
|
||||||
uip_ds6_defrt_t *uip_ds6_defrt_lookup(uip_ipaddr_t *ipaddr);
|
uip_ds6_defrt_t *uip_ds6_defrt_lookup(const uip_ipaddr_t *ipaddr);
|
||||||
uip_ipaddr_t *uip_ds6_defrt_choose(void);
|
const uip_ipaddr_t *uip_ds6_defrt_choose(void);
|
||||||
|
|
||||||
void uip_ds6_defrt_periodic(void);
|
void uip_ds6_defrt_periodic(void);
|
||||||
/** @} */
|
/** @} */
|
||||||
@ -213,13 +213,13 @@ void uip_ds6_defrt_periodic(void);
|
|||||||
|
|
||||||
/** \name Routing Table basic routines */
|
/** \name Routing Table basic routines */
|
||||||
/** @{ */
|
/** @{ */
|
||||||
uip_ds6_route_t *uip_ds6_route_lookup(uip_ipaddr_t *destipaddr);
|
uip_ds6_route_t *uip_ds6_route_lookup(const uip_ipaddr_t *destipaddr);
|
||||||
uip_ds6_route_t *uip_ds6_route_add(uip_ipaddr_t *ipaddr, uint8_t length,
|
uip_ds6_route_t *uip_ds6_route_add(const uip_ipaddr_t *ipaddr, uint8_t length,
|
||||||
uip_ipaddr_t *next_hop);
|
const uip_ipaddr_t *next_hop);
|
||||||
void uip_ds6_route_rm(uip_ds6_route_t *route);
|
void uip_ds6_route_rm(uip_ds6_route_t *route);
|
||||||
void uip_ds6_route_rm_by_nexthop(uip_ipaddr_t *nexthop);
|
void uip_ds6_route_rm_by_nexthop(const uip_ipaddr_t *nexthop);
|
||||||
|
|
||||||
uip_ipaddr_t *uip_ds6_route_nexthop(uip_ds6_route_t *);
|
const uip_ipaddr_t *uip_ds6_route_nexthop(uip_ds6_route_t *);
|
||||||
int uip_ds6_route_num_routes(void);
|
int uip_ds6_route_num_routes(void);
|
||||||
uip_ds6_route_t *uip_ds6_route_head(void);
|
uip_ds6_route_t *uip_ds6_route_head(void);
|
||||||
uip_ds6_route_t *uip_ds6_route_next(uip_ds6_route_t *);
|
uip_ds6_route_t *uip_ds6_route_next(uip_ds6_route_t *);
|
||||||
|
@ -171,6 +171,45 @@ tsch_schedule_get_link_by_handle(uint16_t handle)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
|
static const char *
|
||||||
|
print_link_options(uint16_t link_options)
|
||||||
|
{
|
||||||
|
static char buffer[20];
|
||||||
|
unsigned length;
|
||||||
|
|
||||||
|
buffer[0] = '\0';
|
||||||
|
if(link_options & LINK_OPTION_TX) {
|
||||||
|
strcat(buffer, "Tx|");
|
||||||
|
}
|
||||||
|
if(link_options & LINK_OPTION_RX) {
|
||||||
|
strcat(buffer, "Rx|");
|
||||||
|
}
|
||||||
|
if(link_options & LINK_OPTION_SHARED) {
|
||||||
|
strcat(buffer, "Sh|");
|
||||||
|
}
|
||||||
|
length = strlen(buffer);
|
||||||
|
if(length > 0) {
|
||||||
|
buffer[length - 1] = '\0';
|
||||||
|
}
|
||||||
|
|
||||||
|
return buffer;
|
||||||
|
}
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
static const char *
|
||||||
|
print_link_type(uint16_t link_type)
|
||||||
|
{
|
||||||
|
switch(link_type) {
|
||||||
|
case LINK_TYPE_NORMAL:
|
||||||
|
return "NORMAL";
|
||||||
|
case LINK_TYPE_ADVERTISING:
|
||||||
|
return "ADV";
|
||||||
|
case LINK_TYPE_ADVERTISING_ONLY:
|
||||||
|
return "ADV_ONLY";
|
||||||
|
default:
|
||||||
|
return "?";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
/* Adds a link to a slotframe, return a pointer to it (NULL if failure) */
|
/* Adds a link to a slotframe, return a pointer to it (NULL if failure) */
|
||||||
struct tsch_link *
|
struct tsch_link *
|
||||||
tsch_schedule_add_link(struct tsch_slotframe *slotframe,
|
tsch_schedule_add_link(struct tsch_slotframe *slotframe,
|
||||||
@ -218,8 +257,10 @@ tsch_schedule_add_link(struct tsch_slotframe *slotframe,
|
|||||||
}
|
}
|
||||||
linkaddr_copy(&l->addr, address);
|
linkaddr_copy(&l->addr, address);
|
||||||
|
|
||||||
LOG_INFO("add_link %u %u %u %u %u ",
|
LOG_INFO("add_link sf=%u opt=%s type=%s ts=%u ch=%u addr=",
|
||||||
slotframe->handle, link_options, link_type, timeslot, channel_offset);
|
slotframe->handle,
|
||||||
|
print_link_options(link_options),
|
||||||
|
print_link_type(link_type), timeslot, channel_offset);
|
||||||
LOG_INFO_LLADDR(address);
|
LOG_INFO_LLADDR(address);
|
||||||
LOG_INFO_("\n");
|
LOG_INFO_("\n");
|
||||||
/* Release the lock before we update the neighbor (will take the lock) */
|
/* Release the lock before we update the neighbor (will take the lock) */
|
||||||
@ -260,8 +301,10 @@ tsch_schedule_remove_link(struct tsch_slotframe *slotframe, struct tsch_link *l)
|
|||||||
if(l == current_link) {
|
if(l == current_link) {
|
||||||
current_link = NULL;
|
current_link = NULL;
|
||||||
}
|
}
|
||||||
LOG_INFO("remove_link %u %u %u %u ",
|
LOG_INFO("remove_link sf=%u opt=%s type=%s ts=%u ch=%u addr=",
|
||||||
slotframe->handle, l->link_options, l->timeslot, l->channel_offset);
|
slotframe->handle,
|
||||||
|
print_link_options(l->link_options),
|
||||||
|
print_link_type(l->link_type), l->timeslot, l->channel_offset);
|
||||||
LOG_INFO_LLADDR(&l->addr);
|
LOG_INFO_LLADDR(&l->addr);
|
||||||
LOG_INFO_("\n");
|
LOG_INFO_("\n");
|
||||||
|
|
||||||
|
@ -48,6 +48,7 @@ static void
|
|||||||
set_global_address(uip_ipaddr_t *prefix, uip_ipaddr_t *iid)
|
set_global_address(uip_ipaddr_t *prefix, uip_ipaddr_t *iid)
|
||||||
{
|
{
|
||||||
static uip_ipaddr_t root_ipaddr;
|
static uip_ipaddr_t root_ipaddr;
|
||||||
|
int i;
|
||||||
|
|
||||||
/* Assign a unique local address (RFC4193,
|
/* Assign a unique local address (RFC4193,
|
||||||
http://tools.ietf.org/html/rfc4193). */
|
http://tools.ietf.org/html/rfc4193). */
|
||||||
@ -68,7 +69,7 @@ set_global_address(uip_ipaddr_t *prefix, uip_ipaddr_t *iid)
|
|||||||
uint8_t state;
|
uint8_t state;
|
||||||
|
|
||||||
LOG_DBG("IPv6 addresses: ");
|
LOG_DBG("IPv6 addresses: ");
|
||||||
for(int i = 0; i < UIP_DS6_ADDR_NB; i++) {
|
for(i = 0; i < UIP_DS6_ADDR_NB; i++) {
|
||||||
state = uip_ds6_if.addr_list[i].state;
|
state = uip_ds6_if.addr_list[i].state;
|
||||||
if(uip_ds6_if.addr_list[i].isused &&
|
if(uip_ds6_if.addr_list[i].isused &&
|
||||||
(state == ADDR_TENTATIVE || state == ADDR_PREFERRED)) {
|
(state == ADDR_TENTATIVE || state == ADDR_PREFERRED)) {
|
||||||
|
@ -270,9 +270,11 @@ rpl_link_callback(const linkaddr_t *addr, int status, int numtx)
|
|||||||
if(parent != NULL) {
|
if(parent != NULL) {
|
||||||
/* If this is the neighbor we were probing urgently, mark urgent
|
/* If this is the neighbor we were probing urgently, mark urgent
|
||||||
probing as done */
|
probing as done */
|
||||||
|
#if RPL_WITH_PROBING
|
||||||
if(instance->urgent_probing_target == parent) {
|
if(instance->urgent_probing_target == parent) {
|
||||||
instance->urgent_probing_target = NULL;
|
instance->urgent_probing_target = NULL;
|
||||||
}
|
}
|
||||||
|
#endif /* RPL_WITH_PROBING */
|
||||||
/* Trigger DAG rank recalculation. */
|
/* Trigger DAG rank recalculation. */
|
||||||
LOG_DBG("rpl_link_callback triggering update\n");
|
LOG_DBG("rpl_link_callback triggering update\n");
|
||||||
parent->flags |= RPL_PARENT_FLAG_UPDATED;
|
parent->flags |= RPL_PARENT_FLAG_UPDATED;
|
||||||
|
@ -191,6 +191,13 @@
|
|||||||
#define RPL_DEFAULT_LEAF_ONLY 0
|
#define RPL_DEFAULT_LEAF_ONLY 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Function used to validate dio before using it to init dag
|
||||||
|
*/
|
||||||
|
#ifdef RPL_CONF_VALIDATE_DIO_FUNC
|
||||||
|
#define RPL_VALIDATE_DIO_FUNC RPL_CONF_VALIDATE_DIO_FUNC
|
||||||
|
#endif
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/********************************** Timing ************************************/
|
/********************************** Timing ************************************/
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
@ -61,6 +61,12 @@ static int init_dag_from_dio(rpl_dio_t *dio);
|
|||||||
/* Allocate instance table. */
|
/* Allocate instance table. */
|
||||||
rpl_instance_t curr_instance;
|
rpl_instance_t curr_instance;
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifdef RPL_VALIDATE_DIO_FUNC
|
||||||
|
int RPL_VALIDATE_DIO_FUNC(rpl_dio_t *dio);
|
||||||
|
#endif /* RPL_PROBING_SELECT_FUNC */
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
const char *
|
const char *
|
||||||
rpl_dag_state_to_str(enum rpl_dag_state state)
|
rpl_dag_state_to_str(enum rpl_dag_state state)
|
||||||
@ -542,6 +548,13 @@ init_dag_from_dio(rpl_dio_t *dio)
|
|||||||
static int
|
static int
|
||||||
process_dio_init_dag(uip_ipaddr_t *from, rpl_dio_t *dio)
|
process_dio_init_dag(uip_ipaddr_t *from, rpl_dio_t *dio)
|
||||||
{
|
{
|
||||||
|
#ifdef RPL_VALIDATE_DIO_FUNC
|
||||||
|
if(!RPL_VALIDATE_DIO_FUNC(dio)) {
|
||||||
|
LOG_WARN("DIO validation failed\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Check MOP */
|
/* Check MOP */
|
||||||
if(dio->mop != RPL_MOP_NO_DOWNWARD_ROUTES && dio->mop != RPL_MOP_NON_STORING) {
|
if(dio->mop != RPL_MOP_NO_DOWNWARD_ROUTES && dio->mop != RPL_MOP_NON_STORING) {
|
||||||
LOG_WARN("ignoring DIO with an unsupported MOP: %d\n", dio->mop);
|
LOG_WARN("ignoring DIO with an unsupported MOP: %d\n", dio->mop);
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 5da931eeb78d1cd4a1e0068a91de9b78bd3f66de
|
Subproject commit 53a0d97da748a67093c49cb38744650c71d58c4d
|
@ -39,6 +39,7 @@ libs/data-structures/zoul \
|
|||||||
libs/ipv6-uipbuf/zoul \
|
libs/ipv6-uipbuf/zoul \
|
||||||
nullnet/zoul \
|
nullnet/zoul \
|
||||||
slip-radio/zoul \
|
slip-radio/zoul \
|
||||||
|
benchmarks/rpl-req-resp/zoul \
|
||||||
dev/gpio-hal/zoul:BOARD=remote-reva \
|
dev/gpio-hal/zoul:BOARD=remote-reva \
|
||||||
dev/gpio-hal/zoul:BOARD=remote-revb \
|
dev/gpio-hal/zoul:BOARD=remote-revb \
|
||||||
dev/gpio-hal/zoul:BOARD=firefly-reva \
|
dev/gpio-hal/zoul:BOARD=firefly-reva \
|
||||||
|
@ -94,7 +94,7 @@ set_global_address(void)
|
|||||||
#if RPL_WITH_STORING
|
#if RPL_WITH_STORING
|
||||||
uint8_t should_blink = 1;
|
uint8_t should_blink = 1;
|
||||||
static void
|
static void
|
||||||
route_callback(int event, uip_ipaddr_t *route, uip_ipaddr_t *ipaddr, int num_routes)
|
route_callback(int event, const uip_ipaddr_t *route, const uip_ipaddr_t *ipaddr, int num_routes)
|
||||||
{
|
{
|
||||||
if(event == UIP_DS6_NOTIFICATION_DEFRT_ADD) {
|
if(event == UIP_DS6_NOTIFICATION_DEFRT_ADD) {
|
||||||
should_blink = 0;
|
should_blink = 0;
|
||||||
|
@ -100,11 +100,13 @@ do
|
|||||||
if [[ "$platform" == "srf06-cc26xx" ]]
|
if [[ "$platform" == "srf06-cc26xx" ]]
|
||||||
then
|
then
|
||||||
# srf06-cc26xx has multiple boards
|
# srf06-cc26xx has multiple boards
|
||||||
BOARDS="srf06/cc26xx srf06/cc13xx launchpad/cc2650 launchpad/cc1350 sensortag/cc2650 sensortag/cc1350"
|
BOARDS="srf06/cc26xx srf06/cc13xx launchpad/cc2650 launchpad/cc1310 launchpad/cc1350 sensortag/cc2650 sensortag/cc1350"
|
||||||
elif [[ "$platform" == "simplelink" ]]
|
elif [[ "$platform" == "simplelink" ]]
|
||||||
then
|
then
|
||||||
# SimpleLink has multiple boards
|
# SimpleLink has multiple boards
|
||||||
BOARDS="launchpad/cc1310 launchpad/cc1312r1 launchpad/cc1350 launchpad/cc1350-4 launchpad/cc1352p-2 launchpad/cc1352p-4 launchpad/cc1352p1 launchpad/cc1352r1 launchpad/cc2650 launchpad/cc26x2r1 sensortag/cc1350 sensortag/cc2650 srf06/cc13x0 srf06/cc26x0"
|
BOARDS="launchpad/cc1310 launchpad/cc1350 launchpad/cc1350-4 launchpad/cc2650"
|
||||||
|
BOARDS+="sensortag/cc1350 sensortag/cc2650 srf06/cc13x0 srf06/cc26x0"
|
||||||
|
BOARDS+="launchpad/cc1312r1 launchpad/cc1352r1 launchpad/cc1352p1 launchpad/cc1352p-2 launchpad/cc1352p-4 launchpad/cc26x2r1"
|
||||||
elif [[ "$platform" == "zoul" ]]
|
elif [[ "$platform" == "zoul" ]]
|
||||||
then
|
then
|
||||||
# Zoul has multiple boards
|
# Zoul has multiple boards
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit edb3c8c73c4688ebd336b278450db216512a769b
|
Subproject commit 59fd804b80aec868d74ce37c6195086b817981ea
|
Loading…
Reference in New Issue
Block a user