![]() |
NDEVR
API Documentation
|
Client that receives point cloud data from a remote RealSense server. More...
Public Member Functions | |
| Matrix< fltp08 > | cameraMatrix (UUID id, Time time, const Matrix< fltp08 > &fallback) |
| Returns the camera matrix for a scanner at a given time. | |
| bool | collectData () |
| Collects and processes one frame of data from the server. | |
| const Dictionary< UUID, RealSenseScanner * > & | connectedScanners () const |
| Returns the dictionary of connected scanners. | |
| Buffer< QPointer< Connection > > | connections () |
| Returns all active connections. | |
| void | init () |
| Initializes the client. | |
| void | initConnections () |
| Initializes the UDP connections for data transfer. | |
| bool | openPorts () |
| Opens the UDP ports for communication. | |
| void | processCommandReturn (const String &s) |
| Processes a command return string from the server. | |
| void | sendConnectIfNeeded () |
| Sends a connection request to the server if not already connected. | |
| void | sendMessage (const StringView &message) |
| Sends a command message to the server. | |
| void | sendPing () |
| Sends a ping to the server for latency measurement. | |
| void | setLookup (const StringView &server, DesignObjectLookup *lookup) |
| Sets the server address and design object lookup. | |
| void | setOverrideMatrix (const UUID &id, const Matrix< fltp08 > &mat, Time matrix_time) |
| Sets an override transformation matrix for a scanner. | |
| void | startClient () |
| Starts the client background thread. | |
Static Public Member Functions | |
| static RealSenseClient * | Default () |
| Returns the singleton RealSenseClient instance. | |
Protected Attributes | |
| Dictionary< UUID, RealSenseScanner * > | m_connected_scanners |
| Connected scanner instances. | |
| Time | m_last_connection_attempt = Time(0) |
| Time of last connection attempt. | |
| DesignObjectLookup * | m_lookup = nullptr |
| The design object lookup. | |
| Dictionary< UUID, OverrideMatrixBuffer > | m_override_matrices |
| Override matrices per scanner. | |
| RasterPacketInfo | m_packet_info |
| Current packet being assembled. | |
| TimeSpan | m_ping_offset = Constant<TimeSpan>::Invalid |
| Measured ping latency offset. | |
| Time | m_ping_send = Constant<Time>::Invalid |
| Time when last ping was sent. | |
| String | m_rx_buffer |
| Receive data buffer. | |
| uint04 | m_rx_buffer_offset = 0 |
| Current offset in the receive buffer. | |
| Connection * | m_rx_connection = nullptr |
| The receive UDP connection. | |
| String | m_server_connection |
| The server address string. | |
| WorkerThread * | m_thread |
| Background data collection thread. | |
| Connection * | m_tx_connection = nullptr |
| The transmit UDP connection. | |
Client that receives point cloud data from a remote RealSense server.
Connects to a RealSense server via UDP, receives compressed point and color data, and creates local RealSenseScanner instances for each connected device.
Definition at line 30 of file RealSenseClient.h.
| Matrix< fltp08 > RealSenseClient::cameraMatrix | ( | UUID | id, |
| Time | time, | ||
| const Matrix< fltp08 > & | fallback ) |
Returns the camera matrix for a scanner at a given time.
| [in] | id | The scanner UUID. |
| [in] | time | The time to query. |
| [in] | fallback | The fallback matrix if no override exists. |
| bool RealSenseClient::collectData | ( | ) |
Collects and processes one frame of data from the server.
| const Dictionary< UUID, RealSenseScanner * > & RealSenseClient::connectedScanners | ( | ) | const |
Returns the dictionary of connected scanners.
| Buffer< QPointer< Connection > > RealSenseClient::connections | ( | ) |
Returns all active connections.
|
static |
Returns the singleton RealSenseClient instance.
| bool RealSenseClient::openPorts | ( | ) |
Opens the UDP ports for communication.
| void RealSenseClient::processCommandReturn | ( | const String & | s | ) |
Processes a command return string from the server.
| [in] | s | The command response string. |
| void RealSenseClient::sendMessage | ( | const StringView & | message | ) |
Sends a command message to the server.
| [in] | message | The command string to send. |
| void RealSenseClient::setLookup | ( | const StringView & | server, |
| DesignObjectLookup * | lookup ) |
Sets the server address and design object lookup.
| [in] | server | The server address string. |
| [in] | lookup | The design object lookup for scanner models. |
| void RealSenseClient::setOverrideMatrix | ( | const UUID & | id, |
| const Matrix< fltp08 > & | mat, | ||
| Time | matrix_time ) |
Sets an override transformation matrix for a scanner.
| [in] | id | The scanner UUID. |
| [in] | mat | The override matrix. |
| [in] | matrix_time | The time the matrix applies to. |