QGIS API Documentation  3.1.0-Master (cd495fb)
Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | List of all members
QgsNmeaConnection Class Reference

Evaluates NMEA sentences coming from a GPS device. More...

#include <qgsnmeaconnection.h>

Inheritance diagram for QgsNmeaConnection:
Inheritance graph
[legend]

Public Member Functions

 QgsNmeaConnection (QIODevice *device)
 Constructs a QgsNmeaConnection with given device. More...
 
- Public Member Functions inherited from QgsGpsConnection
 QgsGpsConnection (QIODevice *dev)
 Constructor. More...
 
 ~QgsGpsConnection () override
 
bool close ()
 Closes connection to device. More...
 
bool connect ()
 Opens connection to device. More...
 
QgsGpsInformation currentGPSInformation () const
 Returns the current gps information (lat, lon, etc.) More...
 
void setSource (QIODevice *source)
 Sets the GPS source. The class takes ownership of the device class. More...
 
Status status () const
 Returns the status. Possible state are not connected, connected, data received. More...
 

Protected Slots

void parseData () override
 Parse available data source content. More...
 
- Protected Slots inherited from QgsGpsConnection
virtual void parseData ()=0
 Parse available data source content. More...
 

Protected Member Functions

void processGgaSentence (const char *data, int len)
 process GGA sentence More...
 
void processGsaSentence (const char *data, int len)
 process GSA sentence More...
 
void processGsvSentence (const char *data, int len)
 process GSV sentence More...
 
void processRmcSentence (const char *data, int len)
 process RMC sentence More...
 
void processStringBuffer ()
 Splits mStringBuffer into sentences and calls libnmea. More...
 
void processVtgSentence (const char *data, int len)
 process VTG sentence More...
 

Protected Attributes

QString mStringBuffer
 Store data from the device before it is processed. More...
 
- Protected Attributes inherited from QgsGpsConnection
QgsGpsInformation mLastGPSInformation
 Last state of the gps related variables (e.g. position, time, ...) More...
 
QIODevice * mSource = nullptr
 Data source (e.g. serial device, socket, file,...) More...
 
Status mStatus
 Connection status. More...
 

Additional Inherited Members

- Public Types inherited from QgsGpsConnection
enum  Status { NotConnected, Connected, DataReceived, GPSDataReceived }
 
- Signals inherited from QgsGpsConnection
void nmeaSentenceReceived (const QString &substring)
 
void stateChanged (const QgsGpsInformation &info)
 

Detailed Description

Evaluates NMEA sentences coming from a GPS device.

Since
QGIS 1.4

Definition at line 29 of file qgsnmeaconnection.h.

Constructor & Destructor Documentation

◆ QgsNmeaConnection()

QgsNmeaConnection::QgsNmeaConnection ( QIODevice *  device)

Constructs a QgsNmeaConnection with given device.

Definition at line 34 of file qgsnmeaconnection.cpp.

Member Function Documentation

◆ parseData

void QgsNmeaConnection::parseData ( )
overrideprotectedslot

Parse available data source content.

Definition at line 39 of file qgsnmeaconnection.cpp.

◆ processGgaSentence()

void QgsNmeaConnection::processGgaSentence ( const char *  data,
int  len 
)
protected

process GGA sentence

Definition at line 137 of file qgsnmeaconnection.cpp.

◆ processGsaSentence()

void QgsNmeaConnection::processGsaSentence ( const char *  data,
int  len 
)
protected

process GSA sentence

Definition at line 237 of file qgsnmeaconnection.cpp.

◆ processGsvSentence()

void QgsNmeaConnection::processGsvSentence ( const char *  data,
int  len 
)
protected

process GSV sentence

Definition at line 199 of file qgsnmeaconnection.cpp.

◆ processRmcSentence()

void QgsNmeaConnection::processRmcSentence ( const char *  data,
int  len 
)
protected

process RMC sentence

Definition at line 162 of file qgsnmeaconnection.cpp.

◆ processStringBuffer()

void QgsNmeaConnection::processStringBuffer ( )
protected

Splits mStringBuffer into sentences and calls libnmea.

Definition at line 73 of file qgsnmeaconnection.cpp.

◆ processVtgSentence()

void QgsNmeaConnection::processVtgSentence ( const char *  data,
int  len 
)
protected

process VTG sentence

Definition at line 228 of file qgsnmeaconnection.cpp.

Member Data Documentation

◆ mStringBuffer

QString QgsNmeaConnection::mStringBuffer
protected

Store data from the device before it is processed.

Definition at line 45 of file qgsnmeaconnection.h.


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