nidas
v1.2-1520
|
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 [] |
Garmin::Garmin | ( | ) |
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 | ||
) |
References currentMessages, gps, readMessage(), rescanMessages, substCRNL(), nidas::util::Exception::what(), and nidas::util::SerialPort::write().
Referenced by run().
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 | ||
) |
References checkPPS(), gps, readMessage(), substCRNL(), nidas::util::Exception::what(), and nidas::util::SerialPort::write().
Referenced by run().
bool Garmin::enableAllMessages | ( | ) | ||
throw | ( | n_u::IOException | ||
) |
References gps, readMessage(), rescanMessages, substCRNL(), nidas::util::Exception::what(), and nidas::util::SerialPort::write().
Referenced by run().
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 | ||
) |
References checkPPS(), getPulseWidth(), gps, pulseWidth, readMessage(), substCRNL(), nidas::util::Exception::what(), and nidas::util::SerialPort::write().
Referenced by run().
|
static |
Referenced by setBaudRateOption().
|
static |
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().
Referenced by main().
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 | ||
) |
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::Termios::setRaw(), nidas::util::Termios::setRawLength(), nidas::util::Termios::setRawTimeout(), nidas::util::SerialPort::termios(), toDisable, toEnable, and nidas::util::Exception::what().
Referenced by main().
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 | ||
) |
References getBaudRate(), getBaudRateIndex(), getStringField(), gps, newBaudRate, readMessage(), substCRNL(), nidas::util::Exception::what(), 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 |
|
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().