簡易檢索 / 詳目顯示

研究生: 陳宗賢
Chen, Tsung-Hsien
論文名稱: 設計及實作 nesC/TinyOS 圖形整合開發環境
Design and Implementation of A Graphical Integrated Development Environment for nesC/TinyOS
指導教授: 李強
Lee, Chiang
學位類別: 碩士
Master
系所名稱: 電機資訊學院 - 資訊工程學系
Department of Computer Science and Information Engineering
論文出版年: 2005
畢業學年度: 93
語文別: 中文
論文頁數: 58
中文關鍵詞: 整合開發環境圖形轉換感測器網路
外文關鍵詞: Integrated development environment, TinyOS, nesC, graph conversion, sensor network
相關次數: 點閱:116下載:1
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  •   隨著近年來微機電技術(MEMS)以及無線傳輸技術的迅速進步, 使得無線感測器(wireless sensor)的應用越來越廣泛. 這些微小的sensor具備多種的感測(譬如震度、聲音、紅外線等)、運算以及無線傳輸等功能, 有如一台具體而微的小型電腦. 藉由部署一大群的sensor組成無線感測器網路(wireless sensor network)來收集我們所感興趣的資料(如溫度、濕度), 經由運算單元的處理運算後, 再使用無線傳輸的方式來傳輸到指定的位置. 由於sensor具有架構簡單、體積小、價格低廉及耗電量少等特點, 因此被廣泛應用於軍事、環境監測等用途. 可以預見的, 開發sensor相關應用程式的需求會變的越來越強烈, 因此如何迅速簡單的設計出sensor上的應用程式, 便成了一個重要的課題.

      美國加州柏克萊大學(University of California,Berkeley)所開發的nesC是諸多用於開發sensor應用程式的語言之一, 因為其具有模組化, 結構化及設計彈性高等特點, 且支援於Xbow公司所設計的Mote, 因此最被廣汎使用. nesC是一種元件組合式(Component-based)的語言, 元件是一種把sensor硬體抽象化的概念, 而一個sensor程式就是由這些不同的元件組合而成. 傳統撰寫程式時, 必須自己先在紙上或是腦中規劃出元件的組織圖, 再把圖的概念改寫成程式碼. 這種方式不僅不直覺, 而且十分瑣碎及繁複, 使用者常花費大量的時間在做重覆轉換程式碼的動作, 而完成的程式碼可讀性也不高, 對於沒有nesC程式設計經驗的使用者, 在開發軟體上非常的耗時、繁雜且不易上手.

      在本篇論文中, 我們設計並實作出一個nesC程式的圖形開發系統, 程式設計者只需對nesC的元件架構稍有概念, 透過系統所提供的視覺化介面, 選擇並加以組合程式所需要的圖形化元件, 並組合出執行的流程圖, 經過系統所提供的自動轉換模型, 便可產生相對應的nesC程式碼, 同時我們也整合現有的編譯及模擬工具, 讓使用者可以直接在系統中完成程式的編譯及測試. 我們相信透過這個系統, 使用者在開發nesC的應用程式時, 可以節省更多時間, 及獲得更大的幫助.

      In recent years, due to the rapid development of micro-electroMechanical systems(MEMS) and wireless communication technology, the wireless sensor application becomes more and more popular. The current micro sensor technology has abilities to perform various sensing tasks(seismic, sounds, infra red), data processing and wireless communication all in one single ship, and is like a micro computer. A wireless sensor network consists of a large number of sensor nodes, and we can use it to collect the data(temperature, humidity) that we are interested in. It can transmit sensing data to the target node after the processing of processor unit. Based the simple architecture, small size, cheap cost, and low power consumption of sensor, it is widespread used for military scouting and environment monitoring. It is obvious that the necessity of developing sensor applications becomes more important and important. Therefore, how to rapidly and easily design the program we need becomes one of the most important key point.

      There are many system programming languages developed for designing the sensor applications, and the most important of them is nesC. Because of its outstanding abilities of flexible design, well-defined structure and module, nesC is widely uesd because of supporting the mote sensor designed by Xbow. nesC is a component-based language, and the component is a kind of concept of hardware abstraction. Every hardware on the sensor can be represented by components, and a nesC program is composed of diffenent components. Traditionally, we must plan and construct the composition of components or draw it on the paper and convert it to nesC code when we design an sensor application. This approach is not only non-trivial bust also troublesome, and the designer usuallly wastes much time on converting code, besides that, the completed source code is not well readable. It is not user friendly and time wasted for a new user of nesC to develop an application.

      In this paper, we design and implement a graphical integrated development environment for nesC, and the designer just need to have a bit of background about the component-based architecture of nesC. By using the graphical interface provided by our system, composing the components needed and designing the component graph, system can produce the corresponding nesC code by using the automaton model of our system. On the same time, we also integrate the existing tools into our system, user can complete code compilation and test on our system. We truly believe that designer can save more time and get more help by using our system.

    Abstract i Acknowledgements v Table of Contents vi Table of Figures ix Table of Tables xi 1 Introduction 1 1.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.2 Contributions . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.3 Thesis Organization. . . . . . . . . . . . . . . . . . . . . . 9 2 Related Work 10 2.1 The Programming Language and Operating System for Wireless Sensor . . . . . . . . . . . . . . . . . . . . . . . . 10 2.1.1 nesC:Network Embedded System C . . . . . . . . . 11 2.1.2 TinyOS . . . . . . . . . . . . . . . . . . . . . . . . 14 2.2 Related Works for Integrated Development Environment of nesC/TinyOS . . . . . . . . . . . . . . . . . . . . . . . . 16 2.2.1 Tinyos IDE . . . . . . . . . . . . . . . . . . . . . 17 2.2.2 GRATIS II . . . . . . . . . . . . . . . . . . . . 19 3 System Architecture: Graphical Integrated Development Environment for nesC/TinyOS 21 3.1 SystemArchitecture . . . . . . . . . . . . . . . . . . . . . 21 3.1.1 ComponentManagementModule . . . . . . . . . . 23 3.1.2 Graph DesignModule . . . . . . . . . . . . . . . . 24 3.1.3 Graph ConverterModule . . . . . . . . . . . . . . . 29 3.1.4 CompilationModule . . . . . . . . . . . . . . . . . 30 3.1.5 SimulatorModule . . . . . . . . . . . . . . . . . . . 30 4 Implementation of a Graphical Integrated Development Environment for nesC/TinyOS 32 4.1 Platformand Development Tools . . . . . . . . . . . . . . 32 4.2 Graph ConveterDesign . . . . . . . . . . . . . . . . . . . . 33 4.3 ProgrammingTechnique . . . . . . . . . . . . . . . . . . . 35 4.3.1 JGraph . . . . . . . . . . . . . . . . . . . . . . . . 36 4.3.2 ANTLR . . . . . . . . . . . . . . . . . . . . . . . . 38 4.3.3 XML . . . . . . . . . . . . . . . . . . . . . . . . . . 40 4.4 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 4.5 Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 5 Conclusions and Future Work 49 5.1 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . 49 5.2 FutureWork . . . . . . . . . . . . . . . . . . . . . . . . . . 50 Bibliography 51 Biography 58

    [AMA+02] Ledeczi A., Maroti M., Bakay A., Karsai G., Garrett J.,
    Thomason IV C., Nordstrom G., Sprinkle J., Volgyesi P., “The
    Generic Modeling Environment,” in Workshop on Intelligent Signal
    Processing, Budapest, Hungary, May 17, 2001.

    [ASSC02] lan F. Akyildiz,WellJan Su, Yogesh Sankarasubramaniam, and
    Erdal Cayirci, “A Survey on Sensor Networks,” IEEE Communications
    Magazine, 40(8):102-114, August 2002.

    [Atl] ANother Tool for Language Recognition, http://www.antlr.org/.

    [BS91] Boussinot and R. de Simone, “The Esterel Language,” in Proceedings
    of the IEEE, 79(9):1293-1304, September 1991.

    [CEE01] Alberto Cerpa, Jeremy Elson, Deborah Estrin, Lewis Girod,
    Michael Hamilton, and Jerry Zhao, “Habitat monitoring: Application
    driver for wireless communications technology,” in Proceedings of
    the ACM SIGCOMM Workshop on Data Communications in Latin
    America and the Caribbean, pages 20-41, Costa Rica, April 2001.

    [GLB+03] David Gay, Phil Levis, Rob von Behren, Matt Welsh, Eric
    Brewer, and David Culler, “The nesC Language: A Holistic Approach
    to Networked Embedded Systemss,” in Proceedings of Pro-
    gramming Language Design and Implementation (PLDI) 2003, June
    2003.

    [Gra] Graphical Development Environment for TinyOS,
    http://www.isis.vanderbilt.edu/projects/nest/gratis/index.html.

    [HC02] Jason Hill and David Culler, “Mica: A wireless platform for
    deeply embedded networks,” IEEE Micro, 22(6):12-24,2002.

    [HHK01] Thomas A. Henzinger, Benjamin Horowitz, and Christoph M.
    Kirsch, “Embedded Control Systems Development with Giotto,” in
    Proceedings of the International Conference on Languages, Compilers,
    and Tools for Embedded Systems (LCTES), Vol. 36, No. 8, 2001,
    pp 64-72.

    [HSW+00] Jason Hill, Robert Szewczyk, Alec Woo, Seth Hollar, David
    Culler, and Kristofer Pister, “System Architecture Directions for
    Networked Sensors,” in Architectural Support for Programming Languages
    and Operating Systems 2000, Cambridge, USA, November
    2000, pp 93-104. TinyOS is available at http://www.tinyos.net.

    [Jgv] Java Graph Visualization and Layout, http://www.jgraph.com/.

    [MFHH02] Samuel Madden, Michael J. Franklin, Joseph M. Hellerstein,
    and Wei Hong, “TAG: a Tiny AGgregation Service for Ad-Hoc Sensor
    Networks,” in Proceedings of the ACM Symposium on Operating
    System Design and Implementation (OSDI), Boston, Massachusetts,
    USA, December, 2002.

    [MPS+02] Alan Mainwaring, Joseph Polastre, Robert Szewczyk, David
    Culler, and John Anderson, “Habitat Monitoring: Application
    Driver for Wireless Communications Technology,” in ACM International
    Workshop on Wireless Sensor Networks and Applications 2002
    (WSNA’02), Atlanta, Georgia, USA, September 2002, pp 88-97.

    [PK00] ,Gregory J. Pottie and William J. Kaiser, “Embedding the internet:
    wireless integrated network sensors,” Communications of the
    ACM, 43(5):51–58, May 2000.

    [RW92] Martin Reiser, Niklaus Wirth, “Programming in Oberon: Steps
    Beyond Pascal and Modula,” Addison-Wesley, 1992. ISBN 0-201-
    56543-9.

    [Tide] TinyOS IDE, http://tide.ucd.ie/.

    [WLLP01] Brett Warneke, Matt Last, Brian Liebowitz and Kristofer S.
    J. Pister, “Smart Dust: Communicating with a Cubic-Millimeter
    Computer,” in IEEE Computer Magazine, Vol. 34, No. 1, 2001, pp
    44-51.

    [WTH02] Zhanyong Wan, Walid Taha, Paul Hudak, “Event-Driven
    FRP,” in Proceedings of the 4th International Symposium on Practical
    Aspects of Declarative Languages(PADL), Vol. 2257, pp 155-172,
    2001.

    [YLC+02] Fan Ye, Haiyun Luo, Jerry Cheng, Songwu Lu, Lixia Zhang,
    “TTDD: Two-tier Data Dissemination in Large-scaleWireless Sensor
    Networks,” in Proceedings of the 8th annual international conference
    on Mobile computing and networking, Atlanta, Georgia, USA, pp
    148-159, 2002.

    下載圖示
    2006-08-10公開
    QR CODE