API Documentation
Loading...
Searching...
No Matches
BluetoothConnection Class Reference

A ConnectionBackend that provides logic for interfacing with a QBluetooth connection. More...

#include <BluetoothConnection.h>

Inheritance diagram for BluetoothConnection:
[legend]
Collaboration diagram for BluetoothConnection:
[legend]

Public Member Functions

 BluetoothConnection (ProgressInfo *log)
 
virtual uint04 bytesAvailable () const override
 
virtual void close () override
 
void handleBluetoothError (int error)
 
virtual bool isOpen () const override
 
virtual TranslatedString lastError () const override
 
virtual bool open (const ConnectionInfo &request) override
 
virtual bool openInMainThread (const ConnectionInfo &request)
 
virtual uint04 peek (char *, uint04 size=Constant< uint04 >::Max) const override
 
virtual uint04 rx (char *s, uint04 size=Constant< uint04 >::Max) override
 
virtual bool setBluetoothPort (QBluetoothSocket *bluetooth_port, const ConnectionInfo &info)
 
virtual void tx (const String &command) override
 
virtual bool waitForReadyRead (const TimeSpan &span) override
 
 ~BluetoothConnection ()
 
- Public Member Functions inherited from ConnectionBackend
 ConnectionBackend (ProgressInfo *log)
 
virtual String threadID () const
 

Protected Attributes

TranslatedString m_last_error
 
QBluetoothSocket * m_socket = nullptr
 
- Protected Attributes inherited from ConnectionBackend
ProgressInfom_log
 

Additional Inherited Members

- Signals inherited from ConnectionBackend
void connectionStateChangedSignal (ConnectionState state)
 
void dataAvailableSignal ()
 

Detailed Description

A ConnectionBackend that provides logic for interfacing with a QBluetooth connection.


Constructor & Destructor Documentation

◆ BluetoothConnection()

◆ ~BluetoothConnection()

Member Function Documentation

◆ bytesAvailable()

virtual uint04 bytesAvailable ( ) const
overridevirtual

Implements ConnectionBackend.

◆ close()

virtual void close ( )
overridevirtual

Implements ConnectionBackend.

◆ handleBluetoothError()

void handleBluetoothError ( int error)

◆ isOpen()

virtual bool isOpen ( ) const
overridevirtual

Implements ConnectionBackend.

◆ lastError()

virtual TranslatedString lastError ( ) const
overridevirtual

Implements ConnectionBackend.

◆ open()

virtual bool open ( const ConnectionInfo & request)
overridevirtual

Implements ConnectionBackend.

◆ openInMainThread()

virtual bool openInMainThread ( const ConnectionInfo & request)
virtual

◆ peek()

virtual uint04 peek ( char * ,
uint04 size = Constantuint04 >::Max ) const
overridevirtual

Implements ConnectionBackend.

◆ rx()

virtual uint04 rx ( char * s,
uint04 size = Constantuint04 >::Max )
overridevirtual

Implements ConnectionBackend.

◆ setBluetoothPort()

virtual bool setBluetoothPort ( QBluetoothSocket * bluetooth_port,
const ConnectionInfo & info )
virtual

◆ tx()

virtual void tx ( const String & command)
overridevirtual

Implements ConnectionBackend.

◆ waitForReadyRead()

virtual bool waitForReadyRead ( const TimeSpan & span)
overridevirtual

Implements ConnectionBackend.

Member Data Documentation

◆ m_last_error

TranslatedString m_last_error
protected

◆ m_socket

QBluetoothSocket* m_socket = nullptr
protected

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