nidas v1.2.3
|
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 [] |
Garmin::Garmin | ( | ) |
bool Garmin::checkMessage | ( | const string & | msg | ) |
Referenced by parseRunstring().
int Garmin::checkPPS | ( | int * | pulseWidth | ) | ||
throw | ( | n_u::IOException ) |
Referenced by disablePPS(), and enablePPS().
bool Garmin::disableAllMessages | ( | ) | ||||
throw | ( | n_u::IOException ) |
References currentMessages, gps, readMessage(), rescanMessages, substCRNL(), and nidas::util::SerialPort::write().
Referenced by run().
bool Garmin::disableMessage | ( | const string & | msg | ) | ||
throw | ( | n_u::IOException ) |
References USECS_PER_SEC.
Referenced by run().
bool Garmin::disablePPS | ( | ) | ||||
throw | ( | n_u::IOException ) |
References checkPPS(), gps, readMessage(), substCRNL(), and nidas::util::SerialPort::write().
Referenced by run().
bool Garmin::enableAllMessages | ( | ) | ||||
throw | ( | n_u::IOException ) |
References gps, readMessage(), rescanMessages, substCRNL(), and nidas::util::SerialPort::write().
Referenced by run().
bool Garmin::enableMessage | ( | const string & | msg | ) | ||
throw | ( | n_u::IOException ) |
Referenced by run().
bool Garmin::enablePPS | ( | ) | ||||
throw | ( | n_u::IOException ) |
References checkPPS(), getPulseWidth(), gps, pulseWidth, readMessage(), substCRNL(), and nidas::util::SerialPort::write().
Referenced by run().
|
static |
References baudRateTable.
Referenced by setBaudRateOption().
|
static |
References baudRateTable, and rate.
Referenced by parseRunstring(), and setBaudRateOption().
|
static |
Referenced by enablePPS().
|
static |
Referenced by parseRunstring().
string Garmin::getStringField | ( | const string & | str, |
int | nfield ) |
Referenced by setBaudRateOption().
int Garmin::parseRunstring | ( | int | argc, |
char ** | argv ) |
References baudRate, checkMessage(), device, disableAllMsg, enableAllMsg, getBaudRateIndex(), getPulseWidthIndex(), newBaudRate, ppsDisable, pulseWidth, toDisable, toEnable, and usage().
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().
string Garmin::readMessage | ( | ) | ||||
throw | ( | n_u::IOException ) |
References nidas::util::SerialPort::getName(), gps, and nidas::util::SerialPort::readUntil().
Referenced by disableAllMessages(), disablePPS(), enableAllMessages(), enablePPS(), readInit(), and setBaudRateOption().
int Garmin::run | ( | ) |
References baudRate, nidas::util::SerialPort::close(), device, disableAllMessages(), disableAllMsg, disableMessage(), disablePPS(), enableAllMessages(), enableAllMsg, enableMessage(), enablePPS(), gps, newBaudRate, nidas::util::SerialPort::open(), ppsDisable, pulseWidth, scanMessages(), nidas::util::Termios::setBaudRate(), setBaudRateOption(), nidas::util::SerialPort::setName(), nidas::util::SerialPort::termios(), toDisable, and toEnable.
Referenced by main().
bool Garmin::scanMessages | ( | int | seconds | ) | ||
throw | ( | n_u::IOException ) |
References USECS_PER_SEC.
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).
bool Garmin::setBaudRateOption | ( | ) | ||||
throw | ( | n_u::IOException ) |
References getBaudRate(), getBaudRateIndex(), getStringField(), gps, newBaudRate, readMessage(), substCRNL(), and nidas::util::SerialPort::write().
Referenced by run().
|
static |
References nidas::util::addBackslashSequences().
Referenced by disableAllMessages(), disablePPS(), enableAllMessages(), enablePPS(), readInit(), and setBaudRateOption().
|
static |
Referenced by parseRunstring().
|
private |
Referenced by parseRunstring(), and run().
|
staticprivate |
Referenced by getBaudRate(), and getBaudRateIndex().
|
private |
Referenced by disableAllMessages().
|
private |
Referenced by parseRunstring(), and run().
|
private |
Referenced by parseRunstring(), and run().
|
private |
Referenced by parseRunstring(), and run().
|
private |
Referenced by disableAllMessages(), disablePPS(), enableAllMessages(), enablePPS(), readInit(), readMessage(), run(), and setBaudRateOption().
|
private |
Referenced by parseRunstring(), run(), and setBaudRateOption().
|
private |
Referenced by parseRunstring(), and run().
|
private |
|
private |
Referenced by enablePPS(), parseRunstring(), and run().
|
private |
Referenced by disableAllMessages(), and enableAllMessages().
|
private |
Messages to be disabled.
Referenced by parseRunstring(), and run().
|
private |
Messages to be enabled.
Referenced by parseRunstring(), and run().