You are on page 1of 91

" ,

(Middleware) "
-1614

: , PhD Bradford University,


P/G School of Control Eng, UK

2012



.
/

1.

2.

3.




,
, , , , ,
.
.

, ,
.
,
, ,
.
,

.
, -(middleware)
.
.

.
.
,

, TinyOS. ,
Agilla .
TOSSIM,
TinyOS. , TinyViz

.
,
Agilla TinyOS
Agilla TinyViz AgentInjector.
, , (tutorial)
.


................................................................................................................................ 7
1: ................................................................ 10
1.1 .............................................................. 10
1.2 .......................................................................................................................... 11
1.3 Ad-Hoc ........................................ 13
1.4 ................................... 14
2: ................................................................ 15
2.1 ........................................................................................................... 18
2.2 ............................................................................................. 20
2.3 ...................................................................................................................... 23
2.4 .......................................................................................................... 25
2.5 .................................................................................................................. 26
2.6 .............................................................................................................. 27
2.7 ..................................................................................................... 28
3: ....................... 30
3.1 ................................................................................................................. 30
3.2 ........................................................................................................... 30
3.3 .................................................................................................................... 31
3.4 .................................................................................................................... 31
3.5 .............................................................................................. 32
3.6 ................................................................................................................................. 35
3.7 ....................................................................................................................... 35
3.8 ............................................................................................................. 36
3.8.1 ......................................................................................................................... 37
3.8.2 .................................................................................................... 37
3.9 .................................................................. 37
3.9.1 To E (Physical Layer)................................................................................... 38
3.9.2 To (Data Link Layer) .............................................................. 38
3.9.3 (Network Layer) ................................................................................. 39
3.9.4 (Transport Layer) ........................................................................ 40

3.9.5 (Application Layer)...................................................................... 40


4: (Middleware) ............................................................... 41
4.1 ............................................................................................................... 41
4.2 (Programming Abstractions) .................................................... 43
4.3 .............................................................................................................. 44
4.4 .................................................................................................. 45
4.5 (QoS mechanisms) ..................................................... 46
5. ................................................................................. 46
5.1 ..................................................................................................................... 46
5.2 ............................................................................................................... 51
5.2.2 .................................................................................................... 55
5.2.3 .................................................................................................... 56
5.3 .......................................................................................... 59
5.4 ...................................................................................................................... 60
5.5 ..................................................................... 62
6: WSN Runtime Support ...................................................................................................... 63
7: WSN ....................................................... 65
8: WSN ......................................... 67
9: Tutorial TinyOS ....................................................................................................... 71
9.1 TinyOS...................................................................... 71
9.2 TinyOS ........................................................................................................... 73
9.3 Agilla, ................. 76
9.4 AgentInjector ................................................................................................ 78
9.5 TinyViz ......................................................................................................................................... 83
10: ...................................................... 88
........................................................................................................................................ 89


1 : (WSNs)

11

2 :

18

3 : WSNs

19

4 : WSNs a

20

5 :

21

6 : WSNs

22

7 :

23

8 :

24

9 : WSNs

25

10 :

26

11 :

27

12 :

28

13 :

29

14 : WSNs

33

15 : -layers WSNs

38

16 :

42

17:

42

18 :

43

19 : WSN: a) client-server-based paradigm,


b) mobile-agent-based paradigm

47

20 : : )
)

48

21 : Agilla

48

22 : Agilla

49

23 : agent Agilla

50

24 : Mires

52

25 : Mires

52

26 : topic advertisement

53

27 :

54

28 : DSWare

57

29 : DSWare

58

30 : MiLAN

61

31 : Mate

64

32 : MiLAN

66

33 : WSN. a)
, b) , c)
, d)

69

34 : Serial Demo javacomm

72

35 : Environment Variables
System Properties class path

73

36 : TinyOS

74

37 : source files TinyOS

74

38 : locate-jre

75

