7#include <NDEVR/Connection.h>
8#include "Base/Headers/TranslatedString.h"
30 WebSocketConnection(LogPtr log);
34 ~WebSocketConnection();
40 virtual uint04 peek(
char*, uint04 size)
const override;
46 virtual uint04 rx(
char*, uint04 size = Constant<uint04>::Max)
override;
51 virtual void tx(
const StringView& command)
override;
56 void txInThread(
const StringView& command);
62 virtual bool open(
const ConnectionInfo& request)
override;
66 virtual void close()
override;
71 virtual bool isOpen()
const override;
76 virtual uint04 bytesAvailable()
const override;
81 virtual TranslatedString lastError()
const override;
87 virtual bool setPort(QWebSocket* tcp_port);
93 virtual bool waitForReadyRead(
const TimeSpan& span)
override;
100 virtual bool waitForConnection(QWebSocket* socket,
const ConnectionInfo& request);
105 void setSocket(QWebSocket* socket);
111 void handleSocketErrorSlot(
int error);
117 void binaryMessageReceived(
const QByteArray& array);
123 void textMessageReceived(
const QString& message);
125 QWebSocket* m_socket =
nullptr;
126 TranslatedString m_last_error;
Defines cross-platform DLL export/import macros for the NDEVRWebSocket module.
The equivelent of std::vector but with a bit more control.
Provides the unseen backend logic for setting up, tearing down, and sending data over a specific type...
Stores factories that can be registered for creating Connections of various types by instantiating a ...
The core String View class for the NDEVR API.
A ConnectionBackend that allows the software to interface with QWebSocket for communicating with WebS...
virtual bool handlesType(const StringView &request) const override
Checks whether this factory handles the given connection type string.
virtual Buffer< ConnectionCategory > availableConnectionCategories() override
Returns the categories of connections this factory can provide.
virtual Buffer< ConnectionInfo > availableConnections(const ConnectionSearchParameters ¶ms) override
Discovers and returns available WebSocket connections matching the search parameters.
virtual ConnectionBackend * createConnection(const ConnectionInfo &request) override
Creates a new WebSocketConnection backend for the given connection info.
The primary namespace for the NDEVR SDK.
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
A structure designed to store information about a specific Connection.
Describes settings for performing a Connection search.