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

#include <BluetoothConnection.h>

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

Public Member Functions

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

Protected Attributes

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

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ BluetoothConnection()

◆ ~BluetoothConnection()

Member Function Documentation

◆ bytesAvailable()

uint04 bytesAvailable ( ) const
overridevirtual

Implements ConnectionBackend.

◆ close()

void close ( )
overridevirtual

Implements ConnectionBackend.

◆ handleBluetoothError()

void handleBluetoothError ( int error)

◆ isOpen()

bool isOpen ( ) const
overridevirtual

Implements ConnectionBackend.

◆ lastError()

TranslatedString lastError ( ) const
overridevirtual

Implements ConnectionBackend.

◆ open()

bool open ( const ConnectionInfo & request)
overridevirtual

Implements ConnectionBackend.

◆ openInMainThread()

bool openInMainThread ( const ConnectionInfo & request)
virtual

◆ peek()

uint04 peek ( char * s,
uint04 size = Constant<uint04>::Max ) const
overridevirtual

Implements ConnectionBackend.

◆ rx()

uint04 rx ( char * s,
uint04 size = Constant<uint04>::Max )
overridevirtual

Implements ConnectionBackend.

◆ setBluetoothPort()

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

◆ tx()

void tx ( const String & command)
overridevirtual

Implements ConnectionBackend.

◆ waitForReadyRead()

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 files: