Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages | Examples

Sensors/AccelerationClient.h

Go to the documentation of this file.
00001 //////////////////////////////////////////////////////////////////////////////////////////////////
00002 /*! \file: AccelerationClient.h
00003 *  \brief: Send acceleration control vector to GPS propagator.
00004 *  \author $Author: jayhawk_hokie $
00005 *  \version $Revision: 1.1 $
00006 *  \date    $Date: 2007/08/31 16:10:54 $
00007 *//////////////////////////////////////////////////////////////////////////////////////////////////
00008 /*!
00009 */
00010 //////////////////////////////////////////////////////////////////////////////////////////////////
00011 
00012 
00013 #ifndef __ACCELERATION_CLIENT_H__
00014 #define __ACCELERATION_CLIENT_H__
00015 
00016 #include <string>
00017 #include <iostream>
00018 
00019 #include <math.h>
00020 #include <sstream>
00021 
00022 #include "Comm/ClientSocket.h"
00023 #include "Comm/SocketException.h"
00024 
00025 #include "Matrix.h"
00026 
00027 #include "utils/Time.h"
00028 
00029 using namespace std;
00030 
00031         /* Command */
00032         enum { $PASHR };
00033 
00034         /* Function */
00035         enum { VEL, ACK, NACK };
00036 
00037 
00038 class AccelerationMessage
00039 {
00040 public:
00041 
00042         AccelerationMessage( );
00043 
00044         AccelerationMessage( const char* serverName, int portNumber );
00045 
00046         ~AccelerationMessage( );
00047 
00048         int Connect( const char * serverName, int portNumber );
00049 
00050         int SendMessage( );
00051 
00052         int ReceiveMessage( );
00053 
00054         void CheckResponse( );
00055 
00056         int ConvertString( string data );
00057 
00058         /* Active Functions */  
00059         
00060         void SendAccelerationMessage( int _spaceVehicleNumber, double _startTime, double _duration, CAMdoubleVector _acceleration, double _mass );
00061         
00062         double GetDeltaV( );
00063         
00064         void ResetValues( );
00065 
00066 
00067 protected:
00068 
00069 
00070 private:
00071 
00072         /* The connection to SimPropagator */
00073         ClientSocket    *m_clientSocket;
00074         /* message to be sent */
00075         string m_message;
00076         /* message received */
00077         string m_response;
00078         /* deltaV (m/s)*/
00079         double m_deltaV;
00080 
00081 };
00082 
00083 #endif
00084 
00085 // Do not change the comments below - they will be added automatically by CVS
00086 /*****************************************************************************
00087 *       $Log: AccelerationClient.h,v $
00088 *       Revision 1.1  2007/08/31 16:10:54  jayhawk_hokie
00089 *       Initial Submission.
00090 *
00091 *
00092 *
00093 ******************************************************************************/
00094 

Generated on Wed Sep 5 12:54:17 2007 for DSACSS Operational Code by  doxygen 1.3.9.1