39 : compile java

75

40 : JNI

75

41 : tos-check-env

76

42 : Makefile.Agilla

77

43 : Agilla Agent Injector 3Blink

79

44 : Agilla

80

45 : SerialForwarder localhost

80

46 : Agilla Agent Injector localhost

81

47 : Agilla
Serial Forwarder

82

48 : Agilla
Agent Injector

83

49 : TestTinyVIz

84

50 : TestTinyViz

85

51 : TinyViz debug messages

86

52 : TinyViz send radio packet

87

1:

1.1


.

. ,

,
. ,
,
(Wireless Sensor Networks - WSNs).
(WSNs)
,
. ,
.
,

.
,
,
. [1]
, (WSNs)
sink ( base station)
(sensor nodes), .
,
, . ,
, , , ,
.. ,
sink. , sink
(queries) ,
. [2]
,
.

.
,

. [3]
10

1: (WSNs)

1.2

,
, , , ,
, , ,
.


.
,
.

.
.
11


.
multi-hop
.
hop

.

. ,
,

.
,

.

.
.
,
.

.

. ,
.

.

.
Rk(t)
Poisson
(0,t) :

Rk t exp( k t )
k t k
.
.

. ,

,

.

.
.
12


.
,
,
.
,
,
.

, ,
.
,
& ,
.
, . .

.

.

.
,
.


bits, ,
.

1.3 Ad-Hoc

adhoc .
:
:
ad-hoc .

13

:
.
: , ad-hoc
.
: ad-hoc point-topoint, meshnetworking.
:
, ,
.
:
,
ad-hoc .
:
(MAC/IP )
ad-hoc .
: ad-hoc ,
.
: .

ad-hoc .

1.4



. .
.
:
/ -
- bit (,
),
- (
).
.,
,
14

, ,
.,

/.
,
,
.
.
, , . ,
, .
,
,
gateway.

coverage. , .
bandwidth
.

, .

2:


, ,
, , , ,

:

.
15

,
.

,
, ,
. -
.
, , , .

, , .
,

: ,
, ,
, , , , .,
,

, , ,
.


. - -

.
,

,
, GPS
.
.



,
, , .


- -
, 21
.

16



(, )
. , ,
,
.


, ,
.

.


. .

(, , , .)
( , ,
)
,
.
, , ,
,
(
, . ),
(), ,
.
,


-
.
,
,
.
,
(, )
. [4]

17

2 :

2.1


, , , , ,
, .
, , - ,
.
,

,
.
,
, ,
, , ,
, () .
:


. , ,
.
18


.
.
: , ,

.
,
.
:

,
.
:
.
:

.
: ,
( )
.

,
, .

.

3 : WSNs

19

2.2


, ,

, ,
, ,
, ,
, ,
, ,
, .
:
, ,

.

.

.

, .

4 : WSNs

:

. [5]
,
.
,
20

, ,
.

5 :


, ..
,
. ,

.
James . [6]
25-100
.
:
ALERT [7] .
ALERT ,
.
. ,
COUGAR [8],

.
: WSNs

, ..
.

21

6 : WSNs





, ,
(Precision Agriculture). ,
, (data acquisition)

,
(.. , , ..)

( ),
.
, (2011)
,
, .

, ,
,
() () ()
.
()
.[25]

22

7 :

2.3

:
, , ,
,
,

.
:

, .

, .. .

.
.
Faculty Grenoble
.

23

8 :

:
.
.
.
,
.
:
,
.
..

24

9 : WSNs

2.4


.
,
, , ..
, , . ,


, .
, WSNs
, , ,
. ,
,
. ,
WSNs.
WSNs
,
,
25



.
, WSNs
,
.

10 :

2.5

: ,
,
, , .

.
.
:
. . ,
.
, ,
26

.

.
.. ,
.
-,
-, .

Georgia. ,
.

11 :

2.6


.
.

. master node ,
.
,
.

