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

Public Member Functions

 ublox ()
 
 ~ublox ()
 
int parseRunstring (int argc, char **argv)
 
int run () throw ()
 
void write_smbus (const ublox_pkt &pkt) throw (n_u::IOException)
 
void write_smbus (const string &str) throw (n_u::IOException)
 
void write_rdwr (const ublox_pkt &pkt) throw (n_u::IOException)
 
void write_rdwr (const string &str) throw (n_u::IOException)
 
void read_rdwr_simple (string &str) throw (n_u::IOException)
 
void read_rdwr_simple2 (string &str) throw (n_u::IOException)
 
void read_rdwr (string &str) throw (n_u::IOException)
 
string read_smbus () throw (n_u::IOException)
 
int read_byte () throw (n_u::IOException)
 
int read_byte_data (unsigned char reg) throw (n_u::IOException)
 
void write_byte (unsigned char b) throw (n_u::IOException)
 
void write_byte_data (unsigned char b, unsigned char reg) throw (n_u::IOException)
 
void reset () throw (n_u::IOException)
 
void config_port () throw (n_u::IOException)
 
void set_rate (int rate) throw (n_u::IOException)
 
void config_ubx () throw (n_u::IOException)
 
void config_nmea (enum NMEA_ID id, bool enable) throw (n_u::IOException)
 
void config_nmea (const string &, bool enable) throw (n_u::IOException)
 Send a "$PUBX,40,..." proprietory message to enable/disable NMEA messages. More...
 
void config_nmea_all_targets (enum NMEA_ID id, bool enable) throw (n_u::IOException)
 

Static Public Member Functions

static int usage (const char *argv0)
 
static string nmea_cksum (const string &msg)
 

Private Attributes

string progname
 
string _name
 
unsigned short _addr
 
int _fd
 
map< string, enum NMEA_ID_nmea_map
 
vector< string > _enable_msgs
 
vector< string > _disable_msgs
 
bool _readback
 

Constructor & Destructor Documentation

ublox::ublox ( )

References _nmea_map, DTM, GBS, GGA, GLL, GPQ, GRS, GSA, GST, GSV, RMC, TXT, VTG, and ZDA.

ublox::~ublox ( )

References _fd.

Member Function Documentation

void ublox::config_nmea ( enum NMEA_ID  id,
bool  enable 
)
throw (n_u::IOException
)

References ublox_pkt::cksum(), ublox_pkt::payload(), and USECS_PER_SEC.

Referenced by run().

void ublox::config_nmea ( const string &  msg,
bool  enable 
)
throw (n_u::IOException
)

Send a "$PUBX,40,..." proprietory message to enable/disable NMEA messages.

void ublox::config_nmea_all_targets ( enum NMEA_ID  id,
bool  enable 
)
throw (n_u::IOException
)
void ublox::config_port ( )
throw (n_u::IOException
)
void ublox::config_ubx ( )
throw (n_u::IOException
)

References nmea_cksum(), and write_rdwr().

string ublox::nmea_cksum ( const string &  msg)
static

Referenced by config_ubx().

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

References _addr, _disable_msgs, _enable_msgs, _name, _readback, progname, and usage().

Referenced by main().

int ublox::read_byte ( )
throw (n_u::IOException
)

References _fd, and _name.

Referenced by read_smbus().

int ublox::read_byte_data ( unsigned char  reg)
throw (n_u::IOException
)

Referenced by read_smbus().

void ublox::read_rdwr ( string &  str)
throw (n_u::IOException
)

References buffer, len, and len_swab().

Referenced by run().

void ublox::read_rdwr_simple ( string &  str)
throw (n_u::IOException
)

References buffer.

void ublox::read_rdwr_simple2 ( string &  str)
throw (n_u::IOException
)

References buffer.

string ublox::read_smbus ( )
throw (n_u::IOException
)

References len, read_byte(), and read_byte_data().

Referenced by config_port(), and run().

void ublox::reset ( )
throw (n_u::IOException
)
int ublox::run ( )
throw (
)
void ublox::set_rate ( int  rate)
throw (n_u::IOException
)

References ublox_pkt::cksum(), ublox_pkt::payload(), and rate.

Referenced by run().

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

Referenced by parseRunstring().

void ublox::write_byte ( unsigned char  b)
throw (n_u::IOException
)
void ublox::write_byte_data ( unsigned char  b,
unsigned char  reg 
)
throw (n_u::IOException
)
void ublox::write_rdwr ( const ublox_pkt pkt)
throw (n_u::IOException
)
void ublox::write_rdwr ( const string &  str)
throw (n_u::IOException
)
void ublox::write_smbus ( const ublox_pkt pkt)
throw (n_u::IOException
)

Referenced by config_port(), and reset().

void ublox::write_smbus ( const string &  str)
throw (n_u::IOException
)

Member Data Documentation

unsigned short ublox::_addr
private

Referenced by parseRunstring(), and run().

vector<string> ublox::_disable_msgs
private

Referenced by parseRunstring(), and run().

vector<string> ublox::_enable_msgs
private

Referenced by parseRunstring(), and run().

int ublox::_fd
private

Referenced by read_byte(), run(), and ~ublox().

string ublox::_name
private

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

map<string,enum NMEA_ID> ublox::_nmea_map
private

Referenced by ublox().

bool ublox::_readback
private

Referenced by parseRunstring(), and run().

string ublox::progname
private

Referenced by parseRunstring().


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