Viptos a graphical development and simulation environment for tinyOS-based wireless sensor
- 格式:pdf
- 大小:788.69 KB
- 文档页数:10
Viptos: A Graphical Development and SimulationEnvironment for TinyOS-based Wireless SensorNetworks
Elaine CheongEdward A. LeeYang Zhao
Electrical Engineering and Computer SciencesUniversity of California at Berkeley
Technical Report No. UCB/EECS-2006-15http://www.eecs.berkeley.edu/Pubs/TechRpts/2006/EECS-2006-15.html
February 15, 2006Copyright © 2006, by the author(s).All rights reserved.
Permission to make digital or hard copies of all or part of this work forpersonal or classroom use is granted without fee provided that copies arenot made or distributed for profit or commercial advantage and that copiesbear this notice and the full citation on the first page. To copy otherwise, torepublish, to post on servers or to redistribute to lists, requires prior specificpermission.
Acknowledgement This work was supported in part by the Center for Hybrid and EmbeddedSoftware Systems (CHESS) at UC Berkeley, which receives support fromthe National Science Foundation (NSF award \#CCR-0225610), the Stateof California Micro Program, and the following companies: Agilent, DGIST,General Motors, Hewlett Packard, Infineon, Microsoft, and Toyota.Viptos:AGraphicalDevelopmentandSimulationEnvironmentforTinyOS-basedWirelessSensorNetworks
ElaineCheongDepartmentofElectricalEngineeringandComputerSciencesUniversityofCalifornia,BerkeleyBerkeley,CA94720USAEmail:celaine@eecs.berkeley.eduEdwardA.LeeDepartmentofElectricalEngineeringandComputerSciencesUniversityofCalifornia,BerkeleyBerkeley,CA94720USAEmail:eal@eecs.berkeley.eduYangZhaoDepartmentofElectricalEngineeringandComputerSciencesUniversityofCalifornia,BerkeleyBerkeley,CA94720USAEmail:ellenzh@eecs.berkeley.edu
Abstract—WedescribeViptos(VisualPtolemyandTinyOS),aninte-gratedgraphicaldevelopmentandsimulationenvironmentforTinyOS-basedwirelesssensornetworks.TinyOSisacomponent-based,event-drivenruntimeenvironmentdesignedforwirelesssensornetworks.ViptosallowsnetworkedembeddedsystemsdeveloperstoconstructblockandarrowdiagramstocreateTinyOSprogramsfromanystandardlibraryofTinyOScomponentswritteninnesC,aC-basedprogramminglanguage.ViptosautomaticallytransformsthediagramintoanesCprogramthatcanbecompiledanddownloadedfromwithinthegraphicalenvironmentontoanyTinyOS-supportedtargetplatform.ViptosisbuiltonPtolemyII,amodelingandsimulationenvironmentforembeddedsystems,andTOSSIM,aninterrupt-leveldiscreteeventsimulatorforhomogeneousTinyOSnetworks.Inparticular,ViptosincludesthefullcapabilitiesofVisualSense,aPtolemyIIenvironmentthatcanmodelcommuni-cationchannels,networks,andnon-TinyOSnodes.ViptosextendsthecapabilitiesofTOSSIMtoallowsimulationofheterogeneousnetworks.ViptosprovidesabridgebetweenVisualSenseandTOSSIMbyprovidinginterrupt-levelsimulationofactualTinyOSprograms,withpacket-levelsimulationofthenetwork,whileallowingthedevelopertouseothermodelsofcomputationavailableinPtolemyIIformodelingthephysicalenvironmentandotherpartsofthesystem.Thisframeworkallowsapplicationdeveloperstoeasilytransitionbetweenhigh-levelsimulationofalgorithmstolow-levelimplementationandsimulation.ThispaperpresentsourexperienceswithintegratingthenesC/TinyOS/TOSSIMandPtolemyIIprogrammingandexecutionmodels.
I.INTRODUCTION
Wirelesssensornetworksprovideawaytocreateflexible,teth-erless,automateddatacollectionandmonitoringsystems.Buildingsensornetworkstodayrequirespiecingtogetheravarietyofhardwareandsoftwarecomponents,eachwithdifferentdesignmethodologiesandtools,makingitachallenginganderror-proneprocess.Typicalnetworkedembeddedsystemsoftwaredevelopmentmayrequirethedesignandimplementationofdevicedrivers,networkstackprotocols,schedulerservices,application-leveltasks,andpartitioningoftasksacrossmultiplenodes.Littleornointegrationexistsamongthetoolsnecessarytocreatethesesoftwarecomponents,mostlybecausetheinteractionsbetweentheprogrammingmodelsarepoorlyunderstood.Inaddition,thesetoolstypicallyhavelittleinfrastructureforbuildingmodelsandinteractionsthatarenotpartoftheiroriginalscopeorsoftwaredesignparadigms.Thegoalofthisworkistocreateintegratedtoolsfornetworkedembeddedapplicationdeveloperstomodelandsimulatetheiralgorithmsandquicklytransitiontotestingtheirsoftwareonrealhardwareinthefield,whileallowingthemtousetheprogrammingmodelmostappropriateforeachpartofthesystem.WechoosetofocusonTinyOS[1],anopen-sourceruntimeenvironmentdesignedforsensornetworknodesknownasmotes,asourunderlyingprogrammingplatform.TinyOShasalargeuserbase–over500researchgroupsandcompaniesuseTinyOSontheBerkeley/Crossbowmotes.Ithasbeenportedtooveradozenplatformsandnumeroussensorboards,andnewreleasesseeover10,000downloads.TinyOSdiffersfromtraditionaloperatingsystemmodelsinthateventsdrivethebehaviorofthesystem.Usingthistypeofexecution,battery-operatednodescanpreserveenergybyenteringsleepmodewhennointerestingeventsarehappening.ATinyOSprogramconsistsofagraphofcomponentsthatarewritteninanobject-orientedstyleusingnesC[2],anextensiontotheCprogramminglanguage.TOSSIM[3],aTinyOSsimulatorforthePC,canexecutenesCprogramsdesignedforamote.TOSSIMcontainsadiscreteeventsimulationenginewhichallowsmodelingofvarioushardwareandotherinterruptevents.AlthoughalargecommunityusesTinyOSinsimulationtodevelopandtestvariousalgorithmsandprotocols,theyfacesomekeylimitationswhenusingthenesC/TinyOS/TOSSIMprogrammingtoolsuite.Usersmaychoosefromafewbuilt-inradioconnectivitymodelsinTOSSIM,butitisdifficulttouseothermodels.TOSSIMcanefficientlymodellargehomogeneousnetworkswherethesamenesCcodeisrunoneverysimulatednode,butdoesnotallowsimulationofnetworksthatcontaindifferentprograms.Additionally,whereasaTinyOSprogramconsistsofagraphofmostlypre-existingnesCcomponents,usersmustwritetheirprogramsinamulti-file,text-basedformat,eventhoughagraphicalblockdiagramprogrammingenvironmentwouldbemuchmoreintuitive.Toaddresstheseproblems,weturntoVisualSense[4],aPtolemyII-basedgraphicalmodelingandsimulationframeworkforwirelesssensornetworksthatsupportsactor-orienteddefinitionofsensornodes,wirelesscommunicationchannels,physicalmediasuchasacousticchannels,andwiredsubsystems.VisualSensedoesnotincludeamechanismfortransitioningfromasensornetworkap-plicationdevelopedwithintheframeworktoanimplementationforrealhardwarewithoutrewritingthecodefromscratchforthetargetplatform.IntegratingTinyOSandVisualSensecombinesthebestofbothworlds.TinyOSprovidesaplatformthatworksonrealhardwarewithalibraryofcomponentsthatimplementlow-levelroutines.VisualSenseprovidesagraphicalmodelingenvironmentthatsupportshierarchical,heterogeneoussystems.Inthispaper,wedescribeourexperienceswithintegratingtheprogrammingandexecutionmodelsandthecomponentlibrariesofthesetwosystems,necessaryforbuildinganintegratedtoolchainfordesigning,simulating,anddeployingsensornetworkapplications.SectionIIprovidesdetailedbackgroundinformationonnesC,TinyOS,TOSSIM,andVisualSense.SectionIIIdescribesthear-chitectureoftheintegratedTinyOSandVisualSensetoolchainandinvestigatesthesemanticsofthisinterface.SectionIVpresentsrelated