.
,
, .
(
, ) - (
,
27

).
,
.
,
. , .

. ,
.

12 :

SOSUS (Sound
Surveillance System, ).
1950, ,

(). SOSUS ,

, .

2.7


, , ,
28

, ,
,
, ,
, ,
,
, , ,
, .
:
.
(.

).

.
BTUs ,
$55
35 . .
:
.

. ,

.
.
:
.


.

13 :

29

3:

3.1

,
, ,
. ( )

. .

.
,
.

. ,

,
.
, ,

.
.

.

3.2


.
, . ,
30

.

.
10m. ,

.
.

3.3

,
.
,
.
.
Bluetooth [9],
, 10
.
. ,
,
. ,
.

3.4

,
: 1) , 2) , 3)
4) .

, ,
. : )
) - .

-
. ,
,
.
.
.
31


(scavenging energy) .
,
.

.
.

.

.

. ,
:


,
.
.
(Wireless Integrated Network Sensors
WINS) 30
.
(Li) (2.5 cm
1 cm ).
.

3.5

32

WSN (sources)
(sinks).
, . , WSN
, .
, ,

, ,
.
gateway,
.
WSN, ,
:
star,
- .
peer-to-peer (mesh), -
, . ,

, multi-hop
.
star-mesh ( - hybrid), ,
, -
- (end-points)
. ,
peer-to-peer .

14 : WSNs

-
.
, ,
, ,
.
20 ,
33

. ,
:
1) .
, -, .
, :
i) .
ii) ( )
.
iii) , .. .
iv) .


. ,
,
,
- .

2) .
,
:
a)
b)
c)
d)
e)

.
.
.
.
.

,
:

.
.
.
.

34

3) .


.
.
,
,
.

3.6

,
, .
. , :

,
,
,
,
,
, ,
,
,
,
,
.

,
.

3.7

,
.
, .
35

,
.
ISM
(Industrial Scientific Medical ISM Band),
. 433 MHz
. 915 MHz.

.
:
AMPS Bluetooth 2.4 GHz,
.

, 916 MHz.
WINS .
,
,
.
.
.

.
,
. ,
, ,
,

.

3.8


, (<0.5 Ah, 1.2V).
,
.
,
,
.

36

, : 1) , 2)
3) .

3.8.1


.
. , ,
.

3.8.2


. ,


3.9

,
, (Physical Layer), -
MAC (Link Layer) .

37

15 : -layers WSNs

3.9.1 To E (Physical Layer)

,
, ,
.


hardware .
,
,

(bandwidth) .

,
.
, ,
(multiple
access).

3.9.2 To (Data Link Layer)

38


.
, ,
.

(frames)
, ,
. multi-hop -
,
.
(error control)
( ) (Forward Error Correction-FEC)
(Automatic Repeat RequestARQ). ARQ multi-hop
overhead. ,
FEC
error control. , error control

.

3.9.3 (Network Layer)

ad-hoc
. network
layer (.
).
:

- (data-centric).

,
(attribute-based)
.

energyefficient
(available power - PA)
.

:
39

Maximum PA route,
,

.

Minimum energy (ME) route,


.

Minimum hop route (MH),


hops .

Maximum minimum PA note route,



.

3.9.4 (Transport Layer)


.
TCP
.

TCP, .

3.9.5 (Application Layer)


,
, .
:

Sensor Management Protocol (SMP)

Task Assignment and Data advertisement Protocol (TADAP)

Sensor Query and Data Dissemination Protocol (SQDDP)

40

4: (Middleware)

4.1


.
.
, .

, 16.

) (Programming Abstractions)
.
B) (system services)

.
) (Runtime support)

.
) (QoS mechanisms)

(QoS).

41

16 : [24]


[ 16],
.
, ,

.

17: [24]

,
(sensor nodes),
(sink node) ,
17.
42

18 : [24]


(gateway)
.[10]

