A Graphical Development and Simulation Environment for TinyOS-based Wireless Sensor Networks - PowerPoint PPT Presentation

About This Presentation
Title:

A Graphical Development and Simulation Environment for TinyOS-based Wireless Sensor Networks

Description:

Generate nesC code, makefile, and PtinyOSLoader Java file. Run make'. Compile nesC code to a TOSSIM shared object, and PtinyOSLoader Java file to a Java class file. ... – PowerPoint PPT presentation

Number of Views:196
Avg rating:3.0/5.0
Slides: 28
Provided by: chessEecs
Category:

less

Transcript and Presenter's Notes

Title: A Graphical Development and Simulation Environment for TinyOS-based Wireless Sensor Networks


1
A Graphical Development and Simulation
Environment for TinyOS-based Wireless Sensor
Networks
  • Elaine Cheong
  • February 13, 2007
  • Seventh Biennial Ptolemy Miniconference
  • Berkeley, California

2
Wireless Sensor Networks
3
TinyOS and nesC
configuration SenseToLeds implementation
components Main, SenseToInt, IntToLeds,
TimerC, DemoSensorC as Sensor
Main.StdControl -gt SenseToInt Main.StdControl
-gt IntToLeds SenseToInt.Timer -gt
TimerC.Timerunique("Timer")
SenseToInt.TimerControl -gt TimerC
SenseToInt.ADC -gt Sensor SenseToInt.ADCControl
-gt Sensor SenseToInt.IntOutput -gt
IntToLeds
4
SenseToLeds in Viptos
5
Converting between nesC and MoML
  • nc2moml
  • nesC component code ? MoML class (Ptolemy actor)
  • ncapp2moml
  • nesC application code ? MoML entity (Ptolemy
    model)

6
Generating MoML for TimerC.nc nc2moml
lt?xml version"1.0"?gt lt!DOCTYPE plot PUBLIC
"-//UC Berkeley//DTD MoML 1//EN"
"http//ptolemy.eecs.berkeley.edu/xml/dtd/MoML_1.d
td"gt ltclass name"TimerC" extends"ptolemy.domain
s.ptinyos.lib.NCComponent"gt ltproperty
name"source" value"CLASSPATH/tos/system/TimerC.
nc" /gt ltport name"StdControl"
class"ptolemy.actor.IOPort"gt ltproperty
name"input" /gt ltproperty name"_showName"
class"ptolemy.kernel.util.SingletonAttribute"
/gt lt/portgt ltport name"Timer"
class"ptolemy.actor.IOPort"gt ltproperty
name"input" /gt ltproperty name"multiport"
/gt ltproperty name"_showName"
class"ptolemy.kernel.util.SingletonAttribute"
/gt lt/portgt lt/classgt
7
Generating MoML for SenseToLeds.nc ncapp2moml
... ltentity name"MicaCompositeActor"
class"ptolemy.domains.ptinyos.lib.MicaCompositeAc
tor"gt ltentity name"Main" class"tos.system.Main
" /gt ltentity name"TimerC" class"tos.system.Tim
erC" /gt ltentity name"SenseToInt"
class"tos.lib.Counters.SenseToInt" /gt ltentity
name"IntToLeds" class"tos.lib.Counters.IntToLeds
" /gt ltentity name"DemoSensorC"
class"tos.sensorboards.micasb.DemoSensorC" /gt
... ltlink relation"relation1"
port"Main.StdControl" /gt ltlink
port"IntToLeds.StdControl" relation"relation2"
/gt ltlink relation1"relation2"
relation2"relation1" /gt ltlink
port"SenseToInt.StdControl" relation"relation3"
/gt ltlink relation1"relation3"
relation2"relation1" /gt ltlink
relation"relation4" port"SenseToInt.Timer" /gt
ltlink port"TimerC.Timer" relation"relation5"
/gt ltlink relation1"relation5"
relation2"relation4" /gt ... lt/entitygt ...
8
SenseToLeds Physical Environment
9
SenseToLeds Hardware
10
SenseToLeds Software
11
PtinyOSDirector
12
SenseToLeds PhotoSource
13
SenseToLeds PhotoChannel
14
SenseToLeds WirelessDirector
15
SenseToLeds Simulation
16
How it works
Java (PtinyOSDirector) Java (PtinyOSLoader) C (TOSSIM)
PtinyOSDirector.preinitialize() Generate nesC code, makefile, and PtinyOSLoader Java file. Run make. Compile nesC code to a TOSSIM shared object, and PtinyOSLoader Java file to a Java class file.
PtinyOSDirector.initialize() Load PtinyOSLoader Java class into memory. Create instance of PtinyOSLoader class (_loader). Call Java _loader.load().
_loader.load() Load the TOSSIM shared object into memory.
17
How it works (cont.)
Java (PtinyOSDirector) Java (PtinyOSLoader) C (TOSSIM)
PtinyOSDirector.initialize(), continued Call Java _loader.main().
_loader.main() Call JNI main_unique_name() native method.
JNI main_unique_name() Call TOSSIM main(), which contains an initialization routine Call TOSSIM initializeSockets() Call TOSSIM ptII_startThreads() Call JNI _loader.startThreads().
_loader.startThreads() Create Java threads. Call Java Thread.start() on each thread.
18
How it works (cont.)
Java (PtinyOSDirector) Java (PtinyOSLoader) C (TOSSIM)
TOSSIM main() initialization routine, continued Create bootup event. Call TOSSIM ptII_queue_insert_event(). Call JNI _loader.enqueueEvent().
_loader.enqueueEvent() Call Java PtinyOSDirector.enqueueEvent().
PtinyOSDirector.enqueueEvent() Call Java Ptolemy II fireAt() on the executive director.
19
SendAndReceiveCnt
20
SendAndReceiveCnt
21
SendAndReceiveCnt
22
SendAndReceiveCnt Simulation
23
Multihop Routing Surge
24
Performance Evaluation SenseToLeds
25
Performance Evaluation SendAndReceiveCnt
26
Related Work
  • ns-2
  • OPNET Modeler, OPNET Wireless Module
  • OMNeT, NesCT
  • J-Sim
  • Prowler
  • Em, EmTOS
  • TOSSIM, TinyViz

27
Conclusion
  • http//ptolemy.eecs.berkeley.edu/viptos
  • Elaine Cheong, Edward A. Lee and Yang Zhao.
    Joint Modeling and Design of Wireless Networks
    and Sensor Node Software, EECS Department,
    University of California, Berkeley, Technical
    Report No. UCB/EECS-2006-150, November 17, 2006.
Write a Comment
User Comments (0)
About PowerShow.com