QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Evaluates NMEA sentences coming from a GPS device. More...
#include <qgsnmeaconnection.h>
Public Member Functions | |
QgsNmeaConnection (QIODevice *device) | |
Constructs a QgsNmeaConnection with given device. More... | |
![]() | |
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... | |
![]() | |
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 | processGstSentence (const char *data, int len) |
process GST sentence More... | |
void | processGsvSentence (const char *data, int len) |
process GSV sentence More... | |
void | processHchdgSentence (const char *data, int len) |
process HCHDG sentence More... | |
void | processHchdtSentence (const char *data, int len) |
process HCHDT sentence More... | |
void | processHdtSentence (const char *data, int len) |
process HDT 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... | |
![]() | |
QgsGpsInformation | mLastGPSInformation |
Last state of the gps related variables (e.g. position, time, ...) More... | |
std::unique_ptr< QIODevice > | mSource |
Data source (e.g. serial device, socket, file,...) More... | |
Status | mStatus = NotConnected |
Connection status. More... | |
Additional Inherited Members | |
![]() | |
enum | Status { NotConnected, Connected, DataReceived, GPSDataReceived } |
![]() | |
void | nmeaSentenceReceived (const QString &substring) |
void | stateChanged (const QgsGpsInformation &info) |
Evaluates NMEA sentences coming from a GPS device.
Definition at line 29 of file qgsnmeaconnection.h.
QgsNmeaConnection::QgsNmeaConnection | ( | QIODevice * | device | ) |
Constructs a QgsNmeaConnection with given device.
Ownership of device is transferred to the connection.
Definition at line 36 of file qgsnmeaconnection.cpp.
|
overrideprotectedslot |
Parse available data source content.
Definition at line 41 of file qgsnmeaconnection.cpp.
|
protected |
process GGA sentence
Definition at line 171 of file qgsnmeaconnection.cpp.
|
protected |
process GSA sentence
Definition at line 389 of file qgsnmeaconnection.cpp.
|
protected |
process GST sentence
Definition at line 207 of file qgsnmeaconnection.cpp.
|
protected |
process GSV sentence
Definition at line 351 of file qgsnmeaconnection.cpp.
|
protected |
process HCHDG sentence
Definition at line 235 of file qgsnmeaconnection.cpp.
|
protected |
process HCHDT sentence
Definition at line 248 of file qgsnmeaconnection.cpp.
|
protected |
process HDT sentence
Definition at line 226 of file qgsnmeaconnection.cpp.
|
protected |
process RMC sentence
Definition at line 257 of file qgsnmeaconnection.cpp.
|
protected |
Splits mStringBuffer into sentences and calls libnmea.
Definition at line 75 of file qgsnmeaconnection.cpp.
|
protected |
process VTG sentence
Definition at line 380 of file qgsnmeaconnection.cpp.
|
protected |
Store data from the device before it is processed.
Definition at line 60 of file qgsnmeaconnection.h.