Time-of-Flight Library(ToF) 4.0.2
 
chronoptics::tof::LiveCamera Class Reference

Functions shared across all live cameras. More...

#include <camera.hpp>

+ Inheritance diagram for chronoptics::tof::LiveCamera:

Public Member Functions

 LiveCamera (tof_live_camera_t ptr=nullptr)
 Construct from pointer.
 
const char * version ()
 Get the tof library version running on the camera.
 
bool remote_update_capable ()
 Check whether the camera is capable of updating remotely.
 
void remote_update (StringView file_location)
 Update the camera remotely.
 
bool persistent_ip_capable () const
 Whether the camera is capable of setting persistent ip.
 
PersistentIp get_persistent_ip ()
 Get the current persistent ip settings.
 
void set_persistent_ip (const PersistentIp &persistent_ip)
 Set the persistent ip settings.
 
bool apply_persistent_ip_capable () const
 Whether the camera is capable of applying the persistent ip.
 
void apply_persistent_ip ()
 Apply persistent ip by rebooting the camera, power cycling the camera is discouraged because the applied ip settings might not stick.
 
bool software_trigger_capable ()
 Check whether the camera is capable of software trigger.
 
void software_trigger ()
 Software trigger the camera.
 
uint32_t get_delay () const
 Get delay between network packets.
 
void set_delay (uint32_t delay)
 Set delay between network packets.
 
uint16_t get_packet_size () const
 Get maximum size of each network packet transmitted.
 
void set_packet_size (uint16_t size)
 Set maximum size of each network packet transmitted.
 
bool get_temperatures_capable ()
 Whether the camera is capable of returning temperatures.
 
std::vector< float > get_temperatures ()
 Get the current on camera temperatures.
 
bool get_gpio (size_t pin)
 Get voltage level on given pin.
 
void set_gpio (size_t pin, bool level)
 Set voltage level on given pin.
 
- Public Member Functions inherited from chronoptics::tof::Camera
 Camera (tof_camera_t ptr=nullptr)
 Construct from pointer.
 
void start ()
 Start streaming of the camera.
 
void stop ()
 Stop streaming of the camera.
 
bool is_streaming () const
 Check whether the camera is streaming.
 
bool is_connected () const
 Check whether the camera is still connected.
 
std::vector< Streamget_stream_list () const
 Get the different output streams the camera can provide.
 
ProcessingConfig get_process_config () const
 the processing config of the camera
 
bool has_frames () const
 Check if the camera has frames available.
 
std::vector< Dataget_frames ()
 Get data frames from camera.
 
void clear_buffer ()
 Clear the circular buffer used to store frames.
 
size_t get_buffer_size () const
 Get the circular buffer size.
 
void set_buffer_size (size_t size)
 Set the circular buffer size.
 
CameraConfig get_camera_config () const
 Get the currently active camera config.
 
const char * get_serial () const
 Get the serial number of the current camera.
 
Calibration get_calibration () const
 Get calibration from the camera.
 
size_t get_user_pointer_capacity () const
 Get the amount of user pointers that can be stored.
 
void set_user_pointer_capacity (size_t capacity)
 Set the amount of user pointers that can be stored.
 
void add_user_pointer (uint8_t *pointer, size_t capacity, user_pointer_destructed_fn &callback, FrameType frame_type)
 Add a pointer that will be filled with the specified data type.
 
void add_user_pointer (uint8_t *pointer, size_t capacity, tof_user_pointer_destructed_t callback, void *callback_user_data, FrameType frame_type)
 Add a pointer that will be filled with the specified data type.
 
void clear_user_pointers ()
 Clear all user pointers in memory.
 
uint32_t config_index () const
 Get the currently set configuration index.
 
void switch_config (uint32_t config_index)
 Switch to a different config in real time, depending on configuration and camera, this can take 100-300ms.
 
std::vector< FrameType > possible_frame_types () const
 Get the frame types that this camera can output.
 
bool output_frame_types_set ()
 Whether output frame types have been set.
 
std::vector< FrameType > get_output_frame_types () const
 Get the frame types the camera should output.
 
void set_output_frame_types (const std::vector< FrameType > &output_frame_types)
 Set the frame types the camera should output.
 
bool has_multiple_configurations () const
 Check if multiple configurations are set.
 
std::vector< CameraConfigget_multiple_camera_configurations () const
 Get all the set camera configurations.
 
std::vector< ProcessingConfigget_multiple_processing_configurations () const
 Get all the set processing configurations.
 
std::vector< const char * > get_multiple_names () const
 Get the name for each configuration.
 
std::vector< const char * > get_multiple_descriptions () const
 Get the description for each configuration.
 

Detailed Description

Functions shared across all live cameras.

