firebug-cvs Mailing List for FireBug: wireless wildfire monitoring (Page 16)
Brought to you by:
doolin
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(36) |
Jun
(45) |
Jul
(108) |
Aug
(31) |
Sep
(2) |
Oct
(4) |
Nov
(113) |
Dec
(20) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(63) |
Feb
(37) |
Mar
(24) |
Apr
(6) |
May
(5) |
Jun
(5) |
Jul
(71) |
Aug
(42) |
Sep
(7) |
Oct
|
Nov
|
Dec
|
2005 |
Jan
|
Feb
|
Mar
(3) |
Apr
|
May
(64) |
Jun
(71) |
Jul
(51) |
Aug
(89) |
Sep
(24) |
Oct
(1) |
Nov
(1) |
Dec
(2) |
2006 |
Jan
|
Feb
|
Mar
(3) |
Apr
(2) |
May
|
Jun
|
Jul
(21) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
From: Kevin <kar...@us...> - 2004-08-03 22:31:03
|
Update of /cvsroot/firebug/firebug/web/images In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28310 Added Files: forestfire_small.jpg Log Message: Added forestfire_small.jpg to the images directory. --- NEW FILE: forestfire_small.jpg --- (This appears to be a binary file; contents omitted.) |
From: Kevin <kar...@us...> - 2004-08-03 01:37:40
|
Update of /cvsroot/firebug/firebug/web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19590 Added Files: header.php overview.php people.php publications.php Log Message: Added some more php files for the website. --- NEW FILE: overview.php --- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <link type="text/css" rel="stylesheet" href="main.css" /> <link type="text/css" rel="stylesheet" href="firebug.css" /> <script language="JavaScript1.2" src="/main.js" type="text/javascript"></script> <link rel="SHORTCUT ICON" href="./images/favicon.ico" /> <title>Overview of FireBug</title> </head> <body> <?php include("header.php"); ?> <h1>Overview of FireBug</h1> <h2>Introduction</h2> <p> The FireBug system is composed of a network of GPS-enabled, wireless thermal sensors, a control layer for processing sensor data, and a command center for interactively communicating with the sensor network. Each of these layers are independent of the others, communicating through well-defined interfaces. These web pages document technical and administrative aspects of the FireBug project. FireBug is part of the <a href="http://www-laep.ced.berkeley.edu/~itr/">ITR Fire Project</a>. ITR (Information Technology Research) is a <a href="http://www.nsf.gov">National Science Foundation</a> initiative focused on innovative areas of science, engineering and education with a strong information technology component. Details about the NSF ITR project may be found <a href="http://www.itr.nsf.gov">here</a>. </p> <p> The FireBug project is hosted at <a href="http://sourceforge.net/projects/firebug"> sourceforge.net</a>. </p> <h2> FireBug sensor network </h2> <p> FireBugs are GPS-enabled, wireless thermal sensors, or motes. The FireBug network self-organizes into edge-hub configurations. Hub motes act as as base stations, with the following responsibilities: </p> <ol> <li> receiving sample data from any mote, </li> <li> sending commands to any mote. </li> </ol> <p> Enabling such a network requires the motes to <a href="./surgepics.html">self-configure</a>. <p> <p> GPS capabilities are explained <a href= "gps.html">here</a>. </p> <p> Details of the <a href="./sensorarch.html">sensor architecture</a> include packet layouts, routing diagrams, etc. </p> <h2>FireBugs</h2> <p> Each FireBug consists of a mote/fireboard pair. The motes provide power, radio communications, and processing capability for data collected by the sensor. The Crossbow MTS420CA, or <a href="./fireboard.html">fireboard</a>, provides the sensing hardware. The mote and fireboard interface with a 52 pin connector. </p> <h2> Programming FireBug </h2> <p> FireBug is programmed using the <a href="http://sourceforge.net/projects/tinyos">TinyOS</a> embedded operating system, developed at UC Berkeley. More information may be found <a href="./programming.html">here</a>. </p> <h2> Controlling the network </h2> The controller <ul> <li> send commands to hub(s)/base station(s), </li> <li> provides storage for mote data, </li> <li> conducts data processing. </li> </ul> The initial controller will be a personal computer running the <a href="http://www.apache.org/">Apache</a> web server interfaced with MySQL using PHP. <h2> FireBug Command Center </h2> The FireBug Command Center provides user interaction for controlling the FireBug network and displays real time changes in the network. <center> <img src="./images/sysarch.png" alt= "Schematic of FireBug System"> </center> <?php include("links.php"); ?> <hr /> <p> Last Updated: $Date: 2004/08/03 01:37:31 $ by $Author: karimushu $. </p> </body> </html> --- NEW FILE: header.php --- <html> <head> <link type="text/css" rel="stylesheet" href="firebug.css"> <link rel="SHORTCUT ICON" href="./images/favicon.ico"> <title> FireBug </title> </head> <body> <img src = "images/firebug.jpg"> </body> </html> --- NEW FILE: people.php --- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> <html> <head> <link type="text/css" rel="stylesheet" href="firebug.css" /> <link rel="SHORTCUT ICON" href="./images/favicon.ico"/> <title>FireBugs</title> </head> <body> <?php include("header.php"); ?> <h1>FireBug Folks</h1> <p> FireBug is an interdisciplinary project drawing professors and students from the <a href="http://www.ce.berkeley.edu/"> Departments of Civil and Environmental Engineering</a>, <a href="http://www-laep.ced.berkeley.edu/"> Landscape Architecture and Environmental Planning</a>, the <a href="http://eps.berkeley.edu/www/index.html"> Department of Earth and Planetary Sciences</a>, and the <a href="http://www.eecs.berkeley.edu/"> Department of Electrical Engineering and Computer Science</a> </p> <p> <ul> <li> <a href="http://www.ce.berkeley.edu/~sitar"> Prof. Nicholas Sitar </a> </li> <li> <a href="http://eps.berkeley.edu/groups/erc/faculty/brimhall.htm"> Prof. George Brimhall </a> </li> <li> <a href="http://www.ce.berkeley.edu/~glaser"> Prof. Steve Glaser </a> </li> <li> <a href="http://www-laep.ced.berkeley.edu/laep/people/people_radke.html"> Prof. John Radke </a> </li> <li> <a href="http://www.ce.berkeley.edu/faculty/faculty_details.php?n=sengupta"> Prof. Raja Sengupta </a> </li> <li> David M. Doolin (CEE), H: 558-8294. </li> <li>Brian Collins (CEE)</li> <li>Kevin Lee (EECS)</li> <li>Alex Do (ME)</li> <li> Wei Luo, O: 642-8641, H: 525-3870. </li> <li> JinChuan Xu, H: 558-1240. </li> </ul> <br> <?php include("links.php"); ?> </body> </html> --- NEW FILE: publications.php --- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> <html> <head> <link type="text/css" rel="stylesheet" href="firebug.css" /> <link rel="SHORTCUT ICON" href="./images/favicon.ico"/> <title>FireBug publications</title> </head> <body> <?php include("header.php"); ?> <h1>FireBug Publications</h1> <ul> <li> S. D. Glaser. <a href="glaser_spie_2004_paper.pdf">Some real-world applications of wireless sensor nodes</a> Proceedings of SPIE Symposium on Smart Structures & Materials/ NDE 2004, San Diego, California, March 14-18, 2004 <p> ABSTRACT: This paper presents two case histories of the use of wireless sensor Mote technologies. These are devices that incorporate communications, processing, sensors, sensor fusion, and power source into a package currently about two cubic inches in size - networked autonomous sensor nodes. The first case discussed is the November, 2001, instrumentation of a blastinduced liquefaction test in Tokachi Port, Japan. The second case discussed is the dense-pak<sup>TM</sup> instrumentation of the seismic shaking test of a full-scale wood-frame building on the UCB Richmond shake table. The utility of dense instumentation is shown, and how it allows location of damage globally unseen. A methodology of interpreting structural seismic respose by Bayesian updating and extended Kalman filtering is presented. It is shown that dense, inexpensive instrumentation is needed to identify structural damage and prognosticate future behavior. The case studies show that the current families of Motes are very useful, but the hardware still has difficulties in terms of reliability and consistancy. It is apparent that the TinyOS is a wonderful tool for computer science education but is not an industrual quality instrumentation system. These are, of course, growing pains of the first incarnations of the Berkeley Smart Dust ideal. We expect the dream of easy to use, inexpensive, smart, wireless, sensor networks to become a reality in the next couple of years. </p> </li> <li> D. M. Doolin, S. D. Glaser and N. Sitar. <a href="interface_poster.pdf" alt="TOS Tech Exchange Poster"> Software Architecture for GPS-enabled Wildfire Sensorboard</a>. TinyOS Technology Exchange, February 26, 2004, University of California, Berkeley CA. <p> ABSTRACT: Wireless sensors for conducting wildfire monitoring share many of the capabilities of other environmental sensors, collecting data such as humidity, temperature and barometric pressure. On-board GPS location finding allows rapid, remote deployment. In this poster, a scheme for developing driver and interface software for employing the Crossbow MTS420CA sensorboard is described. A high-level, generalized sensor interface is presented. Data collection algorithms implemented over implementations of this sensor interface do not require programming changes to the underlying sensor driver code. </p> </li> <li> M. M. Chen, C. Majidi, D. M. Doolin, S. Glaser and N. Sitar. <a href="./tos_retreat_2003.ppt" alt="NEST Poster"> Design and construction of a wildfire instrumentation system using networked sensors (Poster). </a> Network Embedded Systems Technology (NEST) Retreat, June 17-18, 2003, Oakland California. <p> ABSTRACT: Collecting real time data from wildfires is important for life safety considerations, and allows predictive analysis of evolving fire behavior. One way to collect such data is to deploy sensors in the wild fire environment. FireBugs are small, wireless sensors (motes) based on TinyOS that self-organize into networks for collecting real time data in wild fire environments. The motes package GPS, temperature, pressure and other sensors onto a finger-sized board equipped with a radio, and transmit the data through the network. The FireBug system combines state-of-the-art sensor hardware running TinyOS with standard, off-the-shelf World Wide Web and database technology for allowing users to rapidly deploy FireBugs and monitor network behavior. This poster presents an overview of the FireBug system design, and a snapshot of the current state of development. </p> </li> </ul> <br> <?php include("links.php"); ?> </body> </html> |
From: Kevin <kar...@us...> - 2004-08-03 01:35:50
|
Update of /cvsroot/firebug/firebug/web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19263 Modified Files: architecture.php gps.php index.php links.php monitoring.php mote.php Log Message: Updated version of the website. Index: gps.php =================================================================== RCS file: /cvsroot/firebug/firebug/web/gps.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** gps.php 3 Aug 2004 00:55:35 -0000 1.1 --- gps.php 3 Aug 2004 01:35:41 -0000 1.2 *************** *** 10,13 **** --- 10,16 ---- <body> + <?php + include("header.php"); + ?> <h1>GPS</h1> *************** *** 44,47 **** --- 47,56 ---- </center> + <br> + + <?php + include("links.php"); + ?> + </body> </html> \ No newline at end of file Index: index.php =================================================================== RCS file: /cvsroot/firebug/firebug/web/index.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** index.php 3 Aug 2004 00:47:54 -0000 1.2 --- index.php 3 Aug 2004 01:35:41 -0000 1.3 *************** *** 14,18 **** <body> ! <img src = "images/firebug.jpg"> <p> --- 14,20 ---- <body> ! <?php ! include("header.php"); ! ?> <p> *************** *** 31,39 **** <br> ! <center> ! <font color = "#0033CC"> ! |<a href="./overview.html">Overview</a>|<a href="./architecture.php">System Architecture</a>|<a href="./mote.php">The Mote</a>|<a href="./gps.php">GPS</a>|<a href ="./monitoring.php">Deployment</a>|<a href="./people.html">People</a>|<a href="./publications.html">Publications</a>|<br /> ! </font> ! </center> <br> --- 33,39 ---- <br> ! <?php ! include("links.php"); ! ?> <br> *************** *** 52,59 **** </center> - <?php - include("links.php"); - ?> - </body> </html> \ No newline at end of file --- 52,55 ---- Index: monitoring.php =================================================================== RCS file: /cvsroot/firebug/firebug/web/monitoring.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** monitoring.php 3 Aug 2004 00:55:35 -0000 1.1 --- monitoring.php 3 Aug 2004 01:35:41 -0000 1.2 *************** *** 10,14 **** <body> ! <h1>Deployment of the Motes</h1> Deployment of the motes requires two parts: the setup of the motes and the monitoring of the motes. --- 10,16 ---- <body> ! <?php ! include("header.php"); ! ?> <h1>Deployment of the Motes</h1> Deployment of the motes requires two parts: the setup of the motes and the monitoring of the motes. *************** *** 116,119 **** --- 118,126 ---- </table> + <br> + + <?php + include("links.php"); + ?> </body> Index: mote.php =================================================================== RCS file: /cvsroot/firebug/firebug/web/mote.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mote.php 3 Aug 2004 00:55:35 -0000 1.1 --- mote.php 3 Aug 2004 01:35:41 -0000 1.2 *************** *** 11,14 **** --- 11,18 ---- <body> + <?php + include("header.php"); + ?> + <h1>The FireBoard/Mote</h1> *************** *** 40,43 **** --- 44,53 ---- </center> + <br> + <br> + + <?php + include("links.php"); + ?> </body> Index: links.php =================================================================== RCS file: /cvsroot/firebug/firebug/web/links.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** links.php 3 Aug 2004 00:55:35 -0000 1.1 --- links.php 3 Aug 2004 01:35:41 -0000 1.2 *************** *** 11,20 **** <body> ! <h2>Some links</h2> ! ! <a href="./overview.html">Overview</a> <br /> ! <a href="./people.html">People</a> <br /> ! <a href="./publications.html">Publications</a> <br /> ! <a href="./gps_tests.htm">Some GPS results</a> <br /> </body> --- 11,19 ---- <body> ! <center> ! <font color = "#0033CC"> ! |<a href="./index.php">Home</a>|<a href="./overview.php">Overview</a>|<a href="./architecture.php">System Architecture</a>|<a href="./mote.php">The Mote</a>|<a href="./gps.php">GPS</a>|<a href ="./monitoring.php">Deployment</a>|<a href="./people.php">People</a>|<a href="./publications.php">Publications</a>|<br /> ! </font> ! </center> </body> Index: architecture.php =================================================================== RCS file: /cvsroot/firebug/firebug/web/architecture.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** architecture.php 3 Aug 2004 00:55:35 -0000 1.1 --- architecture.php 3 Aug 2004 01:35:41 -0000 1.2 *************** *** 10,13 **** --- 10,16 ---- <body> + <?php + include("header.php"); + ?> <h1>System Architecture</h1> *************** *** 33,36 **** --- 36,45 ---- </center> + <br> + + <?php + include("links.php"); + ?> + </body> </html> \ No newline at end of file |
From: Kevin <kar...@us...> - 2004-08-03 00:55:44
|
Update of /cvsroot/firebug/firebug/web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13675 Added Files: architecture.php gps.php links.php monitoring.php mote.php Log Message: Added new files for the website. --- NEW FILE: gps.php --- <html> <head> <link type="text/css" rel="stylesheet" href="firebug.css"> <link rel="SHORTCUT ICON" href="./images/favicon.ico"> <title> FireBug </title> </head> <body> <h1>GPS</h1> <p> Sensor location is an essential component of instrumented wildfire monitoring. Each mote is equipped with a Leadtek GPS receiver. Following deployment, the mote's fixed global position (GGA) is recorded and stored locally. </p> <center> <img src="images/gps.jpg"> </center> <a href="./gps_tests.htm">Some GPS results</a> <h2>Multi-hop Routing Protocol</h2> The initial implementation of FireBug uses MH6 for the self-organizing network routing protocol. Motes route data to the base station using radio link reliability. <br> <center> <table> <tr> <td> <img src="images/surgepic8.jpg"> </td> </tr> <tr> <td> <font face="Comic Sans MS"> Surge displays the topology of the network. </font> </td> </tr> </table> </center> </body> </html> --- NEW FILE: monitoring.php --- <html> <head> <link type="text/css" rel="stylesheet" href="firebug.css"> <link rel="SHORTCUT ICON" href="./images/favicon.ico"> <title> FireBug </title> </head> <body> <h1>Deployment of the Motes</h1> Deployment of the motes requires two parts: the setup of the motes and the monitoring of the motes. <h2>Setup of the Motes</h2> <p> Before the motes are placed in the field, they are programmed using the base station: </p> <center> <table> <tr> <td> <img src="images/basestation.jpg"> </td> <td> <img src="images/base_station.jpg"> </td> </tr> <tr> <td> <font face = "Comic Sans MS"> The motes are programmed using the base station. </font> </td> <td> <font face = "Comic Sans MS"> A closeup of the base station. </font> </td> </tr> </table> </center> <br> <p> Then, the motes are prepared for deployment: </p> <center> <img src="images/deploy.jpg"> </center> <br> <p> And finally, the result of all the work: </p> <center> <table> <tr> <td> <img src = "images/mote.jpg"> </td> </tr> <tr> <td> <font face="Comic Sans MS"> Photo of a deployed mote. </font> </td> </tr> </table> </center> <h2>Monitoring of the Motes</h2> Firebug allows for online monitoring of the motes. Below are some pictures of the monitoring in action: <center> <table> <tr> <td> <img src = "images/browser.jpg"> </td> </tr> <tr> <td> <font face="Comic Sans MS"> A screenshot of the browser-enabled monitoring of the sensors. </font> </td> </tr> </table> <br> <br> <br> <table> <tr></tr> <tr> <td> <img src = "images/monitoring.jpg"> </td> </tr> <tr> <td> <font face="Comic Sans MS"> An example of real-time monitoring using the web browser system. </font> </td> </tr> </table> </body> </html> --- NEW FILE: architecture.php --- <html> <head> <link type="text/css" rel="stylesheet" href="firebug.css"> <link rel="SHORTCUT ICON" href="./images/favicon.ico"> <title> FireBug </title> </head> <body> <h1>System Architecture</h1> <p> The FireBug system is composed of a network of GPS-enabled, wireless thermal sensors, a control layer for processing sensor data, and a command center for interactively communicating with the sensor network. Each of these layers are independent of the others, communicating through well-defined interfaces. </p> <br> <center> <img src="images/sysarch.jpg"> </center> <br> <h2>Data Flow/Tool Chains</h2> <p> A large amount of sample data are greatly needed in a timely manner. Firebug tool chains handle the data flow with standard technology, make the data with accurate data value, reliable data transfer and world wide access of data. </p> <center> <img src="images/tool_chain.jpg"> </center> </body> </html> --- NEW FILE: links.php --- <html> <head> <link type="text/css" rel="stylesheet" href="firebug.css"> <link rel="SHORTCUT ICON" href="./images/favicon.ico"> <title> FireBug </title> </head> <body> <h2>Some links</h2> <a href="./overview.html">Overview</a> <br /> <a href="./people.html">People</a> <br /> <a href="./publications.html">Publications</a> <br /> <a href="./gps_tests.htm">Some GPS results</a> <br /> </body> </html> --- NEW FILE: mote.php --- <html> <head> <link type="text/css" rel="stylesheet" href="firebug.css"> <link rel="SHORTCUT ICON" href="./images/favicon.ico"> <title> FireBug </title> </head> <body> <h1>The FireBoard/Mote</h1> <p> Each mote has sufficient power, radio communication and processing capabilities to support location and thermal sensors and data handling. Along with geographic position, motes measure: <p> <ul> <li>Humidity</li> <li>Temperature</li> <li>Light Intensity</li> <li>Acceleration</li> </ul> <center> <table> <tr> <td> <img src="images/mote_closeup.jpg"> </td> </tr> <tr> <td> <font face="Comic Sans MS"> Closeup of a mote. </font> </td> </tr> </table> </center> </body> </html> |
From: Kevin <kar...@us...> - 2004-08-03 00:53:17
|
Update of /cvsroot/firebug/firebug/web/images In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13396 Added Files: firebug.jpg gps.jpg mote_closeup.jpg sysarch.jpg tool_chain.jpg Log Message: Added files for the website. --- NEW FILE: gps.jpg --- (This appears to be a binary file; contents omitted.) --- NEW FILE: mote_closeup.jpg --- (This appears to be a binary file; contents omitted.) --- NEW FILE: tool_chain.jpg --- (This appears to be a binary file; contents omitted.) --- NEW FILE: firebug.jpg --- (This appears to be a binary file; contents omitted.) --- NEW FILE: sysarch.jpg --- (This appears to be a binary file; contents omitted.) |
From: Kevin <kar...@us...> - 2004-08-03 00:48:02
|
Update of /cvsroot/firebug/firebug/web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12779 Modified Files: index.php publications.html Log Message: Updated version of the Firebug website. Index: index.php =================================================================== RCS file: /cvsroot/firebug/firebug/web/index.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** index.php 21 Jul 2004 23:48:55 -0000 1.1 --- index.php 3 Aug 2004 00:47:54 -0000 1.2 *************** *** 14,33 **** <body> <p> ! The FireBug web site is being reorganized. ! Thank you for your patience. </p> ! <h2>Some links</h2> ! <a href="./overview.html">Overview</a> <br /> ! <a href="./people.html">People</a> <br /> ! <a href="./publications.html">Publications</a> <br /> ! <a href="./gps_tests.htm">Some GPS results</a> <br /> ! </body> </html> \ No newline at end of file --- 14,59 ---- <body> + <img src = "images/firebug.jpg"> <p> ! <font size = 5> ! ! ! ! ! ! Collecting real time data from wildfires is important for life safety considerations, and allows predictive analysis of evolving fire behavior. One way to collect such data is to deploy sensors in the wild fire environment. FireBugs are small, wireless sensors (motes) based on TinyOS that self-organize into networks for collecting real time data in wild fire environments. The FireBug system combines state-of-the-art sensor hardware running TinyOS with standard, off-the-shelf World Wide Web and database technology for allowing users to rapidly deploy FireBugs and monitor network behavior. ! </f> </p> + <br> + <br> + <br> ! <center> ! <font color = "#0033CC"> ! |<a href="./overview.html">Overview</a>|<a href="./architecture.php">System Architecture</a>|<a href="./mote.php">The Mote</a>|<a href="./gps.php">GPS</a>|<a href ="./monitoring.php">Deployment</a>|<a href="./people.html">People</a>|<a href="./publications.html">Publications</a>|<br /> ! </font> ! </center> ! <br> + <center> + <table> + <tr> + <td><img src = "images/nsf_small.gif"></td> + <td> + <font size = 2> + The FireBug system was funded by a grant from the <a href="http://www.nsf.gov">National Science Foundation</a> Information Technology Research initiative, award ITR/IM-0121693. + </font> + </td> + </tr> + </table> + </center> ! <?php ! include("links.php"); ! ?> + </body> </html> \ No newline at end of file Index: publications.html =================================================================== RCS file: /cvsroot/firebug/firebug/web/publications.html,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** publications.html 15 Jul 2004 16:16:04 -0000 1.9 --- publications.html 3 Aug 2004 00:47:54 -0000 1.10 *************** *** 10,14 **** <body> ! <h1>FireBug publications</h1> <ul> --- 10,14 ---- <body> ! <h1>FireBug Publications</h1> <ul> |
From: David M. D. <do...@us...> - 2004-08-02 23:07:10
|
Update of /cvsroot/firebug/fireboard/tools/src/xlisten In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26430 Modified Files: genc.pm Log Message: Moved some of the generation code to subs. Index: genc.pm =================================================================== RCS file: /cvsroot/firebug/fireboard/tools/src/xlisten/genc.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** genc.pm 31 Jul 2004 00:25:13 -0000 1.3 --- genc.pm 2 Aug 2004 23:07:01 -0000 1.4 *************** *** 17,28 **** ! ## TODO ## ---------------------------------------------------------- ## Several things need to be done to make this viable for the ! ## kinds of messages we want to process. The first part is ## to get rid of the java type conversions, and preserve the ## structure as defined the tinyos header file. We can do this ## because nesc native types are identical to c native types. ! ## true; --- 17,32 ---- ! ## TODO for autogenerating C code. ## ---------------------------------------------------------- ## Several things need to be done to make this viable for the ! ## kinds of messages we want to process. The first part is ## to get rid of the java type conversions, and preserve the ## structure as defined the tinyos header file. We can do this ## because nesc native types are identical to c native types. ! ## ! ! ## Parts of this code were written for the NSF_ITR funded ! ## firebug project. ! true; *************** *** 43,46 **** --- 47,55 ---- } + $I = " "; + $smallskip = "\n\n"; + $medskip = "\n\n\n\n"; + $bigskip = "\n\n\n\n\n\n"; + print "/**\n"; print " * This class is automatically generated by mig. DO NOT EDIT THIS FILE.\n"; *************** *** 51,64 **** print "#include <stdio.h>\n"; print "#include <stdlib.h>\n"; ! $I = " "; ! $smallskip = "\n\n"; ! $medskip = "\n\n\n\n"; ! $bigskip = "\n\n\n\n\n\n"; ! print "typedef struct _$java_classname $java_classname;\n\n"; print "typedef struct _XbowSensorboardPacket XbowSensorboardPacket;\n"; print "// This struct is defined to keep gcc happy while the module\n"; print "// is under development. At some point in the near future, a\n"; --- 60,81 ---- print "#include <stdio.h>\n"; print "#include <stdlib.h>\n"; + print "#include <memory.h>\n"; ! print $medskip; + print "/** Private header is programmer specified for handling\n"; + print " * conversion functions, etc.\n */\n"; + print "//#include \"$java_classname\_private.h\"\n"; ! ! ! print $medskip; ! ! print "/** These need to be moved to a header file. */\n"; ! print "typedef struct _$java_classname $java_classname;\n"; print "typedef struct _XbowSensorboardPacket XbowSensorboardPacket;\n"; + print $smallskip; + print "// This struct is defined to keep gcc happy while the module\n"; print "// is under development. At some point in the near future, a\n"; *************** *** 71,122 **** print $medskip; ! print "struct _$java_classname {\n"; ! ## todo move this to sub print_msg_struct(). for (@fields) { ($field, $type, $bitlength, $offset, $amax, $abitsize, $aoffset) = @{$_}; - ($ctype, $java_access, $arrayspec) = &cbasetype($type, $bitlength, 0); ! ! # This is clunky but will work. A better way to do it would be to store ! # the nested struct internally in the field array somehow. ! # Maybe a perl guru can figure that out. ! # What needs to be done is to find one of these, then ! # store it until all the members written out, ! # then print it. ! if ($field =~ /(.*)\.([^.]*)$/) { ! $struct = $1; ! $member = $2; ! #print STDERR $struct;#.", "$member."\n"; ! } ! ! ## Gets an array of format specifiers useful in *print* functions ! ## in libc. the @format array can be passed ! push(@format, &formatstring($type, $bitlength, 0)); ! $field =~ s/\./_/g; ! printf "$I$ctype $field;\n"; } - print "};"; - print $medskip; ! ## The get/set code is more to investigate the mechanics of ! ## the autogeneration of structs. It's probably more useful ! ## use the defined type directly, at least for now. ! ## ! ## todo move this to sub_get_set_methods() for (@fields) { ($field, $type, $bitlength, $offset, $amax, $abitsize, $aoffset) = @{$_}; ($ctype, $java_access, $arrayspec) = &cbasetype($type, $bitlength, 0); $field =~ s/\./_/g; ! print "void\n"; ! print "$java_classname\_set\_$field($java_classname * userdata, $ctype $field) {\n"; ! print " userdata->$field = $field\n"; ! print "}\n\n"; ! } --- 88,139 ---- print $medskip; ! # print "struct _$java_classname {\n"; ! # for (@fields) { ! # ($field, $type, $bitlength, $offset, $amax, $abitsize, $aoffset) = @{$_}; ! # ($ctype, $java_access, $arrayspec) = &cbasetype($type, $bitlength, 0); ! # if ($field =~ /(.*)\.([^.]*)$/) { ! # $struct = $1; ! # $member = $2; ! # } ! # push(@format, &formatstring($type, $bitlength, 0)); ! # $field =~ s/\./_/g; ! # printf "$I$ctype $field;\n"; ! # } ! # print "};"; + &gen_struct(); + print $medskip; + &gen_get_set(); + print $medskip; ! ## Default behavior is to return the input as output. ! ## User is responsible for "cooking" the data. for (@fields) { ($field, $type, $bitlength, $offset, $amax, $abitsize, $aoffset) = @{$_}; ($ctype, $java_access, $arrayspec) = &cbasetype($type, $bitlength, 0); ! $field =~ s/\./_/g; ! print "/** \@brief Default behavior is to return the input as output.\n"; ! print " * User is responsible for \"cooking\" the data.\n */\n"; ! print "static $ctype\n"; ! print "$field\_convert($ctype $field) {\n"; ! print " return $field;\n"; ! print "}\n\n"; } ! ## Function for cooking whole packet. Fields are ! ## by calling the individual "cook" functions for ! ## each member. ! print "void\n"; ! print "$java_classname\_cook\_packet($java_classname * userdata) {\n"; for (@fields) { ($field, $type, $bitlength, $offset, $amax, $abitsize, $aoffset) = @{$_}; ($ctype, $java_access, $arrayspec) = &cbasetype($type, $bitlength, 0); $field =~ s/\./_/g; ! print " userdata->$field = $field\_convert(userdata->$field);\n"; } + print "}\n\n"; *************** *** 196,199 **** --- 213,271 ---- } + sub gen_struct() { + + print "struct _$java_classname {\n"; + + ## todo move this to sub print_msg_struct(). + for (@fields) { + ($field, $type, $bitlength, $offset, $amax, $abitsize, $aoffset) = @{$_}; + + ($ctype, $java_access, $arrayspec) = &cbasetype($type, $bitlength, 0); + + # This is clunky but will work. A better way to do it would be to store + # the nested struct internally in the field array somehow. + # Maybe a perl guru can figure that out. + # What needs to be done is to find one of these, then + # store it until all the members written out, + # then print it. + if ($field =~ /(.*)\.([^.]*)$/) { + $struct = $1; + $member = $2; + #print STDERR $struct;#.", "$member."\n"; + } + + ## Gets an array of format specifiers useful in *print* functions + ## in libc. the @format array can be passed + push(@format, &formatstring($type, $bitlength, 0)); + $field =~ s/\./_/g; + printf "$I$ctype $field;\n"; + } + print "};"; + } + + sub gen_get_set() { + + ## The get/set code is more to investigate the mechanics of + ## the autogeneration of structs. It's probably more useful + ## use the defined type directly, at least for now. + ## + ## todo move this to sub_get_set_methods() + for (@fields) { + ($field, $type, $bitlength, $offset, $amax, $abitsize, $aoffset) = @{$_}; + ($ctype, $java_access, $arrayspec) = &cbasetype($type, $bitlength, 0); + $field =~ s/\./_/g; + print "void\n"; + print "$java_classname\_set\_$field($java_classname * userdata, $ctype $field) {\n"; + print " userdata->$field = $field;\n"; + print "}\n\n"; + #### Get methods + print "$ctype\n"; + print "$java_classname\_get\_$field($java_classname * userdata) {\n"; + print " return userdata->$field;\n"; + print "}\n\n"; + } + } + + ## TODO Change all these back to the base types available in c, which are *************** *** 208,212 **** if ($basetype eq "U") { $acc = "UIntElement"; ! if ($bitlength < 8) { $jtype = "byte"; } elsif ($bitlength < 16) { $jtype = "uint8_t"; } elsif ($bitlength < 32) { $jtype = "uint16_t"; } --- 280,284 ---- if ($basetype eq "U") { $acc = "UIntElement"; ! if ($bitlength < 8) { $jtype = "unsigned char"; } elsif ($bitlength < 16) { $jtype = "uint8_t"; } elsif ($bitlength < 32) { $jtype = "uint16_t"; } *************** *** 215,219 **** elsif ($basetype eq "I") { $acc = "SIntElement"; ! if ($bitlength <= 8) { $jtype = "byte"; } elsif ($bitlength <= 16) { $jtype = "short"; } elsif ($bitlength <= 32) { $jtype = "int"; } --- 287,291 ---- elsif ($basetype eq "I") { $acc = "SIntElement"; ! if ($bitlength <= 8) { $jtype = "char"; } elsif ($bitlength <= 16) { $jtype = "short"; } elsif ($bitlength <= 32) { $jtype = "int"; } *************** *** 374,379 **** } } - - - - --- 446,447 ---- |
From: David M. D. <do...@us...> - 2004-07-31 00:25:23
|
Update of /cvsroot/firebug/fireboard/tools/src/xlisten In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26576 Modified Files: genc.pm Log Message: Worked on extracting embedded struct data for output in genc.pm Index: genc.pm =================================================================== RCS file: /cvsroot/firebug/fireboard/tools/src/xlisten/genc.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** genc.pm 28 Jul 2004 00:59:01 -0000 1.2 --- genc.pm 31 Jul 2004 00:25:13 -0000 1.3 *************** *** 79,83 **** ($field, $type, $bitlength, $offset, $amax, $abitsize, $aoffset) = @{$_}; ! ($ctype, $java_access, $arrayspec) = &cbasetype($type, $bitlength, 0); ## Gets an array of format specifiers useful in *print* functions --- 79,95 ---- ($field, $type, $bitlength, $offset, $amax, $abitsize, $aoffset) = @{$_}; ! ($ctype, $java_access, $arrayspec) = &cbasetype($type, $bitlength, 0); ! ! # This is clunky but will work. A better way to do it would be to store ! # the nested struct internally in the field array somehow. ! # Maybe a perl guru can figure that out. ! # What needs to be done is to find one of these, then ! # store it until all the members written out, ! # then print it. ! if ($field =~ /(.*)\.([^.]*)$/) { ! $struct = $1; ! $member = $2; ! #print STDERR $struct;#.", "$member."\n"; ! } ## Gets an array of format specifiers useful in *print* functions |
From: David M. D. <do...@us...> - 2004-07-28 00:59:20
|
Update of /cvsroot/firebug/fireboard/tools/src/xlisten In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31892 Modified Files: genc.pm Log Message: More mods to genc.pm for emitting c code. Index: genc.pm =================================================================== RCS file: /cvsroot/firebug/fireboard/tools/src/xlisten/genc.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** genc.pm 23 Jul 2004 00:32:07 -0000 1.1 --- genc.pm 28 Jul 2004 00:59:01 -0000 1.2 *************** *** 16,19 **** --- 16,29 ---- # Boston, MA 02111-1307, USA. + + ## TODO + ## ---------------------------------------------------------- + ## Several things need to be done to make this viable for the + ## kinds of messages we want to process. The first part is + ## to get rid of the java type conversions, and preserve the + ## structure as defined the tinyos header file. We can do this + ## because nesc native types are identical to c native types. + ## + true; *************** *** 51,54 **** --- 61,68 ---- print "typedef struct _XbowSensorboardPacket XbowSensorboardPacket;\n"; + print "// This struct is defined to keep gcc happy while the module\n"; + print "// is under development. At some point in the near future, a\n"; + print "// a convention for passing arguments into the functions will\n"; + print "// have to be defined.\n"; print "struct _XbowSensorboardPacket {\n"; print " unsigned char data[29];\n"; *************** *** 61,64 **** --- 75,79 ---- + ## todo move this to sub print_msg_struct(). for (@fields) { ($field, $type, $bitlength, $offset, $amax, $abitsize, $aoffset) = @{$_}; *************** *** 69,72 **** --- 84,88 ---- ## in libc. the @format array can be passed push(@format, &formatstring($type, $bitlength, 0)); + $field =~ s/\./_/g; printf "$I$ctype $field;\n"; } *************** *** 74,81 **** print "};"; print $medskip; ! print "//Format string: @format\n"; print $medskip; --- 90,116 ---- print "};"; + print $medskip; + + ## The get/set code is more to investigate the mechanics of + ## the autogeneration of structs. It's probably more useful + ## use the defined type directly, at least for now. + ## + ## todo move this to sub_get_set_methods() + for (@fields) { + ($field, $type, $bitlength, $offset, $amax, $abitsize, $aoffset) = @{$_}; + ($ctype, $java_access, $arrayspec) = &cbasetype($type, $bitlength, 0); + $field =~ s/\./_/g; + print "void\n"; + print "$java_classname\_set\_$field($java_classname * userdata, $ctype $field) {\n"; + print " userdata->$field = $field\n"; + print "}\n\n"; + + } + print $medskip; ! print "//Format string can be generated automatically,\n"; ! print "//then the delimiters added later: @format\n"; print $medskip; *************** *** 147,553 **** print "}\n"; - print $medskip; - - print "#if 0\n"; - print "\n\n// All the rest is the old java stuff\n\n"; - - print " /** Create a new $java_classname of size $size. */\n"; - print " public $java_classname() {\n"; - print " super(DEFAULT_MESSAGE_SIZE);\n"; - print " amTypeSet(AM_TYPE);\n"; - print " }\n\n"; - - print " /** Create a new $java_classname of the given data_length. */\n"; - print " public $java_classname(int data_length) {\n"; - print " super(data_length);\n"; - print " amTypeSet(AM_TYPE);\n"; - print " }\n\n"; - - print " /**\n"; - print " * Create a new $java_classname with the given data_length\n"; - print " * and base offset.\n"; - print " */\n"; - print " public $java_classname(int data_length, int base_offset) {\n"; - print " super(data_length, base_offset);\n"; - print " amTypeSet(AM_TYPE);\n"; - print " }\n\n"; - - print " /**\n"; - print " * Create a new $java_classname using the given byte array\n"; - print " * as backing store.\n"; - print " */\n"; - print " public $java_classname(byte[] data) {\n"; - print " super(data);\n"; - print " amTypeSet(AM_TYPE);\n"; - print " }\n\n"; - - print " /**\n"; - print " * Create a new $java_classname using the given byte array\n"; - print " * as backing store, with the given base offset.\n"; - print " */\n"; - print " public $java_classname(byte[] data, int base_offset) {\n"; - print " super(data, base_offset);\n"; - print " amTypeSet(AM_TYPE);\n"; - print " }\n\n"; - - print " /**\n"; - print " * Create a new $java_classname using the given byte array\n"; - print " * as backing store, with the given base offset and data length.\n"; - print " */\n"; - print " public $java_classname(byte[] data, int base_offset, int data_length) {\n"; - print " super(data, base_offset, data_length);\n"; - print " amTypeSet(AM_TYPE);\n"; - print " }\n\n"; - - print " /**\n"; - print " * Create a new $java_classname embedded in the given message\n"; - print " * at the given base offset.\n"; - print " */\n"; - print " public $java_classname(net.tinyos.message.Message msg, int base_offset) {\n"; - print " super(msg, base_offset, DEFAULT_MESSAGE_SIZE);\n"; - print " amTypeSet(AM_TYPE);\n"; - print " }\n\n"; - - print " /**\n"; - print " * Create a new $java_classname embedded in the given message\n"; - print " * at the given base offset and length.\n"; - print " */\n"; - print " public $java_classname(net.tinyos.message.Message msg, int base_offset, int data_length) {\n"; - print " super(msg, base_offset, data_length);\n"; - print " amTypeSet(AM_TYPE);\n"; - print " }\n\n"; - - print " /**\n"; - print " * Return a String representation of this message. Includes the\n"; - print " * message type name and the non-indexed field values.\n"; - print " */\n"; - print " public String toString() {\n"; - print " String s = \"Message <$java_classname> \\n\";\n"; - for (@fields) { - ($field, $type, $bitlength, $offset, $amax, $abitsize, $aoffset) = @{$_}; - print " try {\n"; - $javafield = $field; - $javafield =~ s/\./_/g; - if (!@$amax) { - ($javatype, $java_access, $arrayspec) = &javabasetype($type, $bitlength, 0); - if ($javatype eq "float") { - print " s += \" [$field=\"+Float.toString(get_$javafield())+\"]\\n\";\n"; - } else { - print " s += \" [$field=0x\"+Long.toHexString(get_$javafield())+\"]\\n\";\n"; - } - } elsif (@$amax == 1 && $$amax[0] != 0) { - ($javatype, $java_access, $arrayspec) = &javabasetype($type, $bitlength, @$amax); - print " s += \" [$field=\";\n"; - print " for (int i = 0; i < $$amax[0]; i++) {\n"; - if ($javatype eq "float") { - print " s += Float.toString(getElement_$javafield(i))+\" \";\n"; - } else { - if ($bitlength > 32) { - print " s += \"0x\"+Long.toHexString(getElement_$javafield(i))+\" \";\n"; - } - elsif (bitlength > 16) { - print " s += \"0x\"+Long.toHexString(getElement_$javafield(i) & 0xffffffff)+\" \";\n"; - } - elsif (bitlength > 8) { - print " s += \"0x\"+Long.toHexString(getElement_$javafield(i) & 0xffff)+\" \";\n"; - } - else { - print " s += \"0x\"+Long.toHexString(getElement_$javafield(i) & 0xff)+\" \";\n"; - } - } - print " }\n"; - print " s += \"]\\n\";\n"; - } - print " } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }\n"; - } - print " return s;\n"; - print " }\n\n"; - - print " // Message-type-specific access methods appear below.\n\n"; - for (@fields) { - ($field, $type, $bitlength, $offset, $amax, $abitsize, $aoffset) = @{$_}; - - # Determine if array - if (@$amax) { - $isarray = 1; - $arraydims = @$amax; - $arraysize_bits = $$amax[0] * $$abitsize[0]; - $index = 0; - @args = map { $index++; "int index$index" } @{$amax}; - $argspec = join(", ", @args); - $index = 0; - @passargs = map { $index++; "index$index" } @{$amax}; - $passargs = join(", ", @passargs); - } else { - $isarray = 0; - $arraydims = 0; - $arraysize_bits = 0; - $argspec = ""; - $passargs = ""; - } - - # Determine if signed - if ($basetype eq "U") { - $signed = 0; $signedstr = ", unsigned"; - } elsif ($basetype eq "I") { - $signed = 1; $signedstr = ", signed"; - } elsif ($basetype eq "F" || $basetype eq "D" || $basetype eq "LD") { - $signed = 1; $signstr = ""; - } - - # Get field type and accessor - $javafield = $field; - $javafield =~ s/\./_/g; - ($javatype, $java_access, $arrayspec) = &javabasetype($type, $bitlength, $arraydims); - - print " /////////////////////////////////////////////////////////\n"; - print " // Accessor methods for field: $field\n"; - if ($isarray) { - print " // Field type: $javatype$arrayspec$signedstr\n"; - print " // Offset (bits): $offset\n"; - print " // Size of each element (bits): $bitlength\n"; - } else { - print " // Field type: $javatype$signedstr\n"; - print " // Offset (bits): $offset\n"; - print " // Size (bits): $bitlength\n"; - } - print " /////////////////////////////////////////////////////////\n\n"; - ### isSigned - if ($signed) { $strue = "true"; } else { $strue = "false"; } - print " /**\n"; - print " * Return whether the field '$field' is signed ($strue).\n"; - print " */\n"; - print " public static boolean isSigned_$javafield() {\n"; - print " return $strue;\n"; - print " }\n\n"; - - ### isArray - if ($isarray) { $atrue = "true"; } else { $atrue = "false"; } - print " /**\n"; - print " * Return whether the field '$field' is an array ($atrue).\n"; - print " */\n"; - print " public static boolean isArray_$javafield() {\n"; - print " return $atrue;\n"; - print " }\n\n"; - - ### Offset - print " /**\n"; - print " * Return the offset (in bytes) of the field '$field'\n"; - if ((int($offset) % 8) != 0) { - print " * WARNING: This field is not byte-aligned (bit offset $offset).\n"; - } - print " */\n"; - - print " public static int offset_$javafield($argspec) {\n"; - if ($isarray) { - printoffset($base + $offset, $amax, $abitsize, $aoffset, 0); - } else { - print " return ($offset / 8);\n"; - } - print " }\n\n"; - - print " /**\n"; - print " * Return the offset (in bits) of the field '$field'\n"; - print " */\n"; - print " public static int offsetBits_$javafield($argspec) {\n"; - if ($isarray) { - printoffset($base + $offset, $amax, $abitsize, $aoffset, 1); - } else { - print " return $offset;\n"; - } - print " }\n\n"; - - - if (!$isarray) { - ### For non-array fields - - ### Get - print " /**\n"; - print " * Return the value (as a $javatype) of the field '$field'\n"; - print " */\n"; - print " public $javatype get_$javafield() {\n"; - print " return ($javatype)get$java_access(offsetBits_$javafield(), $bitlength);\n"; - print " }\n\n"; - - ### Set - print " /**\n"; - print " * Set the value of the field '$field'\n"; - print " */\n"; - print " public void set_$javafield($javatype value) {\n"; - print " set$java_access(offsetBits_$javafield(), $bitlength, value);\n"; - print " }\n\n"; - - ### Size - print " /**\n"; - print " * Return the size, in bytes, of the field '$field'\n"; - if ((int($bitlength) % 8) != 0) { - print " * WARNING: This field is not an even-sized number of bytes ($bitlength bits).\n"; - } - print " */\n"; - print " public static int size_$javafield() {\n"; - if ((int($bitlength) % 8) != 0) { - print " return ($bitlength / 8) + 1;\n"; - } else { - print " return ($bitlength / 8);\n"; - } - print " }\n\n"; - - print " /**\n"; - print " * Return the size, in bits, of the field '$field'\n"; - print " */\n"; - print " public static int sizeBits_$javafield() {\n"; - print " return $bitlength;\n"; - print " }\n\n"; - - } else { - ### For array fields - - ### Get - print " /**\n"; - print " * Return the entire array '$field' as a $javatype$arrayspec\n"; - print " */\n"; - print " public $javatype$arrayspec get_$javafield() {\n"; - &printarrayget($javafield, $javatype, $arrayspec, $bitlength, $amax, $abitsize); - print " }\n\n"; - - ### Set - print " /**\n"; - print " * Set the contents of the array '$field' from the given $javatype$arrayspec\n"; - print " */\n"; - print " public void set_$javafield($javatype$arrayspec value) {\n"; - &printarrayset($javafield, $javatype, $arrayspec, $bitlength, $amax, $abitsize); - print " }\n\n"; - - ### GetElement - print " /**\n"; - print " * Return an element (as a $javatype) of the array '$field'\n"; - print " */\n"; - print " public $javatype getElement_$javafield($argspec) {\n"; - print " return ($javatype)get$java_access(offsetBits_$javafield($passargs), $bitlength);\n"; - print " }\n\n"; - - ### SetElement - print " /**\n"; - print " * Set an element of the array '$field'\n"; - print " */\n"; - print " public void setElement_$javafield($argspec, $javatype value) {\n"; - print " set$java_access(offsetBits_$javafield($passargs), $bitlength, value);\n"; - print " }\n\n"; - - if ($arraysize_bits != 0) { - ### Total size (when array size is known) - print " /**\n"; - print " * Return the total size, in bytes, of the array '$field'\n"; - if ((int($arraysize_bits) % 8) != 0) { - print " * WARNING: This array is not an even-sized number of bytes ($arraysize_bits bits).\n"; - } - print " */\n"; - print " public static int totalSize_$javafield() {\n"; - print " return ($arraysize_bits / 8);\n"; - print " }\n\n"; - - print " /**\n"; - print " * Return the total size, in bits, of the array '$field'\n"; - print " */\n"; - print " public static int totalSizeBits_$javafield() {\n"; - print " return $arraysize_bits;\n"; - print " }\n\n"; - } - - ### Element size - print " /**\n"; - print " * Return the size, in bytes, of each element of the array '$field'\n"; - if ((int($bitlength) % 8) != 0) { - print " * WARNING: This field is not an even-sized number of bytes ($bitlength bits).\n"; - } - print " */\n"; - print " public static int elementSize_$javafield() {\n"; - print " return ($bitlength / 8);\n"; - print " }\n\n"; - - print " /**\n"; - print " * Return the size, in bits, of each element of the array '$field'\n"; - print " */\n"; - print " public static int elementSizeBits_$javafield() {\n"; - print " return $bitlength;\n"; - print " }\n\n"; - - ### Number of dimensions - print " /**\n"; - print " * Return the number of dimensions in the array '$field'\n"; - print " */\n"; - print " public static int numDimensions_$javafield() {\n"; - print " return $arraydims;\n"; - print " }\n\n"; - - ### Number of elements - if ($arraydims == 1 && $$amax[0] != 0) { - # For 1D arrays where the size of the array is known - print " /**\n"; - print " * Return the number of elements in the array '$field'\n"; - print " */\n"; - print " public static int numElements_$javafield() {\n"; - print " return $$amax[0];\n"; - print " }\n\n"; - } - print " /**\n"; - print " * Return the number of elements in the array '$field'\n"; - print " * for the given dimension.\n"; - print " */\n"; - print " public static int numElements_$javafield(int dimension) {\n"; - print " int array_dims[] = { "; - foreach $e (@$amax) { print "$e, "; } - print " };\n"; - print " if (dimension < 0 || dimension >= $arraydims) throw new ArrayIndexOutOfBoundsException();\n"; - print " if (array_dims[dimension] == 0) throw new IllegalArgumentException(\"Array dimension \"+dimension+\" has unknown size\");\n"; - print " return array_dims[dimension];\n"; - print " }\n\n"; - - ### String conversions (for 1D arrays of 8-bit values) - if ($arraydims == 1 && $bitlength == 8) { - print " /**\n"; - print " * Fill in the array '$field' with a String\n"; - print " */\n"; - print " public void setString_$javafield(String s) { \n"; - if ($amax[0] != 0) { - print " int len = Math.min(s.length(), $$amax[0]-1);\n"; - } else { - print " int len = s.length();\n"; - } - print " int i;\n"; - print " for (i = 0; i < len; i++) {\n"; - print " setElement_$javafield(i, ($javatype)s.charAt(i));\n"; - print " }\n"; - print " setElement_$javafield(i, ($javatype)0); //null terminate\n"; - print " }\n\n"; - - print " /**\n"; - print " * Read the array '$field' as a String\n"; - print " */\n"; - print " public String getString_$javafield() { \n"; - if ($$amax[0] == 0) { - print " char carr[] = new char[net.tinyos.message.Message.MAX_CONVERTED_STRING_LENGTH];\n"; - } else { - print " char carr[] = new char[Math.min(net.tinyos.message.Message.MAX_CONVERTED_STRING_LENGTH,$$amax[0])];\n"; - } - print " int i;\n"; - print " for (i = 0; i < carr.length; i++) {\n"; - print " if ((char)getElement_$javafield(i) == (char)0) break;\n"; - print " carr[i] = (char)getElement_$javafield(i);\n"; - print " }\n"; - print " return new String(carr,0,i);\n"; - print " }\n\n"; - } - } - } - - print "}\n"; - - print "#endif\n"; } ## TODO Change all these back to the base types available in c, which are ! ## the same as in nesc. sub cbasetype() { --- 182,191 ---- print "}\n"; } ## TODO Change all these back to the base types available in c, which are ! ## the same as in nesc. Probably need to add a "bitfield" handler to ! ## do it right. sub cbasetype() { *************** *** 559,565 **** $acc = "UIntElement"; if ($bitlength < 8) { $jtype = "byte"; } ! elsif ($bitlength < 16) { $jtype = "short"; } ! elsif ($bitlength < 32) { $jtype = "int"; } ! else { $jtype = "long"; } } elsif ($basetype eq "I") { --- 197,203 ---- $acc = "UIntElement"; if ($bitlength < 8) { $jtype = "byte"; } ! elsif ($bitlength < 16) { $jtype = "uint8_t"; } ! elsif ($bitlength < 32) { $jtype = "uint16_t"; } ! else { $jtype = "uint32_t"; } } elsif ($basetype eq "I") { *************** *** 629,667 **** - sub javabasetype() - { - my ($basetype, $bitlength, $arraydims) = @_; - my $jtype, $acc; - - # Pick the java type whose range is closest to the corresponding C type - if ($basetype eq "U") { - $acc = "UIntElement"; - if ($bitlength < 8) { $jtype = "byte"; } - elsif ($bitlength < 16) { $jtype = "short"; } - elsif ($bitlength < 32) { $jtype = "int"; } - else { $jtype = "long"; } - } - elsif ($basetype eq "I") { - $acc = "SIntElement"; - if ($bitlength <= 8) { $jtype = "byte"; } - elsif ($bitlength <= 16) { $jtype = "short"; } - elsif ($bitlength <= 32) { $jtype = "int"; } - else { $jtype = "long"; } - } - elsif ($basetype eq "F" || $basetype eq "D" || $basetype eq "LD") { - $acc = "FloatElement"; - $jtype = "float"; - } - - if ($arraydims > 0) { - # For array types - $arrayspec = ""; - for ($i = 0; $i < $arraydims; $i++) { - $arrayspec = "[]" . $arrayspec; - } - } - - return ($jtype, $acc, $arrayspec); - } sub printoffset() --- 267,270 ---- |
From: David M. D. <do...@us...> - 2004-07-28 00:58:17
|
Update of /cvsroot/firebug/firebug/project/src/sensordata In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31803 Modified Files: mkcmsg.sh mkmsg.sh Log Message: Added some msgs to mig c targets. Index: mkcmsg.sh =================================================================== RCS file: /cvsroot/firebug/firebug/project/src/sensordata/mkcmsg.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mkcmsg.sh 23 Jul 2004 00:31:19 -0000 1.1 --- mkcmsg.sh 28 Jul 2004 00:58:03 -0000 1.2 *************** *** 8,16 **** # but for c set MSGROOT=$HOME/firebug/fireboard/tos/ ! mig c -java-classname=org.firebug.FireMsg -I. $HOME/firebug/fireboard/tos/sensorboards/xbow_mts420ca/fireboard.h Firedata_msg > FireMsg.c --- 8,19 ---- # but for c + ## Change for local conditions. set MSGROOT=$HOME/firebug/fireboard/tos/ ! ### Change the path and struct names for local conditions. mig c -java-classname=org.firebug.FireMsg -I. $HOME/firebug/fireboard/tos/sensorboards/xbow_mts420ca/fireboard.h Firedata_msg > FireMsg.c + mig c -java-classname=org.firebug.GGAMsg -I. $HOME/firebug/fireboard/tos/sensors/leadtek9546/leadtek_9546.h GGAMsg > GGAMsg.c + mig c -java-classname=org.firebug.GGAMsg1 -I. $HOME/firebug/fireboard/tos/sensors/leadtek9546/leadtek_9546.h GGAMsg1 > GGAMsg1.c Index: mkmsg.sh =================================================================== RCS file: /cvsroot/firebug/firebug/project/src/sensordata/mkmsg.sh,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** mkmsg.sh 23 Jul 2004 00:31:19 -0000 1.6 --- mkmsg.sh 28 Jul 2004 00:58:03 -0000 1.7 *************** *** 11,14 **** --- 11,15 ---- mig java -java-classname=org.firebug.FireMsg -I. $HOME/firebug/fireboard/tos/sensorboards/xbow_mts420ca/fireboard.h Firedata_msg > FireMsg.java mig java -java-classname=org.firebug.GGAMsg -I. $HOME/firebug/fireboard/tos/sensors/leadtek9546/leadtek_9546.h GGAMsg > GGAMsg.java + mig java -java-classname=org.firebug.GGAMsg1 -I. $HOME/firebug/fireboard/tos/sensors/leadtek9546/leadtek_9546.h GGAMsg1 > GGAMsg1.java mig java -java-classname=org.firebug.RangeMsg -I. $HOME/firebug/fireboard/tos/sensorboards/xbow_mts420ca/fireboard.h Rangedata_msg > RangeMsg.java mig java -java-classname=org.firebug.XBow1Msg -I. xbow.h XSensorMTS400Data1 > XBow1Msg.java |
From: Kevin <kar...@us...> - 2004-07-23 21:04:57
|
Update of /cvsroot/firebug/firebug/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22618 Modified Files: battery_test.txt Log Message: Update battery_test.txt with another battery test. Index: battery_test.txt =================================================================== RCS file: /cvsroot/firebug/firebug/doc/battery_test.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** battery_test.txt 23 Jul 2004 01:08:35 -0000 1.2 --- battery_test.txt 23 Jul 2004 21:04:46 -0000 1.3 *************** *** 23,24 **** --- 23,28 ---- a rating of 1.52V or higher. The first set of batteries barely lasted 2 1/2 hours, whereas the second set of batteries only lasted 2 hours. + + 7/23/04 + + Today I ran another battery test, this time with the Li-Ion battery that was charged with the Maxim IC. The test was run with the same setup as the other tests. This time, the mote continued to give accurate readings for 5 hours, 20 minutes. \ No newline at end of file |
From: Kevin <kar...@us...> - 2004-07-23 01:08:52
|
Update of /cvsroot/firebug/firebug/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6526 Modified Files: battery_test.txt Log Message: Updated battery_test.txt with today's battery tests. Index: battery_test.txt =================================================================== RCS file: /cvsroot/firebug/firebug/doc/battery_test.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** battery_test.txt 16 Jul 2004 22:20:16 -0000 1.1 --- battery_test.txt 23 Jul 2004 01:08:35 -0000 1.2 *************** *** 14,16 **** hours before it started to give bad data. Surprisingly, when this the mote was no longer producing valid data, the Li-Ion battery was ! still at 3.5V. \ No newline at end of file --- 14,24 ---- hours before it started to give bad data. Surprisingly, when this the mote was no longer producing valid data, the Li-Ion battery was ! still at 3.5V. ! ! 7/22/04 ! ! Today I decided to test the Panasonic Industrial AA batteries to see ! how they fared in comparison to the Li-Ion batteries. With the same ! setup as before, I used 2 sets of batteries, each individual one with ! a rating of 1.52V or higher. The first set of batteries barely lasted ! 2 1/2 hours, whereas the second set of batteries only lasted 2 hours. |
From: David M. D. <do...@us...> - 2004-07-23 00:40:54
|
Update of /cvsroot/firebug/fireboard/tos In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2804/tos Log Message: Directory /cvsroot/firebug/fireboard/tos added to the repository |
From: David M. D. <do...@us...> - 2004-07-23 00:32:23
|
Update of /cvsroot/firebug/fireboard/tools/src/xlisten In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1629 Modified Files: xpacket.c Added Files: genc.pm Log Message: perl script for autogenerating c code code from am types. --- NEW FILE: genc.pm --- # This file is part of the nesC compiler. # Copyright (C) 2002 Intel Corporation # # The attached "nesC" software is provided to you under the terms and # conditions of the GNU General Public License Version 2 as published by the # Free Software Foundation. # # nesC is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with nesC; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. true; sub gen() { my ($classname, @spec) = @_; require migdecode; &decode(@spec); &usage("no classname name specified") if !defined($java_classname); $java_extends = "net.tinyos.message.Message" if !defined($java_extends); # See if name has a package specifier if ($java_classname =~ /(.*)\.([^.]*)$/) { $package = $1; $java_classname = $2; } print "/**\n"; print " * This class is automatically generated by mig. DO NOT EDIT THIS FILE.\n"; print " * This code implements C interface to the '$java_classname'\n"; print " * message type.\n"; print " */\n\n"; print "#include <stdio.h>\n"; print "#include <stdlib.h>\n"; $I = " "; $smallskip = "\n\n"; $medskip = "\n\n\n\n"; $bigskip = "\n\n\n\n\n\n"; print "typedef struct _$java_classname $java_classname;\n\n"; print "typedef struct _XbowSensorboardPacket XbowSensorboardPacket;\n"; print "struct _XbowSensorboardPacket {\n"; print " unsigned char data[29];\n"; print "};\n"; print $medskip; print "struct _$java_classname {\n"; for (@fields) { ($field, $type, $bitlength, $offset, $amax, $abitsize, $aoffset) = @{$_}; ($ctype, $java_access, $arrayspec) = &cbasetype($type, $bitlength, 0); ## Gets an array of format specifiers useful in *print* functions ## in libc. the @format array can be passed push(@format, &formatstring($type, $bitlength, 0)); printf "$I$ctype $field;\n"; } print "};"; print $medskip; print "//Format string: @format\n"; print $medskip; ## In the code for the xlisten boards, the conversions are ## in the print statement. If the conversions were done ## before the print statement, then the conversion function ## becomes the only function needing to be stubbed. The ## runtime differences are neglible. print "/** User has to fill in any conversion code\n"; print " * necessary for processing.\n"; print " */\n"; print "$java_classname * convert(char * data) {\n"; print " // Just to keep gcc happy.\n"; print " return ($java_classname*)data;\n"; print "}\n"; print $medskip; ## Start printing output functions. print "/** Print the bytes of the packet. */\n"; print "void $java_classname\_print\_raw (XbowSensorboardPacket *packet) {\n\n"; print "$I$java_classname * userdata = ($java_classname*)packet->data;\n"; print "}\n\n"; print "/** Print typed output. */\n"; print "void $java_classname\_print\_cooked (XbowSensorboardPacket *packet) {\n\n"; print "$I$java_classname * userdata = ($java_classname*)packet->data;\n"; print "}\n\n"; print "/** Print cooked with tabs. */\n"; print "void $java_classname\_print\_tabbed (XbowSensorboardPacket *packet) {\n\n"; print "$I$java_classname * userdata = ($java_classname*)packet->data;\n"; print "}\n\n"; # print "package $package;\n\n" if $package; # print "public class $java_classname extends $java_extends {\n\n"; print "/** The default size of this message type in bytes. */\n"; print "static int DEFAULT_MESSAGE_SIZE = $size;\n\n"; print "/** The Active Message type associated with this message. */\n"; print "static int AM_TYPE = $amtype;\n\n"; print "/** If incomplete types are used, we need to provide a way\n"; print " * to manage memory.\n"; print " */\n"; print "$java_classname *\n"; print "$java_classname\_new() {\n"; print " $java_classname * userdata = ($java_classname*)malloc(sizeof($java_classname));\n"; print " memset((void*)userdata,0xda,sizeof($java_classname));\n"; print " return userdata;\n"; print "}\n"; print $medskip; print "void\n"; print "$java_classname\_delete($java_classname * userdata) {\n"; print " memset((void*)userdata,0xdd,sizeof($java_classname));\n"; print " free(userdata);\n"; print "}\n"; print $medskip; print "#if 0\n"; print "\n\n// All the rest is the old java stuff\n\n"; print " /** Create a new $java_classname of size $size. */\n"; print " public $java_classname() {\n"; print " super(DEFAULT_MESSAGE_SIZE);\n"; print " amTypeSet(AM_TYPE);\n"; print " }\n\n"; print " /** Create a new $java_classname of the given data_length. */\n"; print " public $java_classname(int data_length) {\n"; print " super(data_length);\n"; print " amTypeSet(AM_TYPE);\n"; print " }\n\n"; print " /**\n"; print " * Create a new $java_classname with the given data_length\n"; print " * and base offset.\n"; print " */\n"; print " public $java_classname(int data_length, int base_offset) {\n"; print " super(data_length, base_offset);\n"; print " amTypeSet(AM_TYPE);\n"; print " }\n\n"; print " /**\n"; print " * Create a new $java_classname using the given byte array\n"; print " * as backing store.\n"; print " */\n"; print " public $java_classname(byte[] data) {\n"; print " super(data);\n"; print " amTypeSet(AM_TYPE);\n"; print " }\n\n"; print " /**\n"; print " * Create a new $java_classname using the given byte array\n"; print " * as backing store, with the given base offset.\n"; print " */\n"; print " public $java_classname(byte[] data, int base_offset) {\n"; print " super(data, base_offset);\n"; print " amTypeSet(AM_TYPE);\n"; print " }\n\n"; print " /**\n"; print " * Create a new $java_classname using the given byte array\n"; print " * as backing store, with the given base offset and data length.\n"; print " */\n"; print " public $java_classname(byte[] data, int base_offset, int data_length) {\n"; print " super(data, base_offset, data_length);\n"; print " amTypeSet(AM_TYPE);\n"; print " }\n\n"; print " /**\n"; print " * Create a new $java_classname embedded in the given message\n"; print " * at the given base offset.\n"; print " */\n"; print " public $java_classname(net.tinyos.message.Message msg, int base_offset) {\n"; print " super(msg, base_offset, DEFAULT_MESSAGE_SIZE);\n"; print " amTypeSet(AM_TYPE);\n"; print " }\n\n"; print " /**\n"; print " * Create a new $java_classname embedded in the given message\n"; print " * at the given base offset and length.\n"; print " */\n"; print " public $java_classname(net.tinyos.message.Message msg, int base_offset, int data_length) {\n"; print " super(msg, base_offset, data_length);\n"; print " amTypeSet(AM_TYPE);\n"; print " }\n\n"; print " /**\n"; print " * Return a String representation of this message. Includes the\n"; print " * message type name and the non-indexed field values.\n"; print " */\n"; print " public String toString() {\n"; print " String s = \"Message <$java_classname> \\n\";\n"; for (@fields) { ($field, $type, $bitlength, $offset, $amax, $abitsize, $aoffset) = @{$_}; print " try {\n"; $javafield = $field; $javafield =~ s/\./_/g; if (!@$amax) { ($javatype, $java_access, $arrayspec) = &javabasetype($type, $bitlength, 0); if ($javatype eq "float") { print " s += \" [$field=\"+Float.toString(get_$javafield())+\"]\\n\";\n"; } else { print " s += \" [$field=0x\"+Long.toHexString(get_$javafield())+\"]\\n\";\n"; } } elsif (@$amax == 1 && $$amax[0] != 0) { ($javatype, $java_access, $arrayspec) = &javabasetype($type, $bitlength, @$amax); print " s += \" [$field=\";\n"; print " for (int i = 0; i < $$amax[0]; i++) {\n"; if ($javatype eq "float") { print " s += Float.toString(getElement_$javafield(i))+\" \";\n"; } else { if ($bitlength > 32) { print " s += \"0x\"+Long.toHexString(getElement_$javafield(i))+\" \";\n"; } elsif (bitlength > 16) { print " s += \"0x\"+Long.toHexString(getElement_$javafield(i) & 0xffffffff)+\" \";\n"; } elsif (bitlength > 8) { print " s += \"0x\"+Long.toHexString(getElement_$javafield(i) & 0xffff)+\" \";\n"; } else { print " s += \"0x\"+Long.toHexString(getElement_$javafield(i) & 0xff)+\" \";\n"; } } print " }\n"; print " s += \"]\\n\";\n"; } print " } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }\n"; } print " return s;\n"; print " }\n\n"; print " // Message-type-specific access methods appear below.\n\n"; for (@fields) { ($field, $type, $bitlength, $offset, $amax, $abitsize, $aoffset) = @{$_}; # Determine if array if (@$amax) { $isarray = 1; $arraydims = @$amax; $arraysize_bits = $$amax[0] * $$abitsize[0]; $index = 0; @args = map { $index++; "int index$index" } @{$amax}; $argspec = join(", ", @args); $index = 0; @passargs = map { $index++; "index$index" } @{$amax}; $passargs = join(", ", @passargs); } else { $isarray = 0; $arraydims = 0; $arraysize_bits = 0; $argspec = ""; $passargs = ""; } # Determine if signed if ($basetype eq "U") { $signed = 0; $signedstr = ", unsigned"; } elsif ($basetype eq "I") { $signed = 1; $signedstr = ", signed"; } elsif ($basetype eq "F" || $basetype eq "D" || $basetype eq "LD") { $signed = 1; $signstr = ""; } # Get field type and accessor $javafield = $field; $javafield =~ s/\./_/g; ($javatype, $java_access, $arrayspec) = &javabasetype($type, $bitlength, $arraydims); print " /////////////////////////////////////////////////////////\n"; print " // Accessor methods for field: $field\n"; if ($isarray) { print " // Field type: $javatype$arrayspec$signedstr\n"; print " // Offset (bits): $offset\n"; print " // Size of each element (bits): $bitlength\n"; } else { print " // Field type: $javatype$signedstr\n"; print " // Offset (bits): $offset\n"; print " // Size (bits): $bitlength\n"; } print " /////////////////////////////////////////////////////////\n\n"; ### isSigned if ($signed) { $strue = "true"; } else { $strue = "false"; } print " /**\n"; print " * Return whether the field '$field' is signed ($strue).\n"; print " */\n"; print " public static boolean isSigned_$javafield() {\n"; print " return $strue;\n"; print " }\n\n"; ### isArray if ($isarray) { $atrue = "true"; } else { $atrue = "false"; } print " /**\n"; print " * Return whether the field '$field' is an array ($atrue).\n"; print " */\n"; print " public static boolean isArray_$javafield() {\n"; print " return $atrue;\n"; print " }\n\n"; ### Offset print " /**\n"; print " * Return the offset (in bytes) of the field '$field'\n"; if ((int($offset) % 8) != 0) { print " * WARNING: This field is not byte-aligned (bit offset $offset).\n"; } print " */\n"; print " public static int offset_$javafield($argspec) {\n"; if ($isarray) { printoffset($base + $offset, $amax, $abitsize, $aoffset, 0); } else { print " return ($offset / 8);\n"; } print " }\n\n"; print " /**\n"; print " * Return the offset (in bits) of the field '$field'\n"; print " */\n"; print " public static int offsetBits_$javafield($argspec) {\n"; if ($isarray) { printoffset($base + $offset, $amax, $abitsize, $aoffset, 1); } else { print " return $offset;\n"; } print " }\n\n"; if (!$isarray) { ### For non-array fields ### Get print " /**\n"; print " * Return the value (as a $javatype) of the field '$field'\n"; print " */\n"; print " public $javatype get_$javafield() {\n"; print " return ($javatype)get$java_access(offsetBits_$javafield(), $bitlength);\n"; print " }\n\n"; ### Set print " /**\n"; print " * Set the value of the field '$field'\n"; print " */\n"; print " public void set_$javafield($javatype value) {\n"; print " set$java_access(offsetBits_$javafield(), $bitlength, value);\n"; print " }\n\n"; ### Size print " /**\n"; print " * Return the size, in bytes, of the field '$field'\n"; if ((int($bitlength) % 8) != 0) { print " * WARNING: This field is not an even-sized number of bytes ($bitlength bits).\n"; } print " */\n"; print " public static int size_$javafield() {\n"; if ((int($bitlength) % 8) != 0) { print " return ($bitlength / 8) + 1;\n"; } else { print " return ($bitlength / 8);\n"; } print " }\n\n"; print " /**\n"; print " * Return the size, in bits, of the field '$field'\n"; print " */\n"; print " public static int sizeBits_$javafield() {\n"; print " return $bitlength;\n"; print " }\n\n"; } else { ### For array fields ### Get print " /**\n"; print " * Return the entire array '$field' as a $javatype$arrayspec\n"; print " */\n"; print " public $javatype$arrayspec get_$javafield() {\n"; &printarrayget($javafield, $javatype, $arrayspec, $bitlength, $amax, $abitsize); print " }\n\n"; ### Set print " /**\n"; print " * Set the contents of the array '$field' from the given $javatype$arrayspec\n"; print " */\n"; print " public void set_$javafield($javatype$arrayspec value) {\n"; &printarrayset($javafield, $javatype, $arrayspec, $bitlength, $amax, $abitsize); print " }\n\n"; ### GetElement print " /**\n"; print " * Return an element (as a $javatype) of the array '$field'\n"; print " */\n"; print " public $javatype getElement_$javafield($argspec) {\n"; print " return ($javatype)get$java_access(offsetBits_$javafield($passargs), $bitlength);\n"; print " }\n\n"; ### SetElement print " /**\n"; print " * Set an element of the array '$field'\n"; print " */\n"; print " public void setElement_$javafield($argspec, $javatype value) {\n"; print " set$java_access(offsetBits_$javafield($passargs), $bitlength, value);\n"; print " }\n\n"; if ($arraysize_bits != 0) { ### Total size (when array size is known) print " /**\n"; print " * Return the total size, in bytes, of the array '$field'\n"; if ((int($arraysize_bits) % 8) != 0) { print " * WARNING: This array is not an even-sized number of bytes ($arraysize_bits bits).\n"; } print " */\n"; print " public static int totalSize_$javafield() {\n"; print " return ($arraysize_bits / 8);\n"; print " }\n\n"; print " /**\n"; print " * Return the total size, in bits, of the array '$field'\n"; print " */\n"; print " public static int totalSizeBits_$javafield() {\n"; print " return $arraysize_bits;\n"; print " }\n\n"; } ### Element size print " /**\n"; print " * Return the size, in bytes, of each element of the array '$field'\n"; if ((int($bitlength) % 8) != 0) { print " * WARNING: This field is not an even-sized number of bytes ($bitlength bits).\n"; } print " */\n"; print " public static int elementSize_$javafield() {\n"; print " return ($bitlength / 8);\n"; print " }\n\n"; print " /**\n"; print " * Return the size, in bits, of each element of the array '$field'\n"; print " */\n"; print " public static int elementSizeBits_$javafield() {\n"; print " return $bitlength;\n"; print " }\n\n"; ### Number of dimensions print " /**\n"; print " * Return the number of dimensions in the array '$field'\n"; print " */\n"; print " public static int numDimensions_$javafield() {\n"; print " return $arraydims;\n"; print " }\n\n"; ### Number of elements if ($arraydims == 1 && $$amax[0] != 0) { # For 1D arrays where the size of the array is known print " /**\n"; print " * Return the number of elements in the array '$field'\n"; print " */\n"; print " public static int numElements_$javafield() {\n"; print " return $$amax[0];\n"; print " }\n\n"; } print " /**\n"; print " * Return the number of elements in the array '$field'\n"; print " * for the given dimension.\n"; print " */\n"; print " public static int numElements_$javafield(int dimension) {\n"; print " int array_dims[] = { "; foreach $e (@$amax) { print "$e, "; } print " };\n"; print " if (dimension < 0 || dimension >= $arraydims) throw new ArrayIndexOutOfBoundsException();\n"; print " if (array_dims[dimension] == 0) throw new IllegalArgumentException(\"Array dimension \"+dimension+\" has unknown size\");\n"; print " return array_dims[dimension];\n"; print " }\n\n"; ### String conversions (for 1D arrays of 8-bit values) if ($arraydims == 1 && $bitlength == 8) { print " /**\n"; print " * Fill in the array '$field' with a String\n"; print " */\n"; print " public void setString_$javafield(String s) { \n"; if ($amax[0] != 0) { print " int len = Math.min(s.length(), $$amax[0]-1);\n"; } else { print " int len = s.length();\n"; } print " int i;\n"; print " for (i = 0; i < len; i++) {\n"; print " setElement_$javafield(i, ($javatype)s.charAt(i));\n"; print " }\n"; print " setElement_$javafield(i, ($javatype)0); //null terminate\n"; print " }\n\n"; print " /**\n"; print " * Read the array '$field' as a String\n"; print " */\n"; print " public String getString_$javafield() { \n"; if ($$amax[0] == 0) { print " char carr[] = new char[net.tinyos.message.Message.MAX_CONVERTED_STRING_LENGTH];\n"; } else { print " char carr[] = new char[Math.min(net.tinyos.message.Message.MAX_CONVERTED_STRING_LENGTH,$$amax[0])];\n"; } print " int i;\n"; print " for (i = 0; i < carr.length; i++) {\n"; print " if ((char)getElement_$javafield(i) == (char)0) break;\n"; print " carr[i] = (char)getElement_$javafield(i);\n"; print " }\n"; print " return new String(carr,0,i);\n"; print " }\n\n"; } } } print "}\n"; print "#endif\n"; } ## TODO Change all these back to the base types available in c, which are ## the same as in nesc. sub cbasetype() { my ($basetype, $bitlength, $arraydims) = @_; my $jtype, $acc; # Pick the java type whose range is closest to the corresponding C type if ($basetype eq "U") { $acc = "UIntElement"; if ($bitlength < 8) { $jtype = "byte"; } elsif ($bitlength < 16) { $jtype = "short"; } elsif ($bitlength < 32) { $jtype = "int"; } else { $jtype = "long"; } } elsif ($basetype eq "I") { $acc = "SIntElement"; if ($bitlength <= 8) { $jtype = "byte"; } elsif ($bitlength <= 16) { $jtype = "short"; } elsif ($bitlength <= 32) { $jtype = "int"; } else { $jtype = "long"; } } elsif ($basetype eq "F" || $basetype eq "D" || $basetype eq "LD") { $acc = "FloatElement"; $jtype = "float"; } if ($arraydims > 0) { # For array types $arrayspec = ""; for ($i = 0; $i < $arraydims; $i++) { $arrayspec = "[]" . $arrayspec; } } return ($jtype, $acc, $arrayspec); } ## TODO Get rid of all the superfluous code, ## or move the functionality into cbasetype. sub formatstring() { my ($basetype, $bitlength, $arraydims) = @_; my $jtype, $acc, $formatstring; # Pick the java type whose range is closest to the corresponding C type if ($basetype eq "U") { $acc = "UIntElement"; if ($bitlength < 8) { $jtype = "byte"; $formatstring = "c";} elsif ($bitlength < 16) { $jtype = "short"; $formatstring = "i";} elsif ($bitlength < 32) { $jtype = "int"; $formatstring = "i";} else { $jtype = "long"; $formatstring = "%i"} } elsif ($basetype eq "I") { $acc = "SIntElement"; if ($bitlength <= 8) { $jtype = "byte"; $formatstring = "c";} elsif ($bitlength <= 16) { $jtype = "short"; $formatstring = "i";} elsif ($bitlength <= 32) { $jtype = "int"; $formatstring = "i";} else { $jtype = "long"; } } elsif ($basetype eq "F" || $basetype eq "D" || $basetype eq "LD") { $acc = "FloatElement"; $jtype = "float"; $formatstring = "f"; } if ($arraydims > 0) { # For array types $arrayspec = ""; for ($i = 0; $i < $arraydims; $i++) { $arrayspec = "[]" . $arrayspec; } } #return ($jtype, $acc, $arrayspec, $formatstring); return ($formatstring); } sub javabasetype() { my ($basetype, $bitlength, $arraydims) = @_; my $jtype, $acc; # Pick the java type whose range is closest to the corresponding C type if ($basetype eq "U") { $acc = "UIntElement"; if ($bitlength < 8) { $jtype = "byte"; } elsif ($bitlength < 16) { $jtype = "short"; } elsif ($bitlength < 32) { $jtype = "int"; } else { $jtype = "long"; } } elsif ($basetype eq "I") { $acc = "SIntElement"; if ($bitlength <= 8) { $jtype = "byte"; } elsif ($bitlength <= 16) { $jtype = "short"; } elsif ($bitlength <= 32) { $jtype = "int"; } else { $jtype = "long"; } } elsif ($basetype eq "F" || $basetype eq "D" || $basetype eq "LD") { $acc = "FloatElement"; $jtype = "float"; } if ($arraydims > 0) { # For array types $arrayspec = ""; for ($i = 0; $i < $arraydims; $i++) { $arrayspec = "[]" . $arrayspec; } } return ($jtype, $acc, $arrayspec); } sub printoffset() { my ($offset, $max, $bitsize, $aoffset, $inbits) = @_; print " int offset = $offset;\n"; for ($i = 1; $i <= @$max; $i++) { # check index bounds. 0-sized arrays don't get an upper-bound check # (they represent variable size arrays. Normally they should only # occur as the first-dimension of the last element of the structure) if ($$max[$i - 1] != 0) { print " if (index$i < 0 || index$i >= $$max[$i - 1]) throw new ArrayIndexOutOfBoundsException();\n"; } else { print " if (index$i < 0) throw new ArrayIndexOutOfBoundsException();\n"; } print " offset += $$aoffset[$i - 1] + index$i * $$bitsize[$i - 1];\n"; } if ($inbits) { print " return offset;\n"; } else { print " return (offset / 8);\n"; } } sub printarrayget() { my ($javafield, $javatype, $arrayspec, $bitlength, $amax, $abitsize) = @_; # Check whether array has known size for ($i = 0; $i < @$amax; $i++) { if ($$amax[$i] == 0) { print " throw new IllegalArgumentException(\"Cannot get field as array - unknown size\");\n"; return; } } print " $javatype$arrayspec tmp = new $javatype"; for ($i = 0; $i < @$amax; $i++) { print "[$$amax[$i]]"; } print ";\n"; $indent = " "; for ($i = 0; $i < @$amax; $i++) { print " $indent for (int index$i = 0; index$i < numElements_$javafield($i); index$i++) {\n"; $indent = $indent . " "; } $indent = $indent . " "; print " $indent tmp"; for ($i = 0; $i < @$amax; $i++) { print "[index$i]"; } print " = getElement_$javafield("; for ($i = 0; $i < @$amax; $i++) { print "index$i"; if ($i != @$amax-1) { print ","; } } print ");\n"; $indent = substr($indent, 0, length($indent)-2); for ($i = 0; $i < @$amax; $i++) { $indent = substr($indent, 0, length($indent)-2); print " $indent }\n"; } print " return tmp;\n"; } sub printarrayset() { my ($javafield, $javatype, $arrayspec, $bitlength, $amax, $abitsize) = @_; $indent = " "; $val = ""; for ($i = 0; $i < @$amax; $i++) { print " $indent for (int index$i = 0; index$i < value$val.length; index$i++) {\n"; $val = $val . "[index$i]"; $indent = $indent . " "; } $indent = $indent . " "; print " $indent setElement_$javafield("; for ($i = 0; $i < @$amax; $i++) { print "index$i"; if ($i != @$amax-1) { print ","; } } print ", value"; for ($i = 0; $i < @$amax; $i++) { print "[index$i]"; } print ");\n"; $indent = substr($indent, 0, length($indent)-2); for ($i = 0; $i < @$amax; $i++) { $indent = substr($indent, 0, length($indent)-2); print " $indent }\n"; } } |
From: David M. D. <do...@us...> - 2004-07-23 00:32:22
|
Update of /cvsroot/firebug/fireboard/tools/src/xlisten/boards In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1629/boards Modified Files: mts400.c Log Message: perl script for autogenerating c code code from am types. Index: mts400.c =================================================================== RCS file: /cvsroot/firebug/fireboard/tools/src/xlisten/boards/mts400.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mts400.c 15 Jul 2004 17:04:21 -0000 1.1 --- mts400.c 23 Jul 2004 00:32:07 -0000 1.2 *************** *** 591,594 **** --- 591,596 ---- + // Packet data should be dereferenced and passed to the + // conversion functions, don't pass the entire packet. fprintf(logfile,"%s\t%i\t%i\t%i\t%i\t%i\n", timestring, |
From: David M. D. <do...@us...> - 2004-07-23 00:31:28
|
Update of /cvsroot/firebug/firebug/project/src/sensordata In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1502 Modified Files: mkmsg.sh xbow.h Added Files: mkcmsg.sh Log Message: Added a script for producing c output. Index: xbow.h =================================================================== RCS file: /cvsroot/firebug/firebug/project/src/sensordata/xbow.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** xbow.h 5 Jul 2004 18:13:38 -0000 1.3 --- xbow.h 23 Jul 2004 00:31:19 -0000 1.4 *************** *** 68,69 **** --- 68,89 ---- AM_WEATHER1 = 139 }; + + + typedef struct GPS1 { + + uint8_t hours; //Hours + uint8_t minutes;//Minutes + uint8_t Lat_deg;//Latitude degrees + uint8_t Long_deg;//Longitude degrees + uint32_t dec_sec;//Decimal seconds + uint32_t Lat_dec_min;//Latitude decimal minutes + uint32_t Long_dec_min;//Longitude decimal minutes + uint8_t NSEWind;//NSEWind + uint8_t Fixed; // as to whether the packet is valid(i.e. has the gps Fixed on to the sattelites). + uint8_t num_sats; + } GPS1; + + + enum { + AM_GPS1 = 140 + }; --- NEW FILE: mkcmsg.sh --- #!/usr/bin/sh # Temporary script for figuring out how to extract the # struct definitions from the nc files, put them in # header files, and use mig to make msgs from the # struct definition. # but for c set MSGROOT=$HOME/firebug/fireboard/tos/ mig c -java-classname=org.firebug.FireMsg -I. $HOME/firebug/fireboard/tos/sensorboards/xbow_mts420ca/fireboard.h Firedata_msg > FireMsg.c Index: mkmsg.sh =================================================================== RCS file: /cvsroot/firebug/firebug/project/src/sensordata/mkmsg.sh,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** mkmsg.sh 2 Jul 2004 00:09:47 -0000 1.5 --- mkmsg.sh 23 Jul 2004 00:31:19 -0000 1.6 *************** *** 15,18 **** --- 15,22 ---- mig java -java-classname=org.firebug.XBow2Msg -I. xbow.h XSensorMTS420GPSData > XBow2Msg.java mig java -java-classname=org.firebug.XBow3Msg -I. xbow.h Weather1 > XBow3Msg.java + mig java -java-classname=org.firebug.XBow4Msg -I. xbow.h GPS1 > XBow4Msg.java + + + |
From: David M. D. <do...@us...> - 2004-07-22 00:33:06
|
Update of /cvsroot/firebug/firebug/web/images In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4067 Added Files: base_station_anno.jpg Log Message: Annotated picture of base station. --- NEW FILE: base_station_anno.jpg --- (This appears to be a binary file; contents omitted.) |
From: David M. D. <do...@us...> - 2004-07-21 23:49:04
|
Update of /cvsroot/firebug/firebug/web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28476 Added Files: index.frame index.php Removed Files: index.html Log Message: Changed front page to php driven. --- index.html DELETED --- --- NEW FILE: index.frame --- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> <html> <head> <link type="text/css" rel="stylesheet" href="firebug.css" /> <link rel="SHORTCUT ICON" href="./images/favicon.ico"/> <title> FireBug Wildland fire monitoring system </title> </head> <frameset cols="190,90%"> <frame frameborder="0" src="./menu.html" noresize /> <frame frameborder="0" src="./introduction.html" name="main"/> </frameset> </html> --- NEW FILE: index.php --- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <link type="text/css" rel="stylesheet" href="firebug.css"> <link rel="SHORTCUT ICON" href="./images/favicon.ico"> <title> FireBug </title> </head> <body> <p> The FireBug web site is being reorganized. Thank you for your patience. </p> <h2>Some links</h2> <a href="./overview.html">Overview</a> <br /> <a href="./people.html">People</a> <br /> <a href="./publications.html">Publications</a> <br /> <a href="./gps_tests.htm">Some GPS results</a> <br /> </body> </html> |
From: David M. D. <do...@us...> - 2004-07-21 23:45:51
|
Update of /cvsroot/firebug/firebug/web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28102 Modified Files: gps.html overview.html people.html Removed Files: index_new.html index_old.html introduction.html nido.html surgediff.html Log Message: Removed superfluous files from web site. --- index_new.html DELETED --- Index: overview.html =================================================================== RCS file: /cvsroot/firebug/firebug/web/overview.html,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** overview.html 22 Nov 2003 01:06:46 -0000 1.3 --- overview.html 21 Jul 2004 23:45:42 -0000 1.4 *************** *** 3,7 **** - <html> <head> --- 3,6 ---- *************** *** 16,19 **** --- 15,44 ---- <h1>Overview of FireBug</h1> + <h2>Introduction</h2> + + <p> + The FireBug system is composed of a network of GPS-enabled, + wireless thermal sensors, a control layer for processing + sensor data, and a command center for interactively + communicating with the sensor network. Each of these layers + are independent of the others, communicating through + well-defined interfaces. + These web pages document technical and administrative + aspects of the FireBug project. FireBug is part of the + <a href="http://www-laep.ced.berkeley.edu/~itr/">ITR Fire Project</a>. + ITR (Information Technology Research) is a + <a href="http://www.nsf.gov">National Science Foundation</a> + initiative focused on innovative areas of science, engineering + and education with a strong information technology component. + Details about the NSF ITR project may be found + <a href="http://www.itr.nsf.gov">here</a>. + </p> + + <p> + The FireBug project is hosted at + <a href="http://sourceforge.net/projects/firebug"> + sourceforge.net</a>. + </p> + <h2> Index: people.html =================================================================== RCS file: /cvsroot/firebug/firebug/web/people.html,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** people.html 20 Nov 2003 22:32:17 -0000 1.5 --- people.html 21 Jul 2004 23:45:42 -0000 1.6 *************** *** 63,72 **** <li> ! David M. Doolin, H: 558-8294. </li> ! <li>Carmel Majidi</li> ! <li>(Max) Min Chen</li> ! <li>Anshuman Sharma</li> <li> --- 63,72 ---- <li> ! David M. Doolin (CEE), H: 558-8294. </li> ! <li>Brian Collins (CEE)</li> ! <li>Kevin Lee (EECS)</li> ! <li>Alex Do (ME)</li> <li> --- introduction.html DELETED --- Index: gps.html =================================================================== RCS file: /cvsroot/firebug/firebug/web/gps.html,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** gps.html 19 Nov 2003 01:36:51 -0000 1.12 --- gps.html 21 Jul 2004 23:45:41 -0000 1.13 *************** *** 101,108 **** </ul> <h2><a href="gps_driver.html">GPS Driver</a></h2> <h2><a href="gps_tests.htm">Receiver Characterization</a></h2> ! --- 101,110 ---- </ul> + + <!-- <h2><a href="gps_driver.html">GPS Driver</a></h2> <h2><a href="gps_tests.htm">Receiver Characterization</a></h2> ! --> --- surgediff.html DELETED --- --- nido.html DELETED --- --- index_old.html DELETED --- |
From: David M. D. <do...@us...> - 2004-07-21 20:30:45
|
Update of /cvsroot/firebug/firebug/web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22013 Modified Files: admin.html Added Files: base_station.html Log Message: Added a web page showing how the base station is put together along with parts and part numbers so that other people can order them easily. Index: admin.html =================================================================== RCS file: /cvsroot/firebug/firebug/web/admin.html,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** admin.html 14 Jul 2004 22:07:35 -0000 1.15 --- admin.html 21 Jul 2004 20:30:22 -0000 1.16 *************** *** 151,155 **** <code>example_current</code> and <code>example_cumulative</code>. The mysql client supports cut and paste, use the following: </p> ! <pre> CREATE TABLE example_current (mote_id INTEGER,<br> time TIMESTAMP,<br> temp FLOAT,<br> rel_hum FLOAT,<br> _baropres FLOAT,<br> cnt INTEGER);<br> </pre> <pre> CREATE TABLE example_cumulative (mote_id INTEGER,<br> time TIMESTAMP,<br> temp FLOAT,<br> rel_hum FLOAT,<br> baro_pres FLOAT,<br> cnt INTEGER);<br> </pre> <p> </p> --- 151,162 ---- <code>example_current</code> and <code>example_cumulative</code>. The mysql client supports cut and paste, use the following: </p> ! <pre> CREATE TABLE example_current (mote_id INTEGER, ! <br /> time TIMESTAMP, ! <br /> temp FLOAT, ! <br /> rel_hum FLOAT, ! <br /> _baropres FLOAT, ! <br /> cnt INTEGER); ! <br /> ! </pre> <pre> CREATE TABLE example_cumulative (mote_id INTEGER,<br> time TIMESTAMP,<br> temp FLOAT,<br> rel_hum FLOAT,<br> baro_pres FLOAT,<br> cnt INTEGER);<br> </pre> <p> </p> --- NEW FILE: base_station.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Field preparation for base station</title> </head> <body> <h1>Field preparation for base station</h1> <p> The base station mote mounts on a Crossbow MIB510 programming board. The board is equipped with strategically placed holes for mounting motes and sensors, which we used with some off-the-shelf parts to increase the system's robustness in field conditions. The following snapshot of the unit is annotated with parts we added. </p> <img src="./images/base_station_anno.jpg" width="650"> <ol> <li>Socket cap screw, nylon, 4-40 x 3/4", McMaster-Carr 95868A113</li> <li>Flat washer, nylon, #4, Waldom KNW-875</li> <li>Spacer, nylon, #4, 3/16" long x 1/4" O.D., McMaster-Carr 94639A102</li> <li>Nut, steel nickel plated, 4-40 x 1/4" x 3/32", Waldom KF-557</li> <li>Stand off nut for 9-pin serial line connector</li> </ol> <hr> <address><a href="mailto:"></a></address> <!-- Created: Wed Jul 21 13:03:52 Pacific Daylight Time 2004 --> <!-- hhmts start --> Last modified: Wed Jul 21 13:27:58 Pacific Daylight Time 2004 <!-- hhmts end --> </body> </html> |
From: David M. D. <do...@us...> - 2004-07-21 20:30:32
|
Update of /cvsroot/firebug/firebug/web/images In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22013/images Added Files: base_station.jpg Log Message: Added a web page showing how the base station is put together along with parts and part numbers so that other people can order them easily. --- NEW FILE: base_station.jpg --- (This appears to be a binary file; contents omitted.) |
From: Kevin <kar...@us...> - 2004-07-21 18:56:10
|
Update of /cvsroot/firebug/firebug/doc/chassis In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31167 Modified Files: chassis.tex Log Message: Added some more info to the Battery section. Index: chassis.tex =================================================================== RCS file: /cvsroot/firebug/firebug/doc/chassis/chassis.tex,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** chassis.tex 15 Jul 2004 23:28:30 -0000 1.10 --- chassis.tex 21 Jul 2004 18:56:00 -0000 1.11 *************** *** 177,181 **** first each time, then this idea of using rechargeable batteries would not be that much more convenient than ! having to replace the AAs. Luckily, Li-Ion batteries do not have this effect, and it is even recommended that only partial discharges be made before recharging them. --- 177,181 ---- first each time, then this idea of using rechargeable batteries would not be that much more convenient than ! having to replace the AAs. Moreover, if the batteries were to only be used for motes, then they would never be completely discharged. Luckily, Li-Ion batteries do not have this effect, and it is even recommended that only partial discharges be made before recharging them. *************** *** 189,192 **** --- 189,200 ---- suitable than Ni-Cd batteries for this project. + \subsection{Combining the Battery with the Motes} + + + Currently we are using 3.7V, 600mAh Li-Ion rechargeable batteries, manufactured by Ultralife Batteries, Inc. Unlike normal rechargeable batteries that are found in electronic devices, these OEM batteries do not have connectors on them already, only two wires with positive and negative polarities. What this means is that we also have to decide on the type of connector to use. Judging from the amount of difficulty we have had with the Molex 51021-0200 crimp housings, it would be nice if some other sort of connector could be used, especially a larger one, since the battery wires are larger than the ones used to attach the battery case to the Molex power connector on the board. + (to be continued...) + + Ideally, it would be nice if we could use the one connector for the entire mote. This would leave us with three options: use the molex power connector, the adaptor jack, or a mini-USB jack. + \section{Mounting} |
From: David M. D. <do...@us...> - 2004-07-21 13:49:00
|
Update of /cvsroot/firebug/fireboard/tools/src/xlisten In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26449 Modified Files: xpacket.c Log Message: Added a parse table to xlisten. Index: xpacket.c =================================================================== RCS file: /cvsroot/firebug/fireboard/tools/src/xlisten/xpacket.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** xpacket.c 21 Jul 2004 13:25:52 -0000 1.2 --- xpacket.c 21 Jul 2004 13:48:51 -0000 1.3 *************** *** 36,40 **** void xpacket_depacketize(unsigned char *tos_packet) { - if (g_datastart > XPACKET_DATASTART) { int i = 0, o = 2; // index and offset while(i < XPACKET_SIZE) { --- 36,39 ---- *************** *** 47,51 **** } } - } } --- 46,49 ---- *************** *** 171,189 **** ! // This typedef eventually gets moved to a header file typedef struct _packetprinter Packetprinter; // Keep this as incomplete type to eliminate unnecessary ! // meddling. The definition can probably be expanded to ! // include more than cooked. struct _packetprinter { unsigned int type; ! void (*print)(XbowSensorboardPacket *packet); }; // Add XTYPE and function for cooking up output anywhere ! // before the last (0,NULL) entry. You're done. ! Packetprinter pp[] = { {XTYPE_MDA500,mda500_print_cooked}, {XTYPE_MDA400,mda400_print_cooked}, --- 169,189 ---- ! // This typedef eventually gets moved to a header file. typedef struct _packetprinter Packetprinter; // Keep this as incomplete type to eliminate unnecessary ! // meddling. The definition can be expanded to ! // include more than cooked. Also, if the arguments change ! // to the print function, it's relatively easy to change. struct _packetprinter { + unsigned int type; ! void (*print_cooked)(XbowSensorboardPacket * packet); }; // Add XTYPE and function for cooking up output anywhere ! // before the last {0,NULL} entry. You're done. ! Packetprinter packet_printer [] = { {XTYPE_MDA500,mda500_print_cooked}, {XTYPE_MDA400,mda400_print_cooked}, *************** *** 201,205 **** ! void xpacket_print_cooked(unsigned char *tos_packet) { XbowSensorboardPacket *packet = xpacket_get_sensor_data(tos_packet); --- 201,205 ---- ! void xpacket_print_cooked_new(unsigned char *tos_packet) { XbowSensorboardPacket *packet = xpacket_get_sensor_data(tos_packet); *************** *** 214,221 **** } ! while (pp[i].type != 0) { ! if (pp[i].type == sensorboard_id) { ! pp[i].print(packet); break; } --- 214,224 ---- } ! // Since the array of printing functions is static ! // data declared above, the while loop has almost the ! // same overhead as the switchyard. ! while (packet_printer[i].type != 0) { ! if (packet_printer[i].type == sensorboard_id) { ! packet_printer[i].print_cooked(packet); break; } *************** *** 232,236 **** * @version 2004/3/11 mturon Intial version */ ! void xpacket_print_cooked_old(unsigned char *tos_packet) { XbowSensorboardPacket *packet = xpacket_get_sensor_data(tos_packet); --- 235,239 ---- * @version 2004/3/11 mturon Intial version */ ! void xpacket_print_cooked(unsigned char *tos_packet) { XbowSensorboardPacket *packet = xpacket_get_sensor_data(tos_packet); *************** *** 318,322 **** case XTYPE_MTS420: ! mts420_print_tabbed(packet); break; --- 321,325 ---- case XTYPE_MTS420: ! //mts420_print_tabbed(packet); break; |
From: David M. D. <do...@us...> - 2004-07-21 13:26:01
|
Update of /cvsroot/firebug/fireboard/tools/src/xlisten In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22671 Modified Files: xpacket.c Log Message: Added parse table to xpacket.c Index: xpacket.c =================================================================== RCS file: /cvsroot/firebug/fireboard/tools/src/xlisten/xpacket.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** xpacket.c 15 Jul 2004 17:03:39 -0000 1.1 --- xpacket.c 21 Jul 2004 13:25:52 -0000 1.2 *************** *** 60,64 **** XbowSensorboardPacket *xpacket_get_sensor_data(unsigned char *tos_packet) { ! return (XbowSensorboardPacket *)(tos_packet + XPACKET_DATASTART); } --- 60,64 ---- XbowSensorboardPacket *xpacket_get_sensor_data(unsigned char *tos_packet) { ! return (XbowSensorboardPacket *)(tos_packet + g_datastart); } *************** *** 116,120 **** case XPACKET_TEXT_MSG: packet->reserved2 = '\0'; ! printf("msg from id=%d: %s\n", packet->node_id, packet->data); return; } --- 116,121 ---- case XPACKET_TEXT_MSG: packet->reserved2 = '\0'; ! printf("msg from id=%d: %s\n", packet->node_id, ! (char *)packet->data); return; } *************** *** 169,172 **** --- 170,227 ---- } + + // This typedef eventually gets moved to a header file + typedef struct _packetprinter Packetprinter; + + // Keep this as incomplete type to eliminate unnecessary + // meddling. The definition can probably be expanded to + // include more than cooked. + struct _packetprinter { + unsigned int type; + void (*print)(XbowSensorboardPacket *packet); + }; + + + // Add XTYPE and function for cooking up output anywhere + // before the last (0,NULL) entry. You're done. + Packetprinter pp[] = { + {XTYPE_MDA500,mda500_print_cooked}, + {XTYPE_MDA400,mda400_print_cooked}, + {XTYPE_MDA300,mda300_print_cooked}, + {XTYPE_MTS300,mts300_print_cooked}, + {XTYPE_MTS310,mts310_print_cooked}, + {XTYPE_MTS400,mts400_print_cooked}, + {XTYPE_MTS420,mts420_print_cooked}, + {XTYPE_MTS510,mts510_print_cooked}, + {XTYPE_MTS101,mts101_print_cooked}, + {XTYPE_MEP500,mep500_print_cooked}, + {XTYPE_MEP401,mep401_print_cooked}, + {0 ,NULL} + }; + + + void xpacket_print_cooked(unsigned char *tos_packet) + { + XbowSensorboardPacket *packet = xpacket_get_sensor_data(tos_packet); + unsigned int sensorboard_id = packet->sensorboard_id; + int i = 0; + + switch(packet->packet_id) { + case XPACKET_TEXT_MSG: + packet->reserved2 = '\0'; + printf("MSG from id=%d: %s\n\n", packet->node_id, packet->data); + return; + } + + while (pp[i].type != 0) { + + if (pp[i].type == sensorboard_id) { + pp[i].print(packet); + break; + } + i++; + } + } + /** * Display a packet as cooked values in engineering units. *************** *** 177,181 **** * @version 2004/3/11 mturon Intial version */ ! void xpacket_print_cooked(unsigned char *tos_packet) { XbowSensorboardPacket *packet = xpacket_get_sensor_data(tos_packet); --- 232,236 ---- * @version 2004/3/11 mturon Intial version */ ! void xpacket_print_cooked_old(unsigned char *tos_packet) { XbowSensorboardPacket *packet = xpacket_get_sensor_data(tos_packet); *************** *** 184,188 **** case XPACKET_TEXT_MSG: packet->reserved2 = '\0'; ! printf("MSG from id=%d: %s\n\n", packet->node_id, packet->data); return; } --- 239,244 ---- case XPACKET_TEXT_MSG: packet->reserved2 = '\0'; ! printf("MSG from id=%d: %s\n\n", packet->node_id, ! (char *)packet->data); return; } *************** *** 229,233 **** break; ! case XTYPE_MEP401: mep401_print_cooked(packet); break; --- 285,289 ---- break; ! case XTYPE_MEP401: mep401_print_cooked(packet); break; *************** *** 237,238 **** --- 293,326 ---- } + /** + * Display a packet as cooked values in engineering units. + * + * @param packet The TOS packet as raw bytes from the serial port + * + * @author Martin Turon + * @version 2004/3/11 mturon Intial version + */ + void xpacket_print_tabbed(unsigned char *tos_packet) + { + XbowSensorboardPacket *packet = xpacket_get_sensor_data(tos_packet); + + /* + switch(packet->packet_id) { + case XPACKET_TEXT_MSG: + packet->reserved2 = '\0'; + printf("MSG from id=%d: %s\n\n", packet->node_id, + (char *)packet->data); + return; + } + */ + + switch(packet->sensorboard_id) { + + case XTYPE_MTS420: + mts420_print_tabbed(packet); + break; + + /* More sensor boards go here... */ + } + } + |
From: Kevin <kar...@us...> - 2004-07-16 22:20:24
|
Update of /cvsroot/firebug/firebug/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15938 Added Files: battery_test.txt Log Message: Documentation regarding the Li-Ion battery performance test --- NEW FILE: battery_test.txt --- 7/16/04 Today I ran a test to see how long a recharged Li-Ion battery could run a mote. Since we noticed a significant number of battery failures after connecting the GPS antennas to the motes, I specifically wanted to see how long these Li-Ion batteries could last while the motes operated with the GPS antennas. Since we currently do not have a means of connecting the Li-Ion battery directly to the mote, I had to use a breadboard to help establish the power connection. Using a molex connector that I had created before, I connected it to the mote and then to the breadboard. Then, the battery was connected to the breadboard. The battery I used started at 4V, which is what I had charged it to earlier. The battery ended up running the mote for 5 hours before it started to give bad data. Surprisingly, when this the mote was no longer producing valid data, the Li-Ion battery was still at 3.5V. |