NDEVR
API Documentation
RealSenseScannerFactory.h
1#pragma once
2#include "RealSenseInterface/Headers/DLLInfo.h"
3#include "PointScanner/Headers/ScannerFactory.h"
4#include <NDEVR/Connection.h>
5
6#include <librealsense2/rs.hpp>
7namespace NDEVR
8{
9 class RealSenseClient;
10 class InfoPipe;
12 class REALSENSE_INTERFACE_API RealSenseScannerConnection : public Connection
13 {
14 public:
24 RealSenseScannerConnection(const rs2::device_list& connection, uint04 index, const rs2::context& context,const Model& model, LogPtr raw_network_log = LogPtr(), LogPtr log = LogPtr(), QObject* parent = nullptr);
33 RealSenseScannerConnection(const String& remote_connection, const rs2::context& context, const Model& model, LogPtr raw_network_log = LogPtr(), LogPtr log = LogPtr(), QObject* parent = nullptr);
37 virtual bool isOpen() const override;
41 rs2::device getDevice();
42 rs2::device_list connected_devices;
43 rs2::context context;
45 };
46
51 class REALSENSE_INTERFACE_API RealSenseScannerFactory : public ScannerFactory
52 {
53 protected:
61 static rs2::context MainContext();
62 public:
77 static RealSenseScannerConnection* CreateRemoteConnection(String ip_address, LogPtr raw_network_log = nullptr, LogPtr log = nullptr);
88 virtual Scanner3D* connectToScanner(QPointer<Connection> connection_to_try, DesignObjectLookup* lookup) const override;
106 void addRemoteAddress(const String& remote);
111 protected:
115 };
116}
The equivelent of std::vector but with a bit more control.
Definition Buffer.hpp:58
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.
uint04 index() const
Returns the primary row index of this object within the DesignObjectBase property table.
A light-weight base class for Log that allows processes to update, without the need for additional in...
A light-weight wrapper that will be a no-op if there is not a valid log reference,...
A core class that represents a node on model hierarchy.
Definition Model.h:292
Client that receives point cloud data from a remote RealSense server.
Connection subclass for a locally or remotely connected RealSense device.
rs2::context context
The RealSense context.
RealSenseScannerConnection(const rs2::device_list &connection, uint04 index, const rs2::context &context, const Model &model, LogPtr raw_network_log=LogPtr(), LogPtr log=LogPtr(), QObject *parent=nullptr)
Constructs a connection to a local RealSense device.
rs2::device_list connected_devices
The list of connected RealSense devices.
RealSenseScannerConnection(const String &remote_connection, const rs2::context &context, const Model &model, LogPtr raw_network_log=LogPtr(), LogPtr log=LogPtr(), QObject *parent=nullptr)
Constructs a connection to a remote RealSense device.
String servo_connection
The servo controller connection string.
rs2::device getDevice()
Returns the underlying RealSense device.
virtual bool isOpen() const override
Returns whether the connection is currently open.
RealSenseScannerFactory()
Constructs the factory (protected; use SetupDefault()).
virtual Scanner3D * connectToScanner(QPointer< Connection > connection_to_try, DesignObjectLookup *lookup) const override
Creates a scanner from an established connection.
static RealSenseScannerFactory * SetupDefault()
Sets up and returns the default factory singleton.
virtual Buffer< QPointer< Connection > > possibleRemoteConnections(const HardwareSearchPathParameters &params) const
Returns connections to remotely discovered RealSense devices.
static RealSenseScannerConnection * CreateRemoteConnection(String ip_address, LogPtr raw_network_log=nullptr, LogPtr log=nullptr)
Creates a connection to a remote RealSense device.
static RealSenseScannerFactory * Default()
Returns the default factory singleton.
virtual ~RealSenseScannerFactory()
Destroys the factory.
void setClient(RealSenseClient *client)
Sets the RealSense client for remote connections.
Buffer< String > m_remote_connections
List of remote device addresses.
RealSenseClient * m_client
The remote client for network-connected scanners.
void addRemoteAddress(const String &remote)
Adds a remote device address to the discovery list.
static rs2::context MainContext()
Returns the main RealSense context singleton.
String m_servo_address
The servo controller address.
virtual Buffer< QPointer< Connection > > possibleConnections(const HardwareSearchPathParameters &params) const override
Returns all possible connections (local and remote).
virtual Buffer< QPointer< Connection > > possibleLocalConnections(const HardwareSearchPathParameters &params) const
Returns connections to locally attached RealSense devices.
void setServoAddress(String port)
Sets the servo controller address for motorized scanning.
The core String class for the NDEVR API.
Definition String.h:95
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 series of paths to use for finding potential hardware connections.