35#include <NDEVR/Connection.h>
36#include <NDEVR/SocketIOChannel.h>
37#include "Base/Headers/Buffer.hpp"
38#include "Base/Headers/Dictionary.h"
39#include "Base/Headers/Pointer.hpp"
56 SocketIODriver(InfoPipe* log =
nullptr);
61 SocketIODriver(DynamicPointer<SocketIOChannel> socket, InfoPipe* log =
nullptr);
62 ~SocketIODriver() =
default;
63 SocketIODriver(
const SocketIODriver& other) =
delete;
64 SocketIODriver(SocketIODriver&& other) =
delete;
65 SocketIODriver& operator=(
const SocketIODriver& other) =
delete;
66 SocketIODriver& operator=(SocketIODriver&& other) =
delete;
73 virtual uint04 peek(
char* s, uint04 size = Constant<uint04>::Max)
const override;
79 virtual uint04 rx(
char* s, uint04 max_size = Constant<uint04>::Max)
override;
83 virtual void tx(
const StringView& command)
override;
88 virtual bool open(
const ConnectionInfo& request)
override;
90 virtual void close()
override;
94 virtual bool isOpen()
const override;
99 virtual bool waitForReadyRead(
const TimeSpan& span)
override;
103 virtual TranslatedString lastError()
const override;
107 virtual uint04 bytesAvailable()
const override;
109 DynamicPointer<SocketIOChannel> m_socket;
110 QByteArray m_channel_write_buffer;
111 QByteArray m_channel_read_buffer;
112 Dictionary<int, unsigned int> m_received_bytes;
113 std::mutex m_critical_section;
114 bool m_is_open =
false;
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 ...
A specific channel of communication within the SocketIO framework.
A ConnectionBackend that allows the software to interface with SocketIO for communicating with across...
virtual Buffer< ConnectionInfo > availableConnections(const ConnectionSearchParameters ¶ms) override
Enumerates available SocketIO connections matching the search parameters.
virtual ConnectionBackend * createConnection(const ConnectionInfo &request) override
Creates a new SocketIODriver connection backend.
virtual bool handlesType(const StringView &request) const override
Checks whether this factory handles the given connection type.
virtual Buffer< ConnectionCategory > availableConnectionCategories() override
Gets the categories of connections this factory provides.
The core String View class for the NDEVR API.
Stores a time span, or difference between two times, with an optional start time.
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.