API Documentation
Loading...
Searching...
No Matches
BluetoothConnection.h
Go to the documentation of this file.
1#pragma once
2#include <NDEVR/Connection.h>
3class QBluetoothSocket;
4namespace NDEVR
5{
7 {
8 public:
11 virtual uint04 peek(char*, uint04 size = Constant<uint04>::Max) const override;
12 virtual uint04 rx(char* s, uint04 size = Constant<uint04>::Max) override;
13 virtual void tx(const String& command) override;
14 virtual bool open(const ConnectionInfo& request) override;
15 virtual bool openInMainThread(const ConnectionInfo& request);
16 virtual void close() override;
17 virtual bool isOpen() const override;
18 virtual uint04 bytesAvailable() const override;
19 virtual TranslatedString lastError() const override;
20 virtual bool setBluetoothPort(QBluetoothSocket* bluetooth_port, const ConnectionInfo& info);
21 virtual bool waitForReadyRead(const TimeSpan& span) override;
22 void handleBluetoothError(int error);
23 protected:
24 QBluetoothSocket* m_socket = nullptr;
26 };
28 {
29 public:
30 virtual bool handlesType(const String& request) const override;
31 virtual ConnectionBackend* createConnection(const ConnectionInfo& request) override;
34 };
35}
Definition BluetoothConnection.h:28
virtual Buffer< ConnectionInfo > availableConnections(const ConnectionSearchParamaters &params) override
Definition BluetoothConnection.cpp:306
virtual bool handlesType(const String &request) const override
Definition BluetoothConnection.cpp:296
virtual ConnectionBackend * createConnection(const ConnectionInfo &request) override
Definition BluetoothConnection.cpp:302
virtual Buffer< ConnectionCategory > availableConnectionCatagories() override
Definition BluetoothConnection.cpp:317
Definition BluetoothConnection.h:7
virtual bool openInMainThread(const ConnectionInfo &request)
Definition BluetoothConnection.cpp:47
virtual bool isOpen() const override
Definition BluetoothConnection.cpp:192
TranslatedString m_last_error
Definition BluetoothConnection.h:25
~BluetoothConnection()
Definition BluetoothConnection.cpp:27
virtual uint04 peek(char *, uint04 size=Constant< uint04 >::Max) const override
Definition BluetoothConnection.cpp:31
virtual bool setBluetoothPort(QBluetoothSocket *bluetooth_port, const ConnectionInfo &info)
Definition BluetoothConnection.cpp:209
virtual bool open(const ConnectionInfo &request) override
Definition BluetoothConnection.cpp:151
virtual bool waitForReadyRead(const TimeSpan &span) override
Definition BluetoothConnection.cpp:268
void handleBluetoothError(int error)
Definition BluetoothConnection.cpp:272
virtual void close() override
Definition BluetoothConnection.cpp:172
virtual void tx(const String &command) override
Definition BluetoothConnection.cpp:43
virtual uint04 bytesAvailable() const override
Definition BluetoothConnection.cpp:198
BluetoothConnection(ProgressInfo *log)
Definition BluetoothConnection.cpp:23
virtual uint04 rx(char *s, uint04 size=Constant< uint04 >::Max) override
Definition BluetoothConnection.cpp:37
QBluetoothSocket * m_socket
Definition BluetoothConnection.h:24
virtual TranslatedString lastError() const override
Definition BluetoothConnection.cpp:204
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:64
Definition Connection.h:134
Definition Connection.h:155
Definition ProgressInfo.hpp:43
Definition String.h:40
Definition TimeSpan.h:40
Definition TranslatedString.h:9
Definition ACIColor.h:37
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:120
Definition Connection.h:87
Definition Connection.h:120
Definition BaseValues.hpp:272