ot::GPSDriver Class Reference
[Device Input Classes]
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.
More...
#include <GPSDriver.h>
Collaboration diagram for ot::GPSDriver:

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_Handler * | receiver |
| DGPSIP_Handler * | server |
| DGPSMirror_Acceptor * | acceptor |
| 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 |
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
Definition at line 101 of file GPSDriver.h.
Constructor & Destructor Documentation
| ot::GPSDriver::GPSDriver | ( | ACE_Reactor * | reactor_ = NULL |
) |
| ot::GPSDriver::~GPSDriver | ( | ) | [virtual] |
Member Function Documentation
| void ot::GPSDriver::addClient | ( | DGPSMirror_Handler * | client | ) |
Definition at line 234 of file GPSDriver.cxx.
References clients.
Referenced by ot::DGPSMirror_Handler::open().
| void ot::GPSDriver::addListener | ( | GPSListener * | listener, | |
| void * | userData = NULL | |||
| ) |
Definition at line 222 of file GPSDriver.cxx.
References listeners.
Referenced by ot::DGPSIP_Handler::open(), and ot::GPSModule::run().
| void ot::GPSDriver::close | ( | ) |
Definition at line 198 of file GPSDriver.cxx.
References acceptor, receiver, rtcmdev, and server.
Referenced by ot::GPSModule::run(), and ~GPSDriver().
| bool ot::GPSDriver::getDebug | ( | ) | [inline] |
Definition at line 111 of file GPSDriver.h.
References debugOn.
Referenced by ot::DGPSMirror_Handler::handle_input(), and open().
| double ot::GPSDriver::getHdop | ( | void | ) | [inline] |
Definition at line 132 of file GPSDriver.h.
References hdop.
Referenced by ot::GPSGarminCompass::newData(), ot::GPSGarminAltitude::newData(), and ot::GPSDirectionSource::newData().
| double ot::GPSDriver::getNumSat | ( | void | ) | [inline] |
| ACE_Reactor* ot::GPSDriver::getReactor | ( | ) | [inline] |
Definition at line 116 of file GPSDriver.h.
References reactor.
Referenced by ot::GPSModule::close(), and ot::GPSModule::run().
| bool ot::GPSDriver::hasFix | ( | void | ) | [inline] |
Definition at line 127 of file GPSDriver.h.
References fix.
Referenced by ot::GPSGarminCompass::newData(), ot::GPSGarminAltitude::newData(), and ot::GPSDirectionSource::newData().
| void ot::GPSDriver::new_line | ( | const char * | line | ) | [protected] |
Definition at line 247 of file GPSDriver.cxx.
References fix, ot::GPResult::GPGGA, hdop, listeners, numsat, and ot::GPSParser::parse().
Referenced by ot::GPS_Handler::handle_signal().
| int ot::GPSDriver::open | ( | const std::string & | device, | |
| int | baud, | |||
| const std::string & | serveraddr = "", |
|||
| int | serverport = 2101, |
|||
| int | dgpsmirror = -1, |
|||
| const std::string & | rtcmdevice = "" | |||
| ) |
Definition at line 102 of file GPSDriver.cxx.
References acceptor, DGPSIP_Handler, getDebug(), GPS_Handler, LOG_ACE_ERROR(), LOG_ACE_INFO(), reactor, receiver, and server.
Referenced by ot::GPSModule::run().
| void ot::GPSDriver::removeClient | ( | DGPSMirror_Handler * | client | ) |
Definition at line 240 of file GPSDriver.cxx.
References clients.
Referenced by ot::DGPSMirror_Handler::~DGPSMirror_Handler().
| void ot::GPSDriver::removeListener | ( | GPSListener * | listener, | |
| void * | userData = NULL | |||
| ) |
Definition at line 227 of file GPSDriver.cxx.
References listeners.
Referenced by ot::DGPSIP_Handler::~DGPSIP_Handler().
| void ot::GPSDriver::send_rtcm | ( | const char * | buffer, | |
| const int | len | |||
| ) | [protected] |
Definition at line 262 of file GPSDriver.cxx.
References clients, receiver, and rtcmdev.
Referenced by ot::DGPSIP_Handler::handle_input().
| void ot::GPSDriver::setDebug | ( | bool | debug | ) |
Definition at line 286 of file GPSDriver.cxx.
References debugOn.
Referenced by ot::GPSModule::run().
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] |
Definition at line 160 of file GPSDriver.h.
Referenced by addClient(), removeClient(), send_rtcm(), and ~GPSDriver().
bool ot::GPSDriver::debugOn [protected] |
bool ot::GPSDriver::fix [protected] |
double ot::GPSDriver::hdop [protected] |
std::map<GPSListener *, void *> ot::GPSDriver::listeners [protected] |
Definition at line 158 of file GPSDriver.h.
Referenced by addListener(), new_line(), removeListener(), and ~GPSDriver().
int ot::GPSDriver::numsat [protected] |
ACE_Reactor* ot::GPSDriver::reactor [protected] |
GPS_Handler* ot::GPSDriver::receiver [protected] |
Definition at line 148 of file GPSDriver.h.
Referenced by close(), open(), send_rtcm(), and ~GPSDriver().
ACE_TTY_IO* ot::GPSDriver::rtcmdev [protected] |
DGPSIP_Handler* ot::GPSDriver::server [protected] |
The documentation for this class was generated from the following files: