Time-of-Flight Library(ToF) 3.13.3
 
chronoptics::tof::UsbInterface Class Reference

DEPRECATED, use KeaCamera. More...

#include <usb_interface.hpp>

+ Inheritance diagram for chronoptics::tof::UsbInterface:

Public Member Functions

 UsbInterface (tof_usb_interface_t ptr=nullptr)
 Construct from pointer.
 
 UsbInterface (UsbDevice &usb_device)
 Create USB camera from a usb device.
 
bool is_connected () const
 Check whether a connection is still maintained with the camera.
 
double test_stream_speed ()
 Tests the connection speed of the USB port.
 
CameraConfig download_configuration ()
 Download camera configuration from the camera.
 
Calibration download_calibration ()
 Download calibration from the camera.
 
void upload_configuration (const CameraConfig &config)
 Upload camera configuration to the camera.
 
bool depth_stream_capable (DepthStreamType stream) const
 Check whether this camera is capable of streaming the specified type.
 
void start_depth_stream (DepthStreamType stream)
 Start the depth stream.
 
void stop_depth_stream ()
 Stop the depth stream.
 
bool has_depth_data () const
 Returns true if a depth frame is available.
 
Data get_depth_data ()
 Get a depth frame.
 
bool image_stream_capable () const
 Check whether camera supports an image stream.
 
void start_image_stream ()
 Start image stream.
 
void stop_image_stream ()
 Stop image stream.
 
bool has_image_data () const
 Check whether image frame is available.
 
Data get_image_data ()
 Get image frame.
 
Data get_image_data_into_pointer (uint8_t *pointer, size_t capacity, user_pointer_destructed_fn &callback)
 Get the image frame into the supplied pointer.
 
Data get_image_data_into_pointer (uint8_t *pointer, size_t capacity, tof_user_pointer_destructed_t callback, void *callback_user_data)
 Get the image frame into the supplied pointer.
 
size_t get_user_pointer_capacity () const
 Get the capacity for amount of user pointers that can be registered.
 
void set_user_pointer_capacity (size_t capacity)
 Set the capacity for amount of user pointers that can be registered.
 
void add_depth_user_pointer (uint8_t *pointer, size_t capacity, user_pointer_destructed_fn &callback)
 Add a pointer that will be filled with depth data.
 
void add_depth_user_pointer (uint8_t *pointer, size_t capacity, tof_user_pointer_destructed_t callback, void *callback_user_data)
 Add a pointer that will be filled with depth data.
 
const char * version ()
 Get the tof library version running on the camera.
 
bool software_trigger_capable ()
 Check whether the camera is capable of software trigger.
 
void software_trigger ()
 Software trigger the camera.
 

Detailed Description

DEPRECATED, use KeaCamera.

Connect to a camera directly using the USB interface

Definition at line 35 of file usb_interface.hpp.

Constructor & Destructor Documentation

◆ UsbInterface() [1/2]

chronoptics::tof::UsbInterface::UsbInterface ( tof_usb_interface_t  ptr = nullptr)
inline

Construct from pointer.

Definition at line 38 of file usb_interface.hpp.

◆ UsbInterface() [2/2]

chronoptics::tof::UsbInterface::UsbInterface ( UsbDevice usb_device)
inline

Create USB camera from a usb device.

Parameters
usb_deviceUSB device

Definition at line 45 of file usb_interface.hpp.

Member Function Documentation

◆ add_depth_user_pointer() [1/2]

void chronoptics::tof::UsbInterface::add_depth_user_pointer ( uint8_t *  pointer,
size_t  capacity,
tof_user_pointer_destructed_t  callback,
void *  callback_user_data 
)
inline

Add a pointer that will be filled with depth data.

This method allows you to fill data straight into your own data structure without any additional copying.

Parameters
pointerThe pointer to the data to write into
capacityThe amount of data the pointer can hold
callbackCallback that will be called when pointer is no longer in use
callback_user_dataUser data that will be passed back when the function pointer is called

Definition at line 230 of file usb_interface.hpp.

◆ add_depth_user_pointer() [2/2]

void chronoptics::tof::UsbInterface::add_depth_user_pointer ( uint8_t *  pointer,
size_t  capacity,
user_pointer_destructed_fn &  callback 
)
inline

Add a pointer that will be filled with depth data.

This method allows you to fill data straight into your own data structure without any additional copying.

Parameters
pointerThe pointer to the data to write into
capacityThe amount of data the pointer can hold
callbackCallback that will be called when pointer is no longer in use

Definition at line 217 of file usb_interface.hpp.

◆ depth_stream_capable()

bool chronoptics::tof::UsbInterface::depth_stream_capable ( DepthStreamType  stream) const
inline

Check whether this camera is capable of streaming the specified type.

Parameters
streamDepth stream type
Returns
Is capable

Definition at line 96 of file usb_interface.hpp.

◆ download_calibration()

Calibration chronoptics::tof::UsbInterface::download_calibration ( )
inline

Download calibration from the camera.

Returns
Calibration

Definition at line 78 of file usb_interface.hpp.

◆ download_configuration()

CameraConfig chronoptics::tof::UsbInterface::download_configuration ( )
inline

Download camera configuration from the camera.

Returns
Camera configuration

Definition at line 68 of file usb_interface.hpp.

◆ get_depth_data()

Data chronoptics::tof::UsbInterface::get_depth_data ( )
inline

Get a depth frame.

Returns
Depth frame

Definition at line 123 of file usb_interface.hpp.

◆ get_image_data()

Data chronoptics::tof::UsbInterface::get_image_data ( )
inline

Get image frame.

Returns
Image data

Definition at line 159 of file usb_interface.hpp.

◆ get_image_data_into_pointer() [1/2]

Data chronoptics::tof::UsbInterface::get_image_data_into_pointer ( uint8_t *  pointer,
size_t  capacity,
tof_user_pointer_destructed_t  callback,
void *  callback_user_data 
)
inline

Get the image frame into the supplied pointer.

Parameters
pointerThe pointer to the data to write into
capacityThe amount of data the pointer can hold
callbackCallback that will be called when pointer is no longer in use
callback_user_dataUser data that will be passed back when the function pointer is called
Returns
Image data

Definition at line 188 of file usb_interface.hpp.

◆ get_image_data_into_pointer() [2/2]

Data chronoptics::tof::UsbInterface::get_image_data_into_pointer ( uint8_t *  pointer,
size_t  capacity,
user_pointer_destructed_fn &  callback 
)
inline

Get the image frame into the supplied pointer.

Parameters
pointerThe pointer to the data to write into
capacityThe amount of data the pointer can hold
callbackCallback that will be called when pointer is no longer in use
Returns
Image data

Definition at line 173 of file usb_interface.hpp.

◆ get_user_pointer_capacity()

size_t chronoptics::tof::UsbInterface::get_user_pointer_capacity ( ) const
inline

Get the capacity for amount of user pointers that can be registered.

Returns
User pointer capacity

Definition at line 198 of file usb_interface.hpp.

◆ has_depth_data()

bool chronoptics::tof::UsbInterface::has_depth_data ( ) const
inline

Returns true if a depth frame is available.

Returns
Depth frame available

Definition at line 116 of file usb_interface.hpp.

◆ has_image_data()

bool chronoptics::tof::UsbInterface::has_image_data ( ) const
inline

Check whether image frame is available.

Returns
Image frame available

Definition at line 152 of file usb_interface.hpp.

◆ image_stream_capable()

bool chronoptics::tof::UsbInterface::image_stream_capable ( ) const
inline

Check whether camera supports an image stream.

Returns
Camera supports an image stream

Definition at line 133 of file usb_interface.hpp.

◆ is_connected()

bool chronoptics::tof::UsbInterface::is_connected ( ) const
inline

Check whether a connection is still maintained with the camera.

Returns
Is connected

Definition at line 52 of file usb_interface.hpp.

◆ set_user_pointer_capacity()

void chronoptics::tof::UsbInterface::set_user_pointer_capacity ( size_t  capacity)
inline

Set the capacity for amount of user pointers that can be registered.

Parameters
capacityUser pointer capacity

Definition at line 205 of file usb_interface.hpp.

◆ software_trigger()

void chronoptics::tof::UsbInterface::software_trigger ( )
inline

Software trigger the camera.

Definition at line 250 of file usb_interface.hpp.

◆ software_trigger_capable()

bool chronoptics::tof::UsbInterface::software_trigger_capable ( )
inline

Check whether the camera is capable of software trigger.

Returns
Software trigger capable

Definition at line 244 of file usb_interface.hpp.

◆ start_depth_stream()

void chronoptics::tof::UsbInterface::start_depth_stream ( DepthStreamType  stream)
inline

Start the depth stream.

Parameters
streamDepth stream type

Definition at line 103 of file usb_interface.hpp.

◆ start_image_stream()

void chronoptics::tof::UsbInterface::start_image_stream ( )
inline

Start image stream.

Definition at line 139 of file usb_interface.hpp.

◆ stop_depth_stream()

void chronoptics::tof::UsbInterface::stop_depth_stream ( )
inline

Stop the depth stream.

Definition at line 109 of file usb_interface.hpp.

◆ stop_image_stream()

void chronoptics::tof::UsbInterface::stop_image_stream ( )
inline

Stop image stream.

Definition at line 145 of file usb_interface.hpp.

◆ test_stream_speed()

double chronoptics::tof::UsbInterface::test_stream_speed ( )
inline

Tests the connection speed of the USB port.

This is useful to check whether a hub or USB port works well. The maximum speed that the camera is able to transmit is ~3.0 Gbps.

Returns
Connection speed in Gpbs (bits)

Definition at line 61 of file usb_interface.hpp.

◆ upload_configuration()

void chronoptics::tof::UsbInterface::upload_configuration ( const CameraConfig config)
inline

Upload camera configuration to the camera.

Parameters
configCamera configuration

Definition at line 88 of file usb_interface.hpp.

◆ version()

const char * chronoptics::tof::UsbInterface::version ( )
inline

Get the tof library version running on the camera.

Returns
Version

Definition at line 237 of file usb_interface.hpp.