4.2 (Programming Abstractions)


. ,
,
.
: (abstraction
level), (programming paradigm)
(interface type).

. (node level abstraction)
,

. H
(system level abstraction)


.
,
43

,

.

. .
.
.
, (event-driven)
(query-based). ,
( ). ,

, (mobile
agents), / (Publish/Subscribe).

, /
(event-driven).
. ,
.
SQL .
.

,

.

,

.
.

.

4.3


.
,
.
, (common services)
(domain services).

.
.

44

:
(code managment)


(Data management)
, ,

(Discovery of resources)

-
.
(Management of resources)
, ,
)
(Integration)
Internet.

.
, . EnviroTrack

. WSN-SHM

.

4.4


,
, , .

(hardware)
.

,
.
45

, smart task .
(virtual machine)
.

4.5 (QoS mechanisms)


.
.
.

.
,
(aggregation delay) .
.
.

, .

.

5.

5.1

,
(migration) .
.
.
(code update),
.
,
.
46


. SINA
(Sensor Execution Environment),
SQTL
. Cougar
(query optimizer)
.
, Sensor Execution Environment
scalability.
(code migration)
,
BerthaOS MagnetOS.
(code interpretation)

.
,
(task migration) (mobile code)
.
(
TCL Sensorware SQTL SINA)
Java. (mobile agent),

. .
(modular)
.
.
mobile agent
,
.
sink node.
mobile agents re-tasking
.
mobile agent (mobile agent paradigm)
. [11]

19 : WSN: a) client-server-based paradigm, b) mobileagent-based paradigm [11]

47

20 : : )
) [11]

(interpreter),
.
(mobile code) TCL
SQTL ,

. (mobile agents)
Java scalability .

Agilla. Agilla
.
.
. Agilla
tuple spaces
.

21 : Agilla [24]

48


tuple space . tuple space
.
tuple space
.
(one-hop node).
, tuple spaces.

22 : Agilla [24]

tuple space (tuple space manager) tuple


space (tuple space operations) tuple space
. agent manager agent.
agent .
(context manager)
. (instruction manager) Agilla
(Agilla engine) . (instruction
manager) ,
agent .
Agilla agents .

49

23: agent Agilla [24]

23 agent. agent
(stack), (heap) .
agent
. agent,
(program counter) . agent
agent (migration
operations). agent .

. ,
(reaction manager)
. agent
,
. (condition code) .
, Agilla
(reaction approach). tuple space, agent
Agilla tuple
. tuple spaces
agent (reaction manager).
tuple, tuple
. , tuple space agent,

.
(code migration)
agent . tuple space
agent
. agent,
. ,

.
(multi-hop migration) .

50

5.2

WSN data centric. data centric



,
, ,
. [12]
.

, .

5.2.1


,
.
(event-based),
, /,
.
. ,
.TinyDB, DSware, Mires
Impala event-based .
event-based
/ (Publish/Subscribe), .

.
Pub/Sub .
(sink node)
event-publisher .
Pub/Sub Mires. 23
Mires 24 Mires.

51

24 : Mires [14]

25 : Mires [14]

Mires , Pub/Sub (Pub/Sub


service) . Pub/Sub
(advertisement) .
3 ( ,
).
(.. )
.
(multi-hop routing
algorithm).
52

.
. , ,
. Pub/Sub

. Mires ,
. [13]
(query-based data model),

.
(global level abstraction)
. TinyDB, Cougar SensorWare.

.

26 : topic advertisement [14]

26
Publish/Subscribe
Mires. Publish/Subscribe
53

.
Publish/Subscribe advertiseMsg
MultiHopRouter.
AdveriseMsg .
, MultiHopRouter
AdveriseMsg . Publish/Subscribe
,
MultiHopRouter .

27 : [14]

27,
:

, , , .
clusters.

, cluster head. cluster
cluster
head.
.
,
. [14]
TinyDB
. TinyDB

