Time-of-Flight Library(ToF) 3.11.1
 
chronoptics::tof::KeaCamera Class Reference

The main interface to the kea camera. More...

#include <kea_camera.hpp>

+ Inheritance diagram for chronoptics::tof::KeaCamera:

Public Member Functions

 KeaCamera (tof_kea_camera_t ptr=nullptr)
 Construct from pointer.
 
 KeaCamera (const ProcessingConfig &processing_config, StringView serial)
 Construct the kea camera.
 
 KeaCamera (StringView serial)
 Construct the kea camera with a processing config generated by default_processing from the camera config.
 
 KeaCamera (const ProcessingConfig &processing_config, StringView serial, const CameraConfig &camera_config)
 Construct the kea camera with the given processing and camera config.
 
bool on_camera_processing_capable () const
 Check whether this kea camera can do on camera processing.
 
bool get_on_camera_processing () const
 Get on camera processing.
 
void set_on_camera_processing (bool on_camera_processing)
 Set on camera processing.
 
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.
 
void set_camera_config (const CameraConfig &camera_config)
 Set the camera config.
 
void set_configurations (const CameraConfig &camera_config, const ProcessingConfig &processing_config)
 Set both the camera and processing config.
 
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.
 
bool remote_update_capable ()
 Check whether the camera is capable of updating remotely.
 
void remote_update (StringView file_location)
 Update the camera remotely.
 
bool multiple_configurations_possible () const
 Check whether camera supports multiple configurations.
 
void set_multiple_configurations (const std::vector< CameraConfig > &camera_configs, const std::vector< ProcessingConfig > &pro_configs)
 Set multiple configurations.
 
- 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.
 
void set_stream_list (const std::vector< Stream > &streams)
 Set the streams that you want to get from the camera.
 
bool is_stream_list_set () const
 Check whether the stream list is set.
 
std::vector< Streamget_set_stream_list ()
 Get the stream list that is set on the camera.
 
ProcessingConfig get_process_config () const
 Get the processing config of the camera.
 
void set_process_config (ProcessingConfig &config)
 Set 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.
 
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

The main interface to the kea camera.

Definition at line 15 of file kea_camera.hpp.

Constructor & Destructor Documentation

◆ KeaCamera() [1/4]

chronoptics::tof::KeaCamera::KeaCamera ( tof_kea_camera_t  ptr = nullptr)
inline

Construct from pointer.

Definition at line 18 of file kea_camera.hpp.

◆ KeaCamera() [2/4]

chronoptics::tof::KeaCamera::KeaCamera ( const ProcessingConfig processing_config,
StringView  serial 
)
inline

Construct the kea camera.

Parameters
processing_configThe processing config
serialThe serial number of the camera to connect to, if the camera is available over both usb and gige it will be connected over usb. If an empty string is supplied the camera will connect to the first usb camera, if no usb camera is connected it will connect to the first gige camera that replies (this reply time is random, so you might connect to a different camera each time if you've got multiple cameras connected to your network). If no camera is found with the given serial number a nullptr and error is returned.

Definition at line 31 of file kea_camera.hpp.

◆ KeaCamera() [3/4]

chronoptics::tof::KeaCamera::KeaCamera ( StringView  serial)
inline

Construct the kea camera with a processing config generated by default_processing from the camera config.

Parameters
serialThe serial number of the camera to connect to, if the camera is available over both usb and gige it will be connected over usb. If an empty string is supplied the camera will connect to the first usb camera, if no usb camera is connected it will connect to the first gige camera that replies (this reply time is random, so you might connect to a different camera each time if you've got multiple cameras connected to your network). If no camera is found with the given serial number a nullptr and error is returned.

Definition at line 46 of file kea_camera.hpp.

◆ KeaCamera() [4/4]

chronoptics::tof::KeaCamera::KeaCamera ( const ProcessingConfig processing_config,
StringView  serial,
const CameraConfig camera_config 
)
inline

Construct the kea camera with the given processing and camera config.

Parameters
processing_configThe processing config
serialThe serial number of the camera to connect to, if the camera is available over both usb and gige it will be connected over usb. If an empty string is supplied the camera will connect to the first usb camera, if no usb camera is connected it will connect to the first gige camera that replies (this reply time is random, so you might connect to a different camera each time if you've got multiple cameras connected to your network). If no camera is found with the given serial number a nullptr and error is returned.
camera_configThe camera config

Definition at line 62 of file kea_camera.hpp.

Member Function Documentation

◆ get_delay()

uint32_t chronoptics::tof::KeaCamera::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 95 of file kea_camera.hpp.

◆ get_on_camera_processing()

bool chronoptics::tof::KeaCamera::get_on_camera_processing ( ) const
inline

Get on camera processing.

Returns
True on camera processing, false on host processing

Definition at line 77 of file kea_camera.hpp.

◆ get_packet_size()

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

Get maximum size of each network packet transmitted.

Returns
Packet size in bytes

Definition at line 112 of file kea_camera.hpp.

◆ multiple_configurations_possible()

bool chronoptics::tof::KeaCamera::multiple_configurations_possible ( ) const
inline

Check whether camera supports multiple configurations.

Returns
Multiple configurations possible

Definition at line 188 of file kea_camera.hpp.

◆ on_camera_processing_capable()

bool chronoptics::tof::KeaCamera::on_camera_processing_capable ( ) const
inline

Check whether this kea camera can do on camera processing.

Returns
On camera processing capable

Definition at line 69 of file kea_camera.hpp.

◆ remote_update()

void chronoptics::tof::KeaCamera::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 180 of file kea_camera.hpp.

◆ remote_update_capable()

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

Check whether the camera is capable of updating remotely.

Returns
Remote update capable

Definition at line 168 of file kea_camera.hpp.

◆ set_camera_config()

void chronoptics::tof::KeaCamera::set_camera_config ( const CameraConfig camera_config)
inline

Set the camera config.

Parameters
camera_configCamera config

Definition at line 128 of file kea_camera.hpp.

◆ set_configurations()

void chronoptics::tof::KeaCamera::set_configurations ( const CameraConfig camera_config,
const ProcessingConfig processing_config 
)
inline

Set both the camera and processing config.

Parameters
camera_configCamera config
processing_configProcessing config

Definition at line 137 of file kea_camera.hpp.

◆ set_delay()

void chronoptics::tof::KeaCamera::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 104 of file kea_camera.hpp.

◆ set_multiple_configurations()

void chronoptics::tof::KeaCamera::set_multiple_configurations ( const std::vector< CameraConfig > &  camera_configs,
const std::vector< ProcessingConfig > &  pro_configs 
)
inline

Set multiple configurations.

Parameters
camera_configsCamera configurations
pro_configsProcessing configurations

Definition at line 197 of file kea_camera.hpp.

◆ set_on_camera_processing()

void chronoptics::tof::KeaCamera::set_on_camera_processing ( bool  on_camera_processing)
inline

Set on camera processing.

Parameters
on_camera_processingTrue on camera processing, false on host processing

Definition at line 86 of file kea_camera.hpp.

◆ set_packet_size()

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

Set maximum size of each network packet transmitted.

Parameters
sizePacket size in bytes

Definition at line 120 of file kea_camera.hpp.

◆ software_trigger()

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

Software trigger the camera.

Definition at line 160 of file kea_camera.hpp.

◆ software_trigger_capable()

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

Check whether the camera is capable of software trigger.

Returns
Software trigger capable

Definition at line 153 of file kea_camera.hpp.

◆ version()

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

Get the tof library version running on the camera.

Returns
Version

Definition at line 145 of file kea_camera.hpp.