Class: QgsGpsConnection

class qgis.core.QgsGpsConnection(dev: QIODevice)

Bases: PyQt5.QtCore.QObject

Constructor

Parameters

dev (QIODevice) – input device for the connection (e.g. serial device). The class takes ownership of the object

Abstract base class for connection to a GPS device*

Methods

childEvent

close

Closes connection to device

connect

Opens connection to device

connectNotify

currentGPSInformation

Returns the current gps information (lat, lon, etc.)

customEvent

disconnectNotify

isSignalConnected

parseData

Parse available data source content

receivers

sender

senderSignalIndex

setSource

Sets the GPS source.

status

Returns the status.

timerEvent

Signals

nmeaSentenceReceived

nmeaSentenceReceived(self, substring: str) [signal]

stateChanged

stateChanged(self, info: QgsGpsInformation) [signal]

Attributes

Connected

DataReceived

GPSDataReceived

NotConnected

Connected = 1
DataReceived = 2
GPSDataReceived = 3
NotConnected = 0
class Status

Bases: int

childEvent()
close(self) → bool

Closes connection to device

Return type

bool

connect(self) → bool

Opens connection to device

Return type

bool

connectNotify()
currentGPSInformation(self) → QgsGpsInformation

Returns the current gps information (lat, lon, etc.)

Return type

QgsGpsInformation

customEvent()
disconnectNotify()
isSignalConnected()
nmeaSentenceReceived

nmeaSentenceReceived(self, substring: str) [signal]

Parameters

substring (str) –

parseData(self)

Parse available data source content

receivers()
sender()
senderSignalIndex()
setSource(self, source: QIODevice)

Sets the GPS source. The class takes ownership of the device class

Parameters

source (QIODevice) –

stateChanged

stateChanged(self, info: QgsGpsInformation) [signal]

Parameters

info (QgsGpsInformation) –

status(self) → QgsGpsConnection.Status

Returns the status. Possible state are not connected, connected, data received

Return type

QgsGpsConnection.Status

timerEvent()