54

TinyOS. TinyDB ,
SENSORS, ,
.
SENSORS .
800 F
.

.

SELECT AVG(temp) FROM sensors


(Select row from Sensors)
WHERE floor-3
(at the 3rd floor)
GROUP BY room
(rows are grouped be room number)
AVG(temp)>80F
(only groups with average temperature>80F)
SAMPLE PERIOD 20 seconds
(perform every 20 seconds- rate of collection)

TinyDB (controlledflooding) .
/ (spanning tree) (
).
,
. , (parent-node) (root) . [14]

5.2.2


. (centralized processing)
55


. , (distributed processing)

.
,

.

,
,
(aggregation).
: 1) ,

. 2)
.
event-based ,
.
Mires. Mires
AVG SUM.
.
.
.
(query-based),

(pipeline), TinyDB SensorWare.
(data
calibration) .

.

5.2.3


.
.
, ,
. H (data centric)

56

.
(data) .

DSWare (Data Service Middleware).

28 : DSWare [24]

28, DSWare ,

.
(Event Detection)
, (
) . (Group
management)
. (Scheduling)
DSWare :
(energy-aware) real-time .
(Data storage), 28
DSWare
.
.
.

57

29 : DSWare [24]

, DSWare
.
,
, .
.


.

. DSWare
(replication) ,
.


.
. DSWare
,
.

,
.
DSWare
. DSWare

. (feedback control
scheme)
58

. ,

,
.

.

.
(abstraction)
. ,
.

.

.
.
,
.

5.3


( , , A/D).

,
.
,
.

.
,
,

.

, SLP Bluetooth SDP.
MiLAN . , TinyLime tuple
space .
,
(content-based)
.

59


, Ultrasound, RF ultrawideband, RSSI
.
.

.

5.4

.
,

.

- (self-organization).


(runtime)
.

,
.
,

.
.

(cluster service), .
(granular services)
, .
.
(cluster service)
(cluster member maintenance)
. , ,
EnviroTrack, MiLAN, DSWare, AutoSec SINA
. EniviroTrack

. MiLAN AutoSec

.
/
. ,
.
,
60

.
,
/ MAC
.

. Mate
,
.
.
,
. MagnetOS
(multi-hop) . ,
,
. Mires
Pub/Sub .
Pub/Sub,
.
,
, Impala
, MiLAN.

30 : MiLAN [24]

30 MiLAN.
MiLAN
. plug-ins
MiLAN
. MiLAN

.

61


. (policy-based)
.

5.5

,
, Internet, Gird
.
,
, .
,

.
,
(leverage
system).
,
.
proxy server.
(client) (non-standardized
services) proxy server
.

standard open architecture,
.
. ,

. WSDL
SOAP
.
.

.
SOA, SensorWeb. ,
,
(WWW).

. Sensor Web Enablement
62

OpenGISConsortium(OGC), , Sensor
ML, Sensor Collection Service, Sensor Planning Service Web Notification Service.
OGC , ,
, SWE,
SensorWeb Grid Computing
Sensor Webs.
, proxy server
proxy server
.
, .
.

.

6: WSN Runtime Support

,
, ,
,
runtime (runtime support).

,

. runtime
(inter process communication-IPC),

/ .
, smart task
,
. Runtime
(virtual machines).
.

63

31 : Mate [24]

Mate,
TinyOS. 31 . Mate
. ,
. Mate byte,
TinyOS , (componentbased) event-driven .
Mate FIFO scheduler,
byte capsule store
. Mate
, .
. Mate
Trickle.
Magnet, runtime MagnetOS,
power-aware,
ad-hoc . ,
MagnetOS ad-hoc
Java VM
. ad-hoc ,
. conference room
single hop ad-hoc . Magnet
.
. runtime ( )
.

64

(task cooperation)
runtime ,
. task cooperation

