1#ifndef _CHRONOPTICS_TOF_KEA_CAMERA_HPP_
2#define _CHRONOPTICS_TOF_KEA_CAMERA_HPP_
4#include <chronoptics/tof/kea_camera.h>
6#include <chronoptics/tof/camera.hpp>
7#include <chronoptics/tof/processing_config.hpp>
8#include <chronoptics/tof/camera_config.hpp>
10namespace chronoptics {
18 KeaCamera(tof_kea_camera_t ptr =
nullptr) :
Camera(reinterpret_cast<tof_camera_t>(ptr)) {}
32 this->ptr_ =
reinterpret_cast<tof_camera_t
>(tof_kea_camera_new(*
reinterpret_cast<const tof_processing_config_t*
>(&processing_config), serial, TOF_ERROR_HANDLER{}));
39 auto ptr =
reinterpret_cast<tof_kea_camera_t
>(this->ptr_);
40 return tof_kea_camera_on_camera_processing_capable(ptr, TOF_ERROR_HANDLER{});
47 auto ptr =
reinterpret_cast<tof_kea_camera_t
>(this->ptr_);
48 return tof_kea_camera_get_on_camera_processing(ptr, TOF_ERROR_HANDLER{});
56 auto ptr =
reinterpret_cast<tof_kea_camera_t
>(this->ptr_);
57 return tof_kea_camera_set_on_camera_processing(ptr, on_camera_processing, TOF_ERROR_HANDLER{});
65 auto ptr =
reinterpret_cast<tof_kea_camera_t
>(this->ptr_);
66 return tof_kea_camera_get_delay(ptr, TOF_ERROR_HANDLER{});
74 auto ptr =
reinterpret_cast<tof_kea_camera_t
>(this->ptr_);
75 return tof_kea_camera_set_delay(ptr, delay, TOF_ERROR_HANDLER{});
82 auto ptr =
reinterpret_cast<tof_kea_camera_t
>(this->ptr_);
83 return tof_kea_camera_get_packet_size(ptr, TOF_ERROR_HANDLER{});
90 auto ptr =
reinterpret_cast<tof_kea_camera_t
>(this->ptr_);
91 return tof_kea_camera_set_packet_size(ptr, size, TOF_ERROR_HANDLER{});
98 auto ptr =
reinterpret_cast<tof_kea_camera_t
>(this->ptr_);
99 return tof_kea_camera_set_camera_config(ptr, *
reinterpret_cast<const tof_camera_config_t*
>(&camera_config), TOF_ERROR_HANDLER{});
107 auto ptr =
reinterpret_cast<tof_kea_camera_t
>(this->ptr_);
108 return tof_kea_camera_set_configurations(ptr, *
reinterpret_cast<const tof_camera_config_t*
>(&camera_config), *
reinterpret_cast<const tof_processing_config_t*
>(&processing_config), TOF_ERROR_HANDLER{});
115 auto ptr =
reinterpret_cast<tof_kea_camera_t
>(this->ptr_);
116 return tof_kea_camera_version(ptr, TOF_ERROR_HANDLER{});
123 auto ptr =
reinterpret_cast<tof_kea_camera_t
>(this->ptr_);
124 return tof_kea_camera_software_trigger_capable(ptr, TOF_ERROR_HANDLER{});
130 auto ptr =
reinterpret_cast<tof_kea_camera_t
>(this->ptr_);
131 return tof_kea_camera_software_trigger(ptr, TOF_ERROR_HANDLER{});
138class DiscoveredKea :
public detail::Base<tof_discovered_kea, tof_discovered_kea_delete> {
149 return tof_discovered_kea_serial(this->ptr_, TOF_ERROR_HANDLER{});
156 return tof_discovered_kea_info(this->ptr_, TOF_ERROR_HANDLER{});
164inline std::vector<DiscoveredKea> discover_kea_cameras() {
165 size_t size = tof_discover_kea_cameras(
nullptr, 0, TOF_ERROR_HANDLER{});
166 std::vector<DiscoveredKea> vec;
168 for (
size_t i = 0; i < size; i++)
169 vec.emplace_back(
static_cast<tof_discovered_kea_t
>(
nullptr));
170 auto data =
reinterpret_cast<tof_discovered_kea_t*
>(vec.data());
171 size = tof_discover_kea_cameras(data, vec.size(), TOF_ERROR_HANDLER{});
This class allows you to view/edit the camera settings.
The main interface to the depth cameras.
Simple class containing information about found kea cameras.
const char * info() const
Additional information about the discovered camera.
const char * serial() const
The serial.
DiscoveredKea(tof_discovered_kea_t ptr=nullptr)
Construct from pointer.
The main interface to the kea camera.
bool on_camera_processing_capable() const
Check whether this kea camera can do on camera processing.
KeaCamera(tof_kea_camera_t ptr=nullptr)
Construct from pointer.
void software_trigger()
Software trigger the camera.
void set_on_camera_processing(bool on_camera_processing)
Set on camera processing.
bool software_trigger_capable()
Check whether the camera is capable of software trigger.
void set_packet_size(uint16_t size)
Set maximum size of each network packet transmitted.
bool get_on_camera_processing() const
Get on camera processing.
void set_configurations(const CameraConfig &camera_config, const ProcessingConfig &processing_config)
Set both the camera and processing config.
uint32_t get_delay() const
Get delay between network packets.
uint16_t get_packet_size() const
Get maximum size of each network packet transmitted.
const char * version()
Get the tof library version running on the camera.
void set_camera_config(const CameraConfig &camera_config)
Set the camera config.
void set_delay(uint32_t delay)
Set delay between network packets.
KeaCamera(const ProcessingConfig &processing_config, StringView serial)
Construct the kea camera.
Processing that can be done.