Time-of-Flight Library(ToF)
3.2.2
|
|
Connect to a camera directly using the USB interface. More...
#include <usb_interface.hpp>
Public Member Functions | |
UsbInterface (tof_usb_interface_t ptr=nullptr) | |
Construct from pointer. | |
UsbInterface (UsbDevice &usb_device) | |
Create USB camera from a usb device. More... | |
bool | is_connected () const |
Check whether a connection is still maintained with the camera. More... | |
double | test_stream_speed () |
Tests the connection speed of the USB port. More... | |
CameraConfig | download_configuration () |
Download camera configuration from the camera. More... | |
Calibration | download_calibration () |
Download calibration from the camera. More... | |
void | upload_configuration (const CameraConfig &config) |
Upload camera configuration to the camera. More... | |
bool | depth_stream_capable (DepthStreamType stream) const |
Check whether this camera is capable of streaming the specified type. More... | |
void | start_depth_stream (DepthStreamType stream) |
Start the depth stream. More... | |
void | stop_depth_stream () |
Stop the depth stream. | |
bool | has_depth_data () const |
Returns true if a depth frame is available. More... | |
Data | get_depth_data () |
Get a depth frame. More... | |
bool | image_stream_capable () const |
Check whether camera supports an image stream. More... | |
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. More... | |
Data | get_image_data () |
Get image frame. More... | |
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. More... | |
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. More... | |
size_t | get_user_pointer_capacity () const |
Get the capacity for amount of user pointers that can be registered. More... | |
void | set_user_pointer_capacity (size_t capacity) |
Set the capacity for amount of user pointers that can be registered. More... | |
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. More... | |
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. More... | |
const char * | version () |
Get the tof library version running on the camera. More... | |
Connect to a camera directly using the USB interface.
Definition at line 34 of file usb_interface.hpp.
|
inline |
Create USB camera from a usb device.
usb_device | USB device |
Definition at line 44 of file usb_interface.hpp.
|
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.
pointer | The pointer to the data to write into |
capacity | The amount of data the pointer can hold |
callback | Callback that will be called when pointer is no longer in use |
callback_user_data | User data that will be passed back when the function pointer is called |
Definition at line 229 of file usb_interface.hpp.
|
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.
pointer | The pointer to the data to write into |
capacity | The amount of data the pointer can hold |
callback | Callback that will be called when pointer is no longer in use |
Definition at line 216 of file usb_interface.hpp.
|
inline |
Check whether this camera is capable of streaming the specified type.
stream | Depth stream type |
Definition at line 95 of file usb_interface.hpp.
|
inline |
Download calibration from the camera.
Definition at line 77 of file usb_interface.hpp.
|
inline |
Download camera configuration from the camera.
Definition at line 67 of file usb_interface.hpp.
|
inline |
|
inline |
|
inline |
Get the image frame into the supplied pointer.
pointer | The pointer to the data to write into |
capacity | The amount of data the pointer can hold |
callback | Callback that will be called when pointer is no longer in use |
callback_user_data | User data that will be passed back when the function pointer is called |
Definition at line 187 of file usb_interface.hpp.
|
inline |
Get the image frame into the supplied pointer.
pointer | The pointer to the data to write into |
capacity | The amount of data the pointer can hold |
callback | Callback that will be called when pointer is no longer in use |
Definition at line 172 of file usb_interface.hpp.
|
inline |
Get the capacity for amount of user pointers that can be registered.
Definition at line 197 of file usb_interface.hpp.
|
inline |
Returns true if a depth frame is available.
Definition at line 115 of file usb_interface.hpp.
|
inline |
Check whether image frame is available.
Definition at line 151 of file usb_interface.hpp.
|
inline |
Check whether camera supports an image stream.
Definition at line 132 of file usb_interface.hpp.
|
inline |
Check whether a connection is still maintained with the camera.
Definition at line 51 of file usb_interface.hpp.
|
inline |
Set the capacity for amount of user pointers that can be registered.
capacity | User pointer capacity |
Definition at line 204 of file usb_interface.hpp.
|
inline |
Start the depth stream.
stream | Depth stream type |
Definition at line 102 of file usb_interface.hpp.
|
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.
Definition at line 60 of file usb_interface.hpp.
|
inline |
Upload camera configuration to the camera.
config | Camera configuration |
Definition at line 87 of file usb_interface.hpp.
|
inline |
Get the tof library version running on the camera.
Definition at line 236 of file usb_interface.hpp.