. , TinyTime Agilla,
task cooperation tuple space. tuples
(passive data values). tuple space
, tuples ,
. (global) tuple space
. , tuple spaces
inter-agent .
tuple space agents
.

.
tuple tuple space
.
tuple
() .
tuple .

.
agent . Agilla, agents
agents .
Agilla agents
tuple space. ,

. Agilla tuple spaces
(span across nodes).
tuple space.

7: WSN


, -.
, ,
(real-time). context-ware .

65

.
,
, , .


, (aggregation delay), .
,
.
.

.


,
.
,
.

.

.

,
.

32 : MiLAN [24]

66

32, MiLAN

.
.
.
, MiLAN
,

. , ,
.
,
MiLAN State-based Variable
Requirements Graph .
MiLAN
.
,
.

, MiLAN
.

.

8:
WSN

WSN
.
(spanning trees),
. spanning tree
.
33, ,
. spanning trees
.
(denoted),
(alternative),
.

67

( 33a),
WSN (underlying network).

. WSN
.
.
WSN
.
( 33a)
, ( 33b)
( 33c).
,
.

.
(implementation-related
features) ,
(context features).
,
WSN
(poor scalability).
(scalable), ,
WSN.
tuple spaces event-driven
, WSN.

68

33 : WSN. a) , b)
, c) , d)
[24]

69

,
(hardware transparent features)
hardware .
.

WSN .

.
WSN
.
(resource
management adaptation)
(open resources configuration).
(computational reflection)
. proactive reactive
.
reactive ,
, proactive
( )
.
WSN( 33d)
WSN
(
33d).
. ,
(data query
command). .

.
WSN. ,
(mobile target), (mobile sensor)
(mobile sink).

. WSN ( 33d)
.

70

9: Tutorial TinyOS

9.1 TinyOS

TinyOS, Cygwin
Java. :

Cygwin.
cvs, gcc, gdb, openssh, perl, rpm vim.

1.5 Suns JDK. (


TinyOS.1 JDK 1.5
1.6 )

Suns javax.comm

[1]

javacomm20-win32.zip

[2] win32comm.dll C:\Program


Files\Java\jdkxxxx\jre\bin
[3]
Files\Java\jdkxxxx\jre\lib\ext

comm..jar

C:\Program

[4] javax.comm.properties C:\Program


Files\Java\jdkxxxx\jre\lib
[5] javacomm
SerialDemo javacomm.zip.
commapi\samples\SerialDemo.
:

71

34 : Serial Demo javacomm

Graphviz

Eclipse

, Text
editor. Textpad.

Java (Java compiler)


class path
Java. Windows XP Environment
Variables Advanced ,
. path class path
compiler Java.

72

35 : Environment Variables
System Properties class path

9.2 TinyOS


TinyOS. :

tinyos-tools-1.2.2-1.cygwin.i386.rpm

nesc-1.2.7a-1.cygwin.i386.rpm

make-3.80tinyos-1.cygwin.i386.rpm

Cygwin
.(: Windows Vista Cygwin Administrator)
73

Cygwin
: rpm -ignoreos -ivh *.rpm
.

36 : TinyOS

Cygwin source files.


:( password.
enter):

cd /opt
cvs -d:pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos login
cvs -z3 d:pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos co -P tinyos1.x

37 : source files TinyOS

: /opt/tinyos1.x/tools/make/MakeLocal.

Windows . text editor
.

washu.sh tinyos.sh /etc/profile.d


Cygwin Windows.

locate-jre /usr/local/bin.

74

38 : locate-jre

compile
/opt/tinyos-1.x/tools/java make

39 : compile java

JNI Cygwin
/opt/tinyos-1.x/tools/java/jni
make install.

40 : JNI

Cygwin.[15]
Cygwin
Cygwin : tos-check-env

75

41 : tos-check-env

9.3 Agilla,

