Home

MassWare User`s Manual - marches

image

Contents

1. sossrv exe s dev ttySO d transfer a component image to a sensor mote sos_tool exe insmod modules MassWare BlinkR blinkr mif 3 2 Start the application In this section we will learn how to run a blink application and a sensor data compression application step by step Before we run the application we need to setup the hardware 1 3 Attach MicaZ mote to a Mib510 programming board 2 Connect the Mib510 board to the PC that was installed the Ubuntu and SOS through the serial port Connect the Mib510 power adapter and turn on the programming board Bink application 1 Generate the middleware component source file of the blink application in the windows system based on its policy 2 3 file policy_blink xml MassGen exe policy_blink xml Copy the generated file to the MassWare folder of the Ubuntu system massware c SOSROOT modules MassWare MassWare Compile all the components including measurement tool components application computing components and middleware components cd SOSROOT modules MassWare Neighbor make micaz cd SOSROOT modules MassWare BlinkR make micaz cd SOSROOT modules MassWare BlinkG make micaz cd SOSROOT modules MassWare BlinkB make micaz cd SOSROOT modules MassWare MassWare make micaz 4 Install SOS kernel to the sensor mote this will erase any program and components in the sensor mote cd SOSROOT config blank make micaz install PROG mib510 PORT d
2. Sensor data compression application The sensor data compression application is a client server application for sensor data compression The sensor client program can sample sensor readings compress the sensor data and send the compressed data to the base station server The base station program then decompresses and displays the received data A compression algorithm normally consists of three steps translation quantization and coding Specifically we use Lifting Scheme Wavelet Transform LSWT scalar quantization and Distributed Source Coding DSC or unary coding to compress the sample sensor data There are one measurement tool component neighboring which measures the number of its neighbor sensor motes and signal strength and five application components Sampling LSWT Quantz DSC and Unary which sample the data and perform the LSWT the scalar quantization the DSC and the unary coding separately The sensor application architecture can be dynamically reconfigured by using the DSC component Sampling gt LSWT gt Quantz gt DSC or the unary coding components Sampling gt LSWT gt Quantz gt Unary based on the number of its neighbors and their signal strength The base station application architecture will also be reconfigured at runtime by using the DSC decoding component or the unary decoding component to process the received compressed data correctly 2 Installation Instructions Requirements Operating System Wi
3. MassWare Neighbor neighbor mIf sos_tool exe insmod modules MassWare MassWare massware mlf 8 The application will run after the last component the middleware component is inserted Based on the measured number of neighbors The application architecture is reconfigured by using the DSC component or Unary component at runtime 4 Development Instructions 4 1 The MassWare system UML diagram Component hain Componentanager Reconfiguratior MassiWareAgent scriptParser Comme lient SuncReply V A OM ExpressionParser Compareevent BooleanEvent ExpressiagnEvent Figure 6 The UML diagram of MassWare Implementation As shown in Fig 6 MassWare contains three core classes blue color Event MassWareA gent and Reconfigurator The Event class is the core class of MassWare sensor which can be further inherited by CompareEvent BooleanEvent and ExpressionEvent The CompareEvent contains two double type event sources left hand side and right hand side and a compare conditioner for comparing the two event sources The BooleanEvent contains two Boolean type event sources and a Boolean conditioner The ExpressionEvent is the class to build context expressions in a binary tree manner It supports addition subtract multiply and division operations and brackets The ExpressionParser is used to parse the ExpressionEvent to build the expression tree The MassWareA gent class is the core class of the MassWare decision engine It
4. invokes the ScriptParser object to parse the user defined adaptation policy script builds the hierarchical events and subscribes the actuators to corresponding event sensors It also communicates with peer agents for synchronization after reconfiguration The Reconfigurator is the core class of the MassWare reconfigurator It contains multiple actuators and each actuator contains a component chain The corresponding actuator notified by the context sensor will active its component chain to process the application data 4 2 MassWare application development All the source code are implemented in Microsoft Visual Studio 2005 1 Set the environment Add middleware reference to the application project MassWare dll Define the middleware object and instantiate it with the script file MassWare MassWare thisWare null thisWare new MassWare MassWare D temp vcRules xml Initialize the middleware and define the architecture change callback function thisWare Initialize thisWare AddArchSubscriber new MassWare Architecture MassWareArchChangeEventHand1er MassWareArchChanged Set the application level component parameters set the parameter list object paramlist localWnd Handle localWnd Width localWnd Height set the parameter for the component 1 WebCam WebCam thisWare SetAppParameter Masslets WebCam WebCam SetLocalWindowInf 181 para
5. MassWare User s Manual FT MassWare p The Mass Ware Team LONG Lab Lehigh University http marches cse lehigh edu Laboratory of Network Group May 27 2009 L WRAL OMe gett eaen tae sete gs clea ts ciara cists E alates Gs at lo eg ss Gale ese 3 EMiS S WV ce diate A 3 PADO Wa Mis 3 UU CEI OMS e535 Savi ake cosets he ohigalets cable a NNR 5 SMEA E ds E E EE I EA E RT 7 dial Generate Mass Wale Source File E 7 3 2 Compile Application and Middleware Components sistini tninn eana A A E a aaa 7 3 2 Stak tie ere uae 8 4 DEV ClOpI iC Ob MONS 11 4 l The Mass Ware system cena Read ease 11 42 Mass Ware applicant 11 OUL CS File List 13 Saas cae ene E EA 15 1 Introduction 1 1 MassWare MassWare Mobile Ad hoc and Sensor Systems Middleware is a component based context aware adaptive middleware framework for wireless sensor networks based on SOS a module based sensor operating system MassWare supported sensor applications consists of a list of components which provide some interfaces like operation interfaces and communication interfaces MassWare can then efficiently reconfigure the behaviors of the a
6. R PURPOSE THE SOFTWARE PROVIDED HEREUNDER IS ON AN AS IS BASIS AND LEHIGH UNIVERSITY HAS NO OBLIGATION PROVIDE MAINTENANCE SUPPORT UPDATES ENHANCEMENTS OR MODIFICATIONS
7. SOSROOT modules MassWare MassWare 3 Compile all the components including measurement tool components application computing components and middleware components cd SOSROOT modules MassWare Neighbor make micaz cd SOSROOT modules MassWare Sensing make micaz cd SOSROOT modules MassWare LSWT make micaz cd SOSROOT modules MassWare Quantz make micaz cd SOSROOT modules MassWare DSC make micaz cd SOSROOT modules MassWare Unary make micaz cd SOSROOT modules MassWare MassWare make micaz 4 Install SOS kernel to the sensor mote this will erase any program and components in the sensor mote cd SOSROOT config blank make micaz install PROG mib510 PORT dev ttySO ADDRESS 1 5 Build and start SOS server to communicate with the kernel in sensor mote cd SOSROOT tools sos_server bin make x86 sossrv exe s dev ttySO 6 Build the SOS tool to insert modules cd SOSROOT tools sos_tool make emu 7 Insert all components to the sensor mote using the insert tool that communicates with the SOS server Please keep in mind that the middleware component 15 always the last one inserted sos_tool exe insmod modules MassWare Sensing sensing mIf sos_tool exe insmod modules MassWare LSWT lswt mif sos_tool exe insmod modules MassWare Quantz quantz mlf sos_tool exe insmod modules MassWare DSC dsc mIf sos_tool exe insmod modules MassWare Unary unary mIf sos_tool exe insmod modules
8. are developer to be more focused on application s own logic instead of dealing with the complexity of adaptation The Demonstration also validates the efficiency of the run time reconfiguration for supported applications There are two applications implemented and used in this demonstration Blink application the blink application is a simple sensor application running in a single sensor mote There are one measurement tool component neighboring which measures the number of its neighbor sensor motes and three application components BlinkR BlinkG and BlinkY which control the red LED the green LED and the yellow LED separately The three components are connected in a sequence in which BlinkR is the starting component that blinks the red LED repetitively triggered by a timer and sends a message through its output interface to the connected component each time when it blinks The BlinkG and BlinkY components will blink the LED each time when they receive a message from their input interfaces and send a message through their output interface to the connected components after they blink The application architecture can be dynamically reconfigured by connecting three components BlinkR gt BlinkG gt BlinkY or the components BlinkR gt BlinkY and changing the blink frequency of the BlinkR component blink once every 3 sec in the 3 component architecture and every 2 sec in the 2 component architecture based on the number of its neighbors
9. e a C C compiler in the Linux environment in the future we should modify the Makefile by adding the compilation step Therefore we can make the XML script file and generate the binary component image in one step The middleware product massware c should be deleted and hidden from end users 3 2 Compile Application and Middleware Components MassWare 15 a software layer built above the SOS Sensor Operating System and we use SOS compiler to generate MassWare components Currently we can only successfully run SOS in Ubuntu 6 06 operating system It fails in Cygwin environment because the upgraded Cygwin C compiler is not compatible with the SOS source codes Therefore to compile application components and middleware components we have the following steps 1 2 Install Ubuntu 6 06 Open a Terminal from the menu Applications gt Accessories Terminal and type sudo apt get install build essential build essentail sudo apt get install linux headers uname r install linux headers to usr src Install SOS in Ubuntu 6 06 Following the tutorial of SOS and the installation page https projects nesl ucla edu public sos 2x doc tutorial installation html linux Note the mote we use 15 micaz instead of mica2 the board is mib510 serial port is ttySO Some often used commands a compile component make micaz b burn the core module to sensor motes make micaz install PROG mib510 PORT dew ttySO ADDRESS 1 c Start the server
10. ev ttySO ADDRESS 1 5 Build and start the SOS server to communicate with the kernel in the sensor mote cd SOSROOT tools sos_server bin make x86 sossrv exe s dev ttySO 6 Build the SOS tool to insert modules cd SOSROOT tools sos_tool make emu 7 Insert all components to the sensor mote using the insert tool that communicates with the SOS server Please keep in mind that the middleware component 15 always the last one inserted sos_tool exe insmod modules MassWare BlinkR blinkr mif sos_tool exe insmod modules MassWare BlinkG blinkg mif sos_tool exe insmod modules MassWare BlinkB blinkb mif sos_tool exe insmod modules MassWare Neighbor neighbor mIf sos_tool exe insmod modules MassWare MassWare massware mlf 8 We can see that all the LEDs will be blinked after the last component the middleware component is inserted Based on the measured number of neighbors there may be two or three LEDs blinking The application architecture is reconfigured by using or not using the green LED component and the blink interval of the red LED component is reconfigured to be 3 or 2 seconds correspondingly at runtime Sensor data compression application 1 Generate the middleware component source file of the blink application in the windows system based on its policy file policy_compress xml MassGen exe policy_compress xml 2 Copy the generated file to the MassWare folder of the Ubuntu system massware c
11. hbor neighbor h Neighbor neighbor c BlinkR Makefile BlinkR blinkr h BlinkR blinkr c BlinkG Makefile BlinkG blinkg h BlinkG blinkg c BlinkB Makefile BlinkB blinkb h BlinkB blinkb c Sensing Makefile Sensing sensing h Sensing sensing c LSWT Makefile LSWT lswt h LSWT lswt c Quantz Makefile Quantz quantz h Quantz quantz c DSC Makefile DSC dsc h DSC dsc c Unary Makefile generated based policy_compress xml the make file of the neighbor component that gets the number of neighbors the header file of the neighbor component that gets the number of neighbors the source file of the neighbor component that gets the number of neighbors the make file of the blinkr component that blinks the red LED the header file of the blinkr component that blinks the red LED the source file of the blinkr component that blinks the red LED the make file of the blinkg component that blinks the green LED the header file of the blinkg component that blinks the green LED the source file of the blinkg component that blinks the green LED the make file of the blinkb component that blinks the yellow LED the header file of the blinkb component that blinks the yellow LED the source file of the blinkb component that blinks the yellow LED the make file of the sensing component that senses light density photo the header file of the sensing component that senses light density photo the source fi
12. le of the quantz component that quantizes transferred data based on the scalar quantization algorithm the header file of the quantz component that quantizes transferred data based on the scalar quantization algorithm the source file of the quantz component that quantizes transferred data based on the scalar quantization algorithm the make file of the dsc component that encodes quantized data based on the Distributed Source Coding algorithm the header file of the dsc component that encodes quantized data based on the Distributed Source Coding algorithm the source file of the dsc component that encodes quantized data based on the Distributed Source Coding algorithm the make file of the unary component that encodes quantized data based on the modified unary coding algorithm the header file of the unary component that encodes quantized data based on the modified unary coding algorithm the source file of the unary component that encodes quantized data based on the modified unary coding algorithm Users can also use their own components and please refer the XML file description in the following pages Provided XML script files policy xsd policy_blink xml policy_compress xml XML schema file any user developed policy file should follow this schema XML based adaptation policy script file for the blink application XML based adaptation policy script file for the compressio
13. le of the sensing component that senses light density photo the make file of the Iswt component that transfers sampled data based on the Lifting Scheme Wavelet Transfer algorithm the header file of the Iswt component that transfers sampled data based on the Lifting Scheme Wavelet Transfer algorithm the source file of the Iswt component that transfers sampled data based on Lifting Scheme Wavelet Transfer algorithm the make file of the quantz component that quantizes transferred data based on the scalar quantization algorithm the header file of the quantz component that quantizes transferred data based on the scalar quantization algorithm the source file of the quantz component that quantizes transferred data based on the scalar quantization algorithm the make file of the dsc component that encodes quantized data based on the Distributed Source Coding algorithm the header file of the dsc component that encodes quantized data based on the Distributed Source Coding algorithm the source file of the dsc component that encodes quantized data based on the Distributed Source Coding algorithm the make file of the unary component that encodes quantized data based on the modified unary coding algorithm Unary unary h Unary unary c policy xsd policy_blink xml policy_compress xml MassGen Program cs MassGen MassParser cs MassGen ExprParser cs the header file of the una
14. mlist new object 3 remoteWnd Handle remoteWnd Width remoteWnd Height thisWare SetAppParameter Masslets Display Display SetDisplayInf paramlist thisWare SetAppParameter MassTools ABWPTR SetRemoteAddr new objectl remoteIP Start Engine start the middleware and run time reconfigure the application behavior accroding to the adaptation plicies thisWare Start Implement the behavior change call back function private void MassWareArchChanged object sender MassWare MassWareArchEventArgs if e mType MassWare MassWareArchEventArgs PROACTIVE CHANGE toolStripStatusLabel Text Proactive Architecture Changed else if e mType MassWare MassWareArchEventArgs REACTIVE CHANGE toolStripStatusLabel Text Reactive Architecture Changed mMessage Stop and release the middleware object if thisWare null thisWare Stop thisWare Dispose Q GC Collect 5 Source File List Mass Ware Makefile Mass Ware massware h the make file that generate a middleware massware component the header file of massware Mass Ware blink massware c massware source file of the blink application that automatically generated based policy_blink xml Mass Ware compress massware c_ massware source file of the compression application that automatically Neighbor Makefile Neig
15. n application 3 Usage Instructions 3 1 Generate MassWare Source File The MassWare compiler which compiles user defined XML adaptation policy files and generates MassWare component source file automatically 15 developed in Windows system with language in Visual studio 2005 To run the compiler MassGen exe we have to setup its running environment The compiler will be migrated to Ubuntu Linux system with C C language to be integrated with the SOS environment Operating Systems Windows XP professional with service pack 3 Pre installed software NET 2 0 framework and MSXML 4 0 Execution steps 1 Open a command window click start gt run input cmd C WINDOWS system32 cmd exe Microsoft Windows Version 5 1 26 1 Copyright 1985 2661 Microsoft Corp C Documents and Settings liusp gt 2 Change the directory to the compiler folder and put the adaptation policy file in the same folder cd C cygwin home liusp sos 2x modules MassWare MassCompiler 3 Run the compiler with the policy file as the input parameter MassGen exe policy_blink xml 4 Copy the generated massware c file to the massware component folder massware c MassWare Note massware c is a middle product of the middleware component as we need to use the SOS compiler to compile the massware c source file to generate the binary component image which can be burned to sensor motes If we hav
16. ndows XP and Ubuntu 6 06 Memory 256MB minimum or more Development kit Microsoft Visual Studio 2005 with NET 2 0 and SOS Sensor Operating System Other required tools MSXML 4 0 4 Provided file list for the demo applications MassCompiler MassGen exe the compile that generates the middleware source file based on XML script file Mass Ware Makefile the make file that generate a middleware massware component Mass Ware massware h the header file of massware Mass Ware blink massware c the massware source file of the blink application that automatically generated based policy_blink xml Mass Ware compress massware c_ massware source file of the compression application that automatically generated based policy_compress xml Provided example components 1 Measurement Tool Components Neighbor Makefile the make file of the neighbor component that gets the number of neighbors Neighbor neighbor h the header file of the neighbor component that gets the number of neighbors Neighbor neighbor c the source file of the neighbor component that gets the number of neighbors Users can use their own developed measurement tools by just modifying the tool definition in the script file 2 Reconfigurable Components a Bink application BlinkR Makefile the make file of the blinkr component that blinks the red LED BlinkR blinkr h the header file of the blinkr component that blinks the red LED BlinkR blinkr c the
17. pplications through component parameter tuning and architecture reconfiguration at run time Further more MassWare use event notification model for communication and context detection to overlap the reconfiguration behavior with other sensor activities The middleware and some supported applications have been implemented and evaluated in our test bed based MicaZ motes Compared to the traditional middleware that supports the single component chain based application architecture MassWare maintains multiple component chains Fig 1b Therefore there is a new method proposed for the behavior reconfiguration that switches active and inactive chains This new method replaces the traditional method of modifying the single chain structure to reduce the local behavior change time Further according to the new method an efficient active message based asynchronous synchronization protocol is proposed for synchronizing the behaviors of distributed programs This results in a dramatic reduction of the distributed behavior synchronization time by eliminating the operation suspension time and buffer clearance time The robustness of the distributed application is improved since the use of active messages results in no synchronous communication and system halting in the synchronization process anes Active Chain i Inactive Chain i D D2 212 22 82 ICD One Chain Modified Chain Inactive Chain j Active Chain j Architecture 1 Architecture 2 Architecture 1 A
18. rchitecture 2 a b Fig 1 Dynamic reconfiguration architecture a single component chain architecture in existing middleware b multiple component chain architecture in MassWare MassWare is located between the lower hardware sensor motes and operating system SOS layer and the upper application layer to monitor environments and support application adaptation It is client server middleware and the sensor middleware runs in the client mode and the base station runs in the server mode There is one middleware agent in each sensor mote The MassWare agent is a special component that is automatically generated based on user defined adaptation policies which are defined by application developers or end users in a script file based on XML The agent can then subscribed to measurement tool components which measures application contextual information and manipulate the computing components which are the basic elements to construct a sensor application 1 2 Demonstration This demonstration illustrates the major functionality of a context aware adaptive middleware framework middleware framework that efficiently handles dynamic reconfiguration for wireless sensor applications in a generic consistent and clearly separated way By providing a set of tools and underlying mechanisms it achieves it primary goal of facilitating a software developer to handle adaptation inside their applications therefore to let the softw
19. ry component that encodes quantized data based on the modified unary coding algorithm the source file of the unary component that encodes quantized data based on the modified unary coding algorithm XML schema file any user developed policy file should follow this schema XML based adaptation policy script file for the blink application XML based adaptation policy script file for the compression application the major program file of the MassGen project the class file the XML parser that parses the adaptation policy file and generates the middleware source file the class file that parses the expression in the hierarchical event model MassGen MassComponent cs the data structure used in the XML parser 6 Source Code Copyright Copyright c 2008 Lehigh University Bethlehem PA USA All rights reserved This source code 15 a part of the MARCHES project The MARCHES project is supported by the National Science Foundation and carried out at the Laboratory Of Networking Group LONGLAB IN NO EVENT SHALL LEHIGH UNIVERSITY BE LIABLE TO ANY PARTY FOR DIRECT INDIRECT SPECIAL INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION EVEN IF LEHIGH UNIVERSITY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE LEHIGH UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULA
20. source file of the blinkr component that blinks the red LED BlinkG Makefile the make file of the blinkg component that blinks the green LED BlinkG blinkg h the header file of the blinkg component that blinks the green LED BlinkG blinkg c the source file of the blinkg component that blinks the green LED BlinkB Makefile the make file of the blinkb component that blinks the yellow LED BlinkB blinkb h the header file of the blinkb component that blinks the yellow LED BlinkB blinkb c the source file of the blinkb component that blinks the yellow LED b Compression application Sensing Makefile the make file of the sensing component that senses light density photo Sensing sensing h the header file of the sensing component that senses light density photo Sensing sensing c the source file of the sensing component that senses light density photo LSWT Makefile the make file of 15 component that transfers sampled data based on the Lifting Scheme Wavelet Transfer algorithm LSWT lswt h the header file of Iswt component that transfers sampled data based on the Lifting Scheme Wavelet Transfer algorithm LSWT lswt c Quantz Makefile Quantz quantz h Quantz quantz c DSC Makefile DSC dsc h DSC dsc c Unary Makefile Unary unary h Unary unary c the source file of the Iswt component that transfers sampled data based on the Lifting Scheme Wavelet Transfer algorithm the make fi

Download Pdf Manuals

image

Related Search

Related Contents

Powermate PM0133250 User's Manual  Tecumseh AJA9486EXDXD Drawing Data  VisualMotion 6.0  GreatCall Jitterbug Touch 3 User Guide  Mistral Ultra 10504 User's Manual  Samsung PL100 Kullanıcı Klavuzu  Serie SPX - Carl Valentin Drucksysteme  U-WAVE-R Revision4  

Copyright © All rights reserved.
Failed to retrieve file