3#include "RealSenseInterface/Headers/RealSenseServer.h"
4#include "Base/Headers/QueueBuffer.hpp"
30 class REALSENSE_INTERFACE_API RealSenseClient
33 class WorkerThread :
public QThread
39 WorkerThread(RealSenseClient* client);
42 RealSenseClient* m_client;
The equivelent of std::vector but with a bit more control.
A standard interface for all types of connections that allow transmitting and receiving of data betwe...
Connection(const Model &model, LogPtr raw_network_log=nullptr, LogPtr command_log=nullptr, QObject *parent=nullptr)
Constructs a Connection with the given model and optional logs.
A core class where all Design Objects including models, materials, and geometries are stored.
A hash-based key-value store, useful for quick associative lookups.
Templated logic for doing matrix multiplication.
Stores objects in a first-in, first out queue based Buffer with push and pop functions.
Buffer< QPointer< Connection > > connections()
Returns all active connections.
bool collectData()
Collects and processes one frame of data from the server.
WorkerThread * m_thread
Background data collection thread.
Time m_last_connection_attempt
Time of last connection attempt.
void sendMessage(const StringView &message)
Sends a command message to the server.
Dictionary< UUID, OverrideMatrixBuffer > m_override_matrices
Override matrices per scanner.
RasterPacketInfo m_packet_info
Current packet being assembled.
void sendConnectIfNeeded()
Sends a connection request to the server if not already connected.
bool openPorts()
Opens the UDP ports for communication.
const Dictionary< UUID, RealSenseScanner * > & connectedScanners() const
Returns the dictionary of connected scanners.
void setOverrideMatrix(const UUID &id, const Matrix< fltp08 > &mat, Time matrix_time)
Sets an override transformation matrix for a scanner.
String m_server_connection
The server address string.
Matrix< fltp08 > cameraMatrix(UUID id, Time time, const Matrix< fltp08 > &fallback)
Returns the camera matrix for a scanner at a given time.
void initConnections()
Initializes the UDP connections for data transfer.
Dictionary< UUID, RealSenseScanner * > m_connected_scanners
Connected scanner instances.
String m_rx_buffer
Receive data buffer.
Time m_ping_send
Time when last ping was sent.
DesignObjectLookup * m_lookup
The design object lookup.
static RealSenseClient * Default()
Returns the singleton RealSenseClient instance.
Connection * m_rx_connection
The receive UDP connection.
void processCommandReturn(const String &s)
Processes a command return string from the server.
TimeSpan m_ping_offset
Measured ping latency offset.
Connection * m_tx_connection
The transmit UDP connection.
void setLookup(const StringView &server, DesignObjectLookup *lookup)
Sets the server address and design object lookup.
void init()
Initializes the client.
uint04 m_rx_buffer_offset
Current offset in the receive buffer.
void startClient()
Starts the client background thread.
void sendPing()
Sends a ping to the server for latency measurement.
RealSenseServerConnection(const UUID &id)
Constructs a server connection with the given identifier.
UUID id
The UUID of the remote scanner.
The core String View class for the NDEVR API.
The core String class for the NDEVR API.
Stores a time span, or difference between two times, with an optional start time.
Represents a timestamp with utilities for manipulation and conversion.
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
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 timestamped camera matrix override value.
Matrix< fltp08 > mat
The override transformation matrix.
Time time
The time at which the override applies.
Packet of colored point data sent from the raster scanner for live and inactive display.