1. Agilla[16]
2. Agilla agilla.
extract
Agilla
, agents, java nesc.
3. Agilla
Cygwin
Agilla.
Agilla.sh /etc/profile.d.
i.

Cygwin :
export AGILLA=[directory to Agilla's root directory] alias cda="cd
$AGILLA" alias cdaa="cd $AGILLA/agents" alias cdaj="cd
$AGILLA/java/agilla" Agilla
C : export AGILLA=/cygdrive/c/Agilla
Agilla
:
a) $AGILLA/nesc/agilla: Agilla's mote firmware written in NesC
b) $AGILLA/java: Agilla's AgentInjector application written in Java
c) $AGILLA/agents: Example Agilla mobile agents

4. Makefille.Agilla
$Agilla/nesc/agilla.
-
Agilla :

76

42 : Makefile.Agilla

$AGILLA/nesc/agilla/README
.
5. AgentInjector
mobile agents Agilla.
$AGILLA/java/. agilla.AgentInjector.
compile AgentInjector,
$AGILLA/java classpath.
classpath : echo $CLASSPATH.
classpath
:
export CLASSPATH=$CLASSPATH:$AGILLA/java
classpath,
Makefile.Agilla
AgnetInjector( $AGILLA) :

cd $AGILLA/java/agilla

cp Example\ Makefile.Agilla Makefile.Agilla

make

$AGILLA/java/agilla/Makefile.Agilla MIG.
:

#MIG = mig -target=pc java

MIG = mig java



TOSSIM [17]
:

MIG = mig -target=pc java

#MIG = mig java


Makefile.Agilla
compile AgentInjector make.

77

6. agilla.properties
AgentInjector, ..
$AGILLA/java/.
AgentInjector.
:

cd $AGILLA/java

cp agilla/Example\ of\ agilla.properties agilla.properties

agent
AgntInjector. $AGILLA/agents agents
Agilla. README
agent.[18]

9.4 AgentInjector

AgentInjector agilla.properties.
. default :

initDir=agents

defaultAgent=3Blink.ma

runTest=false

numCol=20

enableClustering=false

nwName=unk

Agent Injector
agilla.properties :

$ cd $AGILLA

$ java agilla.AgentInjector -comm COM1:57600

com1:57600 TinyOs
.

78

43 : Agilla Agent Injector 3Blink


TOSSIM, . 2 ,
default agent agent injector.
Agent Injector agents
TOSSIM.

$AGILLA/nesc/agilla/components/AgentMgrM.nc
INCLUDE_DEFAULT_AGENT 0.

#define

compile Agilla TOSSIM


: $ make pc sim,<platform>
$AGILLA/java/agilla/Makefile.Agilla
: MIG = -target=pc java.
compile AgentInjector make.
2 Cygwin
: $ $AGILLA/nesc/agilla/build/pc/main.exe b=0 ### , ###
.
10 .
79

44 : Agilla

: $ java net.tinyos.sf.SerialForwarder comm tossim-serial :

45 : SerialForwarder localhost

$ java agilla.AgentInjector -comm sf@localhost:9001


d Agilla Agent Injector
FILE agent
.

80

46 : Agilla Agent Injector localhost

3Blink.ma
INJECT AGENT Cygwin
:

81

47 : Agilla Serial
Forwarder

82

48 : Agilla Agent
Injector

9.5 TinyViz

Cygwin Tinyviz

83

. TinyViz
TOSSIM java. TinyViz

plugins .

. debug
.[17]
TinyViz .
cygwin:

cd $TOSROOT/apps/TestTinyViz

make pc

export DBG=usr1

tinyviz run build/pc/main.exe 5, 5


.

49 : TestTinyVIz

TinyViz 5
.
plugins
.[19]

84

50 : TestTinyViz

TinyViz
, agilla. : $AGILLA/nesc/Avilla
:

DBG=usr1

Tinyviz run build/pc/main.exe ##, ##


.

85

51 : TinyViz debug messages

