Main Page | Data Structures | File List | Data Fields | Globals

frame_comm.h

Go to the documentation of this file.
00001 /* frame_comm.h --- 
00002  * 
00003  * Filename: frame_comm.h
00004  * Description: 
00005  * Author: Bryce Himebaugh
00006  * Maintainer: 
00007  * Created: Tue Oct 31 10:47:20 2006
00008  * Version: 
00009  * Last-Updated: 
00010  *           By: 
00011  *     Update #: 0
00012  * Keywords: 
00013  * Compatibility: 
00014  * 
00015  */
00016 
00017 /* Commentary: 
00018  * 
00019  * 
00020  * 
00021  */
00022 
00023 /* Change log:
00024  * 
00025  * 
00026  */
00027 
00028 /* This program is free software; you can redistribute it and/or modify
00029  * it under the terms of the GNU General Public License as published by
00030  * the Free Software Foundation; either version 2, or (at your option)
00031  * any later version.
00032  * 
00033  * This program is distributed in the hope that it will be useful,
00034  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00035  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00036  * GNU General Public License for more details.
00037  * 
00038  * You should have received a copy of the GNU General Public License
00039  * along with this program; see the file COPYING.  If not, write to the
00040  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00041  * Boston, MA 02111-1307, USA.
00042  */
00043 
00044 /* Code: */
00045 
00046 #define MAX_MSG_LENGTH  500
00047 
00048 typedef struct ControlFrame {
00049   long msgCount;        // count of messages sent by the cart
00050   long timeStamp;       // cart-maintained clock (ms since start-up)
00051 
00052   float cmdAngle;       // desired wheel (degrees from center)
00053   float curAngle;       // current wheel angle
00054   char angleLimitErr[10];
00055   
00056   float cmdSpeed;       // desired speed (m/s)
00057   float curSpeed;       // current speed
00058   float pcntThrottle;   // % of full throttle
00059   char speedLimitErr[10];
00060   
00061   float GPSLat;         // GPS latitude (degrees)
00062   float GPSLon;         // GPS longitude (degrees)
00063   float GPSVelEast;     // eastward velocity (m/s)
00064   float GPSVelNorth;    // northward velocity (m/s)
00065   float GPSEpe;         // GPS estimated position error (m)
00066   char GPSStatus[10];   // availability/error status reported by the GPS
00067   
00068   char connStatus[10];  // status of the cart/driver connection
00069   char cmdSystemMode[10];       // desired cart mode
00070   char systemMode[10];  // cart's driving mode
00071   
00072   int  errorCode;                       // number of the current error
00073 } ControlFrame_t ;
00074 
00075 
00076 void writeMessage(ControlFrame_t *,char *);
00077 int strChecksum(char *, int, int);
00078 int readMessage(ControlFrame_t *,  char *);
00079 void initControlFrame(ControlFrame_t *);
00080 
00081 extern ControlFrame_t msg;
00082 
00083 
00084 /* frame_comm.h ends here */

Generated on Fri Nov 3 15:24:51 2006 for ERT1 Communication Server by  doxygen 1.3.9.1