QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
BluetoothClassicWorker Class Reference

#include <BluetoothClassicWorker.h>

Inheritance diagram for BluetoothClassicWorker:
Collaboration diagram for BluetoothClassicWorker:

Public Member Functions

 BluetoothClassicWorker (const BluetoothConfiguration *config, QObject *parent=nullptr)
 ~BluetoothClassicWorker () override
Public Member Functions inherited from BluetoothWorker
 BluetoothWorker (const BluetoothConfiguration *config, QObject *parent=nullptr)
 ~BluetoothWorker () override
bool isConnected () const

Protected Member Functions

void onSetupConnection () override
void onConnectLink () override
void onDisconnectLink () override
void onWriteData (const QByteArray &data) override
void onServiceDiscoveryTimeout () override
void onResetAfterConsecutiveFailures () override

Additional Inherited Members

Public Slots inherited from BluetoothWorker
void setupConnection ()
void connectLink ()
void disconnectLink ()
void writeData (const QByteArray &data)
Signals inherited from BluetoothWorker
void connected ()
void disconnected ()
void errorOccurred (const QString &errorString)
void dataReceived (const QByteArray &data)
void dataSent (const QByteArray &data)
void rssiUpdated (qint16 rssi)
Static Public Member Functions inherited from BluetoothWorker
static BluetoothWorker * create (const BluetoothConfiguration *config, QObject *parent=nullptr)
Protected Slots inherited from BluetoothWorker
void _reconnectTimeout ()
void _serviceDiscoveryTimeout ()
Protected Attributes inherited from BluetoothWorker
const QBluetoothDeviceInfo _device
const QBluetoothUuid _serviceUuid
const QBluetoothUuid _readCharacteristicUuid
const QBluetoothUuid _writeCharacteristicUuid
QPointer< QTimer > _reconnectTimer
QPointer< QTimer > _serviceDiscoveryTimer
std::atomic< bool > _intentionalDisconnect {false}
std::atomic< bool > _connected {false}
std::atomic< int > _reconnectAttempts {0}
int _consecutiveFailures = 0
Static Protected Attributes inherited from BluetoothWorker
static constexpr int MAX_RECONNECT_ATTEMPTS = 10
static constexpr int RECONNECT_BASE_INTERVAL_MS = 5000
static constexpr int MAX_RECONNECT_INTERVAL_MS = 60000
static constexpr int SERVICE_DISCOVERY_TIMEOUT_MS = 30000
static constexpr int MAX_CONSECUTIVE_FAILURES = 3

Detailed Description

Definition at line 9 of file BluetoothClassicWorker.h.

Constructor & Destructor Documentation

◆ BluetoothClassicWorker()

BluetoothClassicWorker::BluetoothClassicWorker ( const BluetoothConfiguration * config,
QObject * parent = nullptr )
explicit

◆ ~BluetoothClassicWorker()

BluetoothClassicWorker::~BluetoothClassicWorker ( )
override

Member Function Documentation

◆ onConnectLink()

void BluetoothClassicWorker::onConnectLink ( )
overrideprotectedvirtual

◆ onDisconnectLink()

void BluetoothClassicWorker::onDisconnectLink ( )
overrideprotectedvirtual

Implements BluetoothWorker.

Definition at line 38 of file BluetoothClassicWorker.cc.

◆ onResetAfterConsecutiveFailures()

void BluetoothClassicWorker::onResetAfterConsecutiveFailures ( )
overrideprotectedvirtual

Implements BluetoothWorker.

Definition at line 61 of file BluetoothClassicWorker.cc.

◆ onServiceDiscoveryTimeout()

void BluetoothClassicWorker::onServiceDiscoveryTimeout ( )
overrideprotectedvirtual

Implements BluetoothWorker.

Definition at line 54 of file BluetoothClassicWorker.cc.

◆ onSetupConnection()

void BluetoothClassicWorker::onSetupConnection ( )
overrideprotectedvirtual

Implements BluetoothWorker.

Definition at line 12 of file BluetoothClassicWorker.cc.

◆ onWriteData()

void BluetoothClassicWorker::onWriteData ( const QByteArray & data)
overrideprotectedvirtual

Implements BluetoothWorker.

Definition at line 49 of file BluetoothClassicWorker.cc.


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