Download A Sensor Network Simulator for the Contiki OS

Transcript
CONTENTS
1 Introduction
1.1
1.2
1.3
Problem formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Approach, Work phases and Results . . . . . . . . . . . . . . . . . . . . . .
Report structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2 Background
2.1
2.2
2.3
2.4
About Wireless Sensor Networks .
The Contiki Operating System . .
2.2.1 Event-based kernel . . . . .
2.2.2 Threads and Protothreads .
2.2.3 The system loop . . . . . .
2.2.4 uIP . . . . . . . . . . . . .
2.2.5 Previous Contiki Simulator
Process memory structures . . . .
Java Native Interface . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
3 Related work
3.1
3.2
3.3
4
4
5
5
5
5
6
7
7
8
10
Extendibility . . . . . . . . . . . . . .
Java and JNI . . . . . . . . . . . . . .
Application simulator . . . . . . . . .
Automated Contiki environment setup
5 Implementation
5.1
5.2
5.3
5.4
5.5
5.6
5.7
5.8
5.9
5.10
1
2
2
TOSSIM and TinyViz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
PowerTOSSIM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
ATEMU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4 Design choices
4.1
4.2
4.3
4.4
1
Design overview . . . . . . . . . .
Core communications . . . . . .
COOJA interfaces . . . . . . . .
Ticking a node . . . . . . . . . .
COOJA plugins . . . . . . . . . .
Code generation and compilation
Graphical User Interface . . . . .
Radio Mediums . . . . . . . . . .
Positioners and IP distributors .
Conguration system . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
i
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
12
12
12
13
13
15
15
16
17
19
19
21
21
22
22
23