Definition at line 375 of file camera.hpp.

Constructor & Destructor Documentation

◆ LiveCamera()

chronoptics::tof::LiveCamera::LiveCamera ( tof_live_camera_t  ptr = nullptr)
inline

Construct from pointer.

Definition at line 378 of file camera.hpp.

Member Function Documentation

◆ apply_persistent_ip()

void chronoptics::tof::LiveCamera::apply_persistent_ip ( )
inline

Apply persistent ip by rebooting the camera, power cycling the camera is discouraged because the applied ip settings might not stick.

Definition at line 447 of file camera.hpp.

◆ apply_persistent_ip_capable()

bool chronoptics::tof::LiveCamera::apply_persistent_ip_capable ( ) const
inline

Whether the camera is capable of applying the persistent ip.

Returns
Capable

Definition at line 439 of file camera.hpp.

◆ get_delay()

uint32_t chronoptics::tof::LiveCamera::get_delay ( ) const
inline

Get delay between network packets.

Returns
The delay, depending on the camera software it is in nanoseconds or in cpu instruction

Definition at line 471 of file camera.hpp.

◆ get_gpio()

bool chronoptics::tof::LiveCamera::get_gpio ( size_t  pin)
inline

Get voltage level on given pin.

Parameters
pinPin
Returns
Voltage 3.3V

Definition at line 524 of file camera.hpp.

◆ get_packet_size()

uint16_t chronoptics::tof::LiveCamera::get_packet_size ( ) const
inline

Get maximum size of each network packet transmitted.

Returns
Packet size in bytes

Definition at line 488 of file camera.hpp.

◆ get_persistent_ip()

PersistentIp chronoptics::tof::LiveCamera::get_persistent_ip ( )
inline

Get the current persistent ip settings.

Returns
Persistent IP

Definition at line 419 of file camera.hpp.

◆ get_temperatures()

std::vector< float > chronoptics::tof::LiveCamera::get_temperatures ( )
inline

Get the current on camera temperatures.

Returns
Temperatures

Definition at line 512 of file camera.hpp.

◆ get_temperatures_capable()

bool chronoptics::tof::LiveCamera::get_temperatures_capable ( )
inline

Whether the camera is capable of returning temperatures.

Returns
Capable

Definition at line 504 of file camera.hpp.

◆ persistent_ip_capable()

bool chronoptics::tof::LiveCamera::persistent_ip_capable ( ) const
inline

Whether the camera is capable of setting persistent ip.

Returns
Persistent ip capable

Definition at line 411 of file camera.hpp.

◆ remote_update()

void chronoptics::tof::LiveCamera::remote_update ( StringView  file_location)
inline

Update the camera remotely.

After uploading the update file the function will return. If a correct update file was uploaded, the camera will flash the update and reboot. This generally takes about a minute. The camera can also be updated via a web interface by visiting the ip address of the camera on port 8080, for example http://192.168.1.208:8080

Parameters
file_locationLocation of the update file

Definition at line 403 of file camera.hpp.

◆ remote_update_capable()

bool chronoptics::tof::LiveCamera::remote_update_capable ( )
inline

Check whether the camera is capable of updating remotely.

Returns
Remote update capable

Definition at line 391 of file camera.hpp.

◆ set_delay()

void chronoptics::tof::LiveCamera::set_delay ( uint32_t  delay)
inline

Set delay between network packets.

Parameters
delayThe delay, depending on the camera software it is in nanoseconds or in cpu instruction

Definition at line 480 of file camera.hpp.

◆ set_gpio()

void chronoptics::tof::LiveCamera::set_gpio ( size_t  pin,
bool  level 
)
inline

Set voltage level on given pin.

Parameters
pinPin
levelVoltage level

Definition at line 533 of file camera.hpp.

◆ set_packet_size()

void chronoptics::tof::LiveCamera::set_packet_size ( uint16_t  size)
inline

Set maximum size of each network packet transmitted.

Parameters
sizePacket size in bytes

Definition at line 496 of file camera.hpp.

◆ set_persistent_ip()

void chronoptics::tof::LiveCamera::set_persistent_ip ( const PersistentIp persistent_ip)
inline

Set the persistent ip settings.

To activate persistent ip settings run apply_persistent_ip.

Parameters
persistent_ipThe persistent ip

Definition at line 431 of file camera.hpp.

◆ software_trigger()

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

Software trigger the camera.

Definition at line 462 of file camera.hpp.

◆ software_trigger_capable()

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

Check whether the camera is capable of software trigger.

Returns
Software trigger capable

Definition at line 455 of file camera.hpp.

◆ version()

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

Get the tof library version running on the camera.

Returns
Version

Definition at line 383 of file camera.hpp.