nidas v1.2.3
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).
 
bool sendInit (float lat, float lon) throw (n_u::IOException)
 Send PGRMI message, containing board init information (position and time used from satellite acquisition).
 
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.
 
set< string > toEnable
 Messages to be enabled.
 
set< string > currentMessages
 
bool rescanMessages
 

Static Private Attributes

static struct Garmin::baudRates baudRateTable []
 

Constructor & Destructor Documentation

◆ Garmin()

Garmin::Garmin ( )

Member Function Documentation

◆ checkMessage()

bool Garmin::checkMessage ( const string & msg)

Referenced by parseRunstring().

◆ checkPPS()

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

Referenced by disablePPS(), and enablePPS().

◆ disableAllMessages()

bool Garmin::disableAllMessages ( )
throw (n_u::IOException )

◆ disableMessage()

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

References USECS_PER_SEC.

Referenced by run().

◆ disablePPS()

bool Garmin::disablePPS ( )
throw (n_u::IOException )

◆ enableAllMessages()

bool Garmin::enableAllMessages ( )
throw (n_u::IOException )

◆ enableMessage()

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

Referenced by run().

◆ enablePPS()

bool Garmin::enablePPS ( )
throw (n_u::IOException )

◆ getBaudRate()

int Garmin::getBaudRate ( int index)
static

References baudRateTable.

Referenced by setBaudRateOption().

◆ getBaudRateIndex()

int Garmin::getBaudRateIndex ( int rate)
static

References baudRateTable, and rate.

Referenced by parseRunstring(), and setBaudRateOption().

◆ getPulseWidth()

int Garmin::getPulseWidth ( int index)
static

Referenced by enablePPS().

◆ getPulseWidthIndex()

int Garmin::getPulseWidthIndex ( int width)
static

Referenced by parseRunstring().

◆ getStringField()

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

Referenced by setBaudRateOption().

◆ parseRunstring()

int Garmin::parseRunstring ( int argc,
char ** argv )

◆ readInit()

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(), and nidas::util::SerialPort::write().

◆ readMessage()

string Garmin::readMessage ( )
throw (n_u::IOException )

◆ run()

int Garmin::run ( )

◆ scanMessages()

bool Garmin::scanMessages ( int seconds)
throw (n_u::IOException )

References USECS_PER_SEC.

Referenced by run().

◆ sendInit()

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).

◆ setBaudRateOption()

bool Garmin::setBaudRateOption ( )
throw (n_u::IOException )

◆ substCRNL()

string Garmin::substCRNL ( const string & str)
static

◆ usage()

int Garmin::usage ( const char * argv0)
static

Referenced by parseRunstring().

Member Data Documentation

◆ baudRate

int Garmin::baudRate
private

Referenced by parseRunstring(), and run().

◆ baudRateTable

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

Referenced by getBaudRate(), and getBaudRateIndex().

◆ currentMessages

set<string> Garmin::currentMessages
private

Referenced by disableAllMessages().

◆ device

string Garmin::device
private

Referenced by parseRunstring(), and run().

◆ disableAllMsg

bool Garmin::disableAllMsg
private

Referenced by parseRunstring(), and run().

◆ enableAllMsg

bool Garmin::enableAllMsg
private

Referenced by parseRunstring(), and run().

◆ gps

n_u::SerialPort Garmin::gps
private

◆ newBaudRate

int Garmin::newBaudRate
private

◆ ppsDisable

bool Garmin::ppsDisable
private

Referenced by parseRunstring(), and run().

◆ ppsEnable

bool Garmin::ppsEnable
private

◆ pulseWidth

int Garmin::pulseWidth
private

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

◆ rescanMessages

bool Garmin::rescanMessages
private

◆ toDisable

set<string> Garmin::toDisable
private

Messages to be disabled.

Referenced by parseRunstring(), and run().

◆ toEnable

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: