nidas  v1.2-1520
Classes | Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes | List of all members
Garmin Class Reference

Classes

struct  baudRates
 

Public Member Functions

 Garmin ()
 
int parseRunstring (int argc, char **argv)
 
int run ()
 
string getStringField (const string &str, int nfield)
 
bool setBaudRateOption () throw (n_u::IOException)
 
int checkPPS (int *pulseWidth) throw (n_u::IOException)
 
bool enablePPS () throw (n_u::IOException)
 
bool disablePPS () throw (n_u::IOException)
 
bool enableMessage (const string &msg) throw (n_u::IOException)
 
bool disableMessage (const string &msg) throw (n_u::IOException)
 
bool disableAllMessages () throw (n_u::IOException)
 
bool enableAllMessages () throw (n_u::IOException)
 
bool checkMessage (const string &msg)
 
bool scanMessages (int seconds) throw (n_u::IOException)
 
bool readInit () throw (n_u::IOException)
 Read PGRMI message, containing board init information (position and time used from satellite acquisition). More...
 
bool sendInit (float lat, float lon) throw (n_u::IOException)
 Send PGRMI message, containing board init information (position and time used from satellite acquisition). More...
 
string readMessage () throw (n_u::IOException)
 

Static Public Member Functions

static int usage (const char *argv0)
 
static int getBaudRateIndex (int rate)
 
static int getBaudRate (int index)
 
static string substCRNL (const string &str)
 
static int getPulseWidth (int index)
 
static int getPulseWidthIndex (int width)
 

Private Attributes

string device
 
int baudRate
 
int newBaudRate
 
bool ppsEnable
 
bool ppsDisable
 
int pulseWidth
 
bool enableAllMsg
 
bool disableAllMsg
 
n_u::SerialPort gps
 
set< string > toDisable
 Messages to be disabled. More...
 
set< string > toEnable
 Messages to be enabled. More...
 
set< string > currentMessages
 
bool rescanMessages
 

Static Private Attributes

static struct Garmin::baudRates baudRateTable []
 

Constructor & Destructor Documentation

Garmin::Garmin ( )

Member Function Documentation

bool Garmin::checkMessage ( const string &  msg)

Referenced by parseRunstring().

int Garmin::checkPPS ( int *  pulseWidth)
throw (n_u::IOException
)

References nidas::util::Exception::what().

Referenced by disablePPS(), and enablePPS().

bool Garmin::disableAllMessages ( )
throw (n_u::IOException
)
bool Garmin::disableMessage ( const string &  msg)
throw (n_u::IOException
)

References USECS_PER_SEC, and nidas::util::Exception::what().

Referenced by run().

bool Garmin::disablePPS ( )
throw (n_u::IOException
)
bool Garmin::enableAllMessages ( )
throw (n_u::IOException
)
bool Garmin::enableMessage ( const string &  msg)
throw (n_u::IOException
)

References nidas::util::Exception::what().

Referenced by run().

bool Garmin::enablePPS ( )
throw (n_u::IOException
)
int Garmin::getBaudRate ( int  index)
static

Referenced by setBaudRateOption().

int Garmin::getBaudRateIndex ( int  rate)
static
int Garmin::getPulseWidth ( int  index)
static

Referenced by enablePPS().

int Garmin::getPulseWidthIndex ( int  width)
static

Referenced by parseRunstring().

string Garmin::getStringField ( const string &  str,
int  nfield 
)

Referenced by setBaudRateOption().

int Garmin::parseRunstring ( int  argc,
char **  argv 
)
bool Garmin::readInit ( )
throw (n_u::IOException
)

Read PGRMI message, containing board init information (position and time used from satellite acquisition).

References gps, readMessage(), substCRNL(), nidas::util::Exception::what(), and nidas::util::SerialPort::write().

string Garmin::readMessage ( )
throw (n_u::IOException
)
int Garmin::run ( )
bool Garmin::scanMessages ( int  seconds)
throw (n_u::IOException
)

References USECS_PER_SEC, and nidas::util::Exception::what().

Referenced by run().

bool Garmin::sendInit ( float  lat,
float  lon 
)
throw (n_u::IOException
)

Send PGRMI message, containing board init information (position and time used from satellite acquisition).

References nidas::util::UTime::format(), and nidas::util::Exception::what().

bool Garmin::setBaudRateOption ( )
throw (n_u::IOException
)
string Garmin::substCRNL ( const string &  str)
static
int Garmin::usage ( const char *  argv0)
static

Referenced by parseRunstring().

Member Data Documentation

int Garmin::baudRate
private

Referenced by parseRunstring(), and run().

Garmin::baudRates Garmin::baudRateTable
staticprivate
Initial value:
= {
{ 300, 6 },
{ 600, 7 },
{ 1200, 1 },
{ 2400, 2 },
{ 4800, 3 },
{ 9600, 4 },
{19200, 5 }
}
set<string> Garmin::currentMessages
private

Referenced by disableAllMessages().

string Garmin::device
private

Referenced by parseRunstring(), and run().

bool Garmin::disableAllMsg
private

Referenced by parseRunstring(), and run().

bool Garmin::enableAllMsg
private

Referenced by parseRunstring(), and run().

n_u::SerialPort Garmin::gps
private
int Garmin::newBaudRate
private
bool Garmin::ppsDisable
private

Referenced by parseRunstring(), and run().

bool Garmin::ppsEnable
private
int Garmin::pulseWidth
private

Referenced by enablePPS(), parseRunstring(), and run().

bool Garmin::rescanMessages
private
set<string> Garmin::toDisable
private

Messages to be disabled.

Referenced by parseRunstring(), and run().

set<string> Garmin::toEnable
private

Messages to be enabled.

Referenced by parseRunstring(), and run().


The documentation for this class was generated from the following file: