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

ArGPSConnector Class Reference

#include <ArGPSConnector.h>

List of all members.


Detailed Description

Factory for creating ArGPS objects based on command-line parameters.

Use createGPS() to create a GPS object.

Note:
The device connection object created by ArGPSConnector is destroyed when ArGPSConnector is destroyed. Therefore, you must not destroy an ArGPSConnector while its associated ArGPS is in use.
The following command line parameters are used:
gpsPort
Create a serial device connection to use, using the given port. Default is COM2 (/dev/ttyS1 on Linux)
gpsBaud
Set the serial device connection to the given baud rate. Default is 9600.
gpsType
Set the GPS device type (determine initialization commands sent). Valid values are "standard" or "novatelg2".

Todo:
Don't delete the device connection, let ArGPS do that? Set a flag to tell ArGPS to do it?
Examples:

gpsExample.cpp.

Definition at line 69 of file ArGPSConnector.h.

Public Member Functions

 ArGPSConnector (ArArgumentParser *argParser)
bool connectGPS (ArGPS *gps)
ArGPScreateGPS ()
void logArgs ()
bool parseArgs ()

Protected Types

enum  GPSType { Standard, Novatel }
 Device type identifiers. More...

Protected Attributes

ArArgumentParsermyArgParser
int myBaud
ArDeviceConnectionmyDeviceCon
GPSType myDeviceType
ArFunctorC< ArGPSConnectormyLogArgsCallback
ArRetFunctorC< bool, ArGPSConnectormyParseArgsCallback
const char * myPort
const char * myTCPHost
int myTCPPort


Member Enumeration Documentation

enum ArGPSConnector::GPSType [protected]
 

Device type identifiers.

Enumeration values:
Standard  For a standard NMEA GPS device accessible using ArGPS.
Novatel  For a Novatel device accessible using ArNovatelGPS.

Definition at line 97 of file ArGPSConnector.h.


Member Function Documentation

bool ArGPSConnector::connectGPS ArGPS gps  ) 
 

Keep trying to connect to the GPS, possibly adjusting connection parameters.

Definition at line 152 of file ArGPSConnector.cpp.

ArGPS * ArGPSConnector::createGPS  ) 
 

Create a new GPS object (may be an ArGPS subclass based on device type) and a device connection for that GPS. See ArGPS for instructions on using it.

Returns:
NULL if there was an error creating a GPS object or an error creating and opening its device connection. Otherwise, return the new GPS object.

Definition at line 107 of file ArGPSConnector.cpp.

void ArGPSConnector::logArgs  ) 
 

Log argument option information

Definition at line 95 of file ArGPSConnector.cpp.

bool ArGPSConnector::parseArgs  ) 
 

Gets command line arguments

Definition at line 68 of file ArGPSConnector.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Feb 20 10:51:43 2007 for Aria by  doxygen 1.4.0