TinyViz TOSSIM SerialForwarder


.
Cygwin
.
plugins :

Bedug messages: debug


.
.

Set breakpoint: ,
.
.

ADC readings: ADC


.

Sent radio packets: .


Debug messages.

Radio links: .
.
86

Set location:
LOCATION.[20]

52 : TinyViz send radio packets


15
(network traffic).
15.[21]

87

10:


. ,
.

,
.
,
.
.
.

. ,

.[22]
,
. ,
,
.[23]

.
.
. ,
,


.

.
2

.[24]

88

[1] Jamalipour, A (2007). IEEE Wireless Sensor Applications, .


[2] Chonggang Wang Sohraby, K. Bo Li Daneshmand, M. Yueming Hu (2006).
A Survey of Transport Protocols for Wireless Sensor Networks, .
[3] , . (2008).
, .
[4] , . (2008). :
, .
[5] L. Girod, D. Estrin. Robust range estimation using acoustic and
multimodal sensing.
[6] A. Cerpa, J. Elson, M. Hamilton, J. Zhao (2001). Habitat monitoring: application
driver for wireless communications technology.
[7] S. R. Madden (2003). The Design and Evaluation of a Query Processing
Architecture for Sensor Networks, Ph.D. Thesis. UC Berkeley.
[8] W. Heinzelman, A. Murphy, H. Carvalho and M. Perillo (2004)."Middleware
to Support Sensor Network Applications".
[9] I. F. Akyildiz, W. Su, Y. Sankarasubramaniam, and E. Cayirci (2002) A
Survey on Sensor Networks.
[10] Krco, S., Cleary, D. & Parker, D. (2005), P2P Mobile Sensor Networks.
[11] Mylonas, G. (2007). A WSN Middleware and Systems Survey. .
[12] Chen, M., Gonzalez, S., & Leung,, (2007). Applications and Design Issues
for mobile agents in Wireless Sensor Networks. .
[13] Fiege, L., Gartner, F., Kasten, O. & Zeidler, A. : Supporting Mobility in
Content-Based Publish/Subscribe Middleware .
[14] Souto, E., Guimaraes, G., Vasconcelos, G., Vieria, M., Rosa, N., Ferraz,
C. & Kelner J. (2004). Mires: a publish/subscribe middleware for sensor
networks. .

89

[15] TinyOS 1.x Installation on Windows XP (2008):


http://wsn.cse.wustl.edu/index.php?title=TinyOS_1.x_Installation_on_Windows_XP
[16] Fok, C. (2008). Agilla: A Mobile Agent Middleware for Wireless Sensor
Networks. : http://mobilab.cse.wustl.edu/projects/agilla/
[17] Levis, P., Lee, N., Welsh, M. &Culler, D: TOSSIM: Accurate and Scalable
Simulation of Entire TinyOS Applications
[18] zarslan, S. & Erten, Y.: Simulation of Agilla Middleware on TOSSIM
[19] Wong, R. & Khan, J.: Installation Document: SensorWeb 2.0. The NOSA
Project
[20] Lesson 5: Simulating TinyOS Applications in TOSSIM (2003):
http://www.tinyos.net/tinyos-1.x/doc/tutorial/lesson5.html
[21] Levis, P. & Lee, N. (2003): TOSSIM: A Simulator for TinyOS Networks
[22] Hill, J., Szewczyk, R., Woo, A., Hollar, S., Culler, D. & Pister, K. (2000)
System Architecture Directions for Networked Sensors . .
[23] Romer, K., Kasten, O. & Mattern, F. (2006) Middleware Challenges for
Wireless Sensor Networks]. .
[24] Wang, M., Cao, J., Li, J., & Dasi, S. (2008). Middleware for Wireless
Sensor Networks: A Survey. .

[25]http://www.newsbeast.gr/greece/arthro/276326/diethnis-diakrisi-gia-to-polutehneio-kritis/

90

91

You might also like