nidas v1.2.3
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.
 
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::ublox ( )

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

◆ ~ublox()

ublox::~ublox ( )

References _fd.

Member Function Documentation

◆ config_nmea() [1/2]

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

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

◆ config_nmea() [2/2]

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

References USECS_PER_SEC.

Referenced by run().

◆ config_nmea_all_targets()

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

References USECS_PER_SEC.

◆ config_port()

void ublox::config_port ( )
throw (n_u::IOException )

◆ config_ubx()

void ublox::config_ubx ( )
throw (n_u::IOException )

References nmea_cksum(), and write_rdwr().

◆ nmea_cksum()

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

Referenced by config_ubx().

◆ parseRunstring()

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

◆ read_byte()

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

References _fd, and _name.

Referenced by read_smbus().

◆ read_byte_data()

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

Referenced by read_smbus().

◆ read_rdwr()

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

References buffer, len, and len_swab().

Referenced by run().

◆ read_rdwr_simple()

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

References buffer.

◆ read_rdwr_simple2()

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

References buffer.

◆ read_smbus()

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

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

Referenced by config_port(), and run().

◆ reset()

void ublox::reset ( )
throw (n_u::IOException )

References HOTSTART, and write_smbus().

◆ run()

int ublox::run ( )
throw ( )

◆ set_rate()

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

References rate.

Referenced by run().

◆ usage()

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

Referenced by parseRunstring().

◆ write_byte()

void ublox::write_byte ( unsigned char b)
throw (n_u::IOException )

◆ write_byte_data()

void ublox::write_byte_data ( unsigned char b,
unsigned char reg )
throw (n_u::IOException )

◆ write_rdwr() [1/2]

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

◆ write_rdwr() [2/2]

void ublox::write_rdwr ( const ublox_pkt & pkt)
throw (n_u::IOException )

Referenced by config_ubx().

◆ write_smbus() [1/2]

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

◆ write_smbus() [2/2]

void ublox::write_smbus ( const ublox_pkt & pkt)
throw (n_u::IOException )

Referenced by config_port(), and reset().

Member Data Documentation

◆ _addr

unsigned short ublox::_addr
private

Referenced by parseRunstring(), and run().

◆ _disable_msgs

vector<string> ublox::_disable_msgs
private

Referenced by parseRunstring(), and run().

◆ _enable_msgs

vector<string> ublox::_enable_msgs
private

Referenced by parseRunstring(), and run().

◆ _fd

int ublox::_fd
private

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

◆ _name

string ublox::_name
private

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

◆ _nmea_map

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

Referenced by ublox().

◆ _readback

bool ublox::_readback
private

Referenced by parseRunstring(), and run().

◆ progname

string ublox::progname
private

Referenced by parseRunstring().


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