QgsGpsConnection class
Abstract base class for connection to a GPS device.
Contents
Derived classes
- class QgsNmeaConnection
- Evaluates NMEA sentences coming from a GPS device.
- class QgsQtLocationConnection
Constructors, destructors, conversion operators
- QgsGpsConnection(QIODevice* dev)
- Constructor.
Public functions
- auto close() -> bool
- Closes connection to device.
- auto connect() -> bool
- Opens connection to device.
- auto currentGPSInformation() const -> QgsGpsInformation
- Returns the current gps information (lat, lon, etc.)
- void setSource(QIODevice* source)
- Sets the GPS source. The class takes ownership of the device class.
- auto status() const -> Status
- Returns the status. Possible state are not connected, connected, data received.
Protected slots
- void parseData() pure virtual
- Parse available data source content.
Protected variables
- QgsGpsInformation mLastGPSInformation
- Last state of the gps related variables (e.g. position, time, ...)
- QIODevice* mSource
- Data source (e.g. serial device, socket, file,...)
- Status mStatus
- Connection status.
Function documentation
QgsGpsConnection:: QgsGpsConnection(QIODevice* dev)
Constructor.
| Parameters | |
|---|---|
| dev | input device for the connection (e.g. serial device). The class takes ownership of the object |