ot::GPSDriver Class Reference
[Device Input Classes]

#include <GPSDriver.h>

Collaboration diagram for ot::GPSDriver:

Collaboration graph
[legend]
List of all members.

Detailed Description

The GPSDriver class encapsulates the whole GPS and ACE framework code for reading data from the GPS receiver and also supplying it with correction data from a DGPSIP host. It contains GPS parsing functionality via the GPSParser class. The data provided to listeners is the original GPS data without any transformations such as feet to meters etc. All such operations are left to the client code.

See also:
GPSParser on how to extend the parsing functions.
Author:
Gerhard Reitmayr


Public Member Functions

 GPSDriver (ACE_Reactor *reactor_=NULL)
virtual ~GPSDriver ()
int open (const std::string &device, int baud, const std::string &serveraddr="", int serverport=2101, int dgpsmirror=-1, const std::string &rtcmdevice="")
void close ()
void setDebug (bool debug)
bool getDebug ()
ACE_Reactor * getReactor ()
void addListener (GPSListener *listener, void *userData=NULL)
void removeListener (GPSListener *listener, void *userData=NULL)
void addClient (DGPSMirror_Handler *client)
void removeClient (DGPSMirror_Handler *client)
bool hasFix (void)
double getHdop (void)
double getNumSat (void)

Protected Member Functions

void send_rtcm (const char *buffer, const int len)
void new_line (const char *line)

Protected Attributes

ACE_Reactor * reactor
GPS_Handlerreceiver
DGPSIP_Handlerserver
DGPSMirror_Acceptoracceptor
ACE_TTY_IO * rtcmdev
bool debugOn
bool fix
double hdop
int numsat
std::map< GPSListener *, void * > listeners
std::vector< DGPSMirror_Handler * > clients

Friends

class GPS_Handler
class DGPSIP_Handler


Constructor & Destructor Documentation

ot::GPSDriver::GPSDriver ACE_Reactor *  reactor_ = NULL  ) 
 

ot::GPSDriver::~GPSDriver  )  [virtual]
 


Member Function Documentation

void ot::GPSDriver::addClient DGPSMirror_Handler client  ) 
 

void ot::GPSDriver::addListener GPSListener listener,
void *  userData = NULL
 

void ot::GPSDriver::close  ) 
 

bool ot::GPSDriver::getDebug  )  [inline]
 

double ot::GPSDriver::getHdop void   )  [inline]
 

double ot::GPSDriver::getNumSat void   )  [inline]
 

ACE_Reactor* ot::GPSDriver::getReactor  )  [inline]
 

bool ot::GPSDriver::hasFix void   )  [inline]
 

void ot::GPSDriver::new_line const char *  line  )  [protected]
 

int ot::GPSDriver::open const std::string &  device,
int  baud,
const std::string &  serveraddr = "",
int  serverport = 2101,
int  dgpsmirror = -1,
const std::string &  rtcmdevice = ""
 

void ot::GPSDriver::removeClient DGPSMirror_Handler client  ) 
 

void ot::GPSDriver::removeListener GPSListener listener,
void *  userData = NULL
 

void ot::GPSDriver::send_rtcm const char *  buffer,
const int  len
[protected]
 

void ot::GPSDriver::setDebug bool  debug  ) 
 


Friends And Related Function Documentation

friend class DGPSIP_Handler [friend]
 

friend class GPS_Handler [friend]
 


Member Data Documentation

DGPSMirror_Acceptor* ot::GPSDriver::acceptor [protected]
 

std::vector<DGPSMirror_Handler *> ot::GPSDriver::clients [protected]
 

bool ot::GPSDriver::debugOn [protected]
 

bool ot::GPSDriver::fix [protected]
 

double ot::GPSDriver::hdop [protected]
 

std::map<GPSListener *, void *> ot::GPSDriver::listeners [protected]
 

int ot::GPSDriver::numsat [protected]
 

ACE_Reactor* ot::GPSDriver::reactor [protected]
 

GPS_Handler* ot::GPSDriver::receiver [protected]
 

ACE_TTY_IO* ot::GPSDriver::rtcmdev [protected]
 

DGPSIP_Handler* ot::GPSDriver::server [protected]
 


The documentation for this class was generated from the following files:
Generated on Wed Feb 28 15:31:47 2007 for NaviTrack by  doxygen 1.4.6