[Firebug-cvs] firebug/project/src/sensordata mkmsg.sh,NONE,1.1 sensormsg.h,NONE,1.1
Brought to you by:
doolin
From: <che...@us...> - 2003-07-10 09:05:29
|
Update of /cvsroot/firebug/firebug/project/src/sensordata In directory sc8-pr-cvs1:/tmp/cvs-serv9809/sensordata Added Files: mkmsg.sh sensormsg.h Log Message: use blast protocol and add cnt to sensor packet --- NEW FILE: mkmsg.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. mig java -java-classname=org.firebug.SensorMsg -I. ./sensormsg.h SensorMsg > SensorMsg.java --- NEW FILE: sensormsg.h --- /* -*- Mode: C; c-basic-indent: 3; indent-tabs-mode: nil -*- */ /* tab:4 * Copyright (c) 2000-2002 The Regents of the University of California. * All rights reserved. * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose, without fee, and without written agreement is * hereby granted, provided that the above copyright notice, the following * two paragraphs and the author appear in all copies of this software. * * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS." * */ /* * This file is part of the FireBug project. * * FireBug is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by the * Free Software Foundation; either version 2, or (at your option) any * later version. * * FireBug 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 Lesser General Public License * for more details. * You should have received a copy of the GNU Lesser General Public License * along with Geotechnica; see the file COPYING. If not, write to the Free * Software Foundation, 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ /* * The definition of gps messages needs to be moved out * of the "private" module files into "public" header * files so that third party applications (such as mig) * will be able to generate parsing code from the * definition of the messages. */ /* * @todo Break up the typedef, mig won't support it. * Necessary typedefs can be used internally to the * nesc source files. */ struct SensorMsg { uint16_t addr; uint16_t cnt; float temp; float rel_hum; float baro_pres; }; enum { AM_SENSORMSG = 128 }; |