#include <k4a/k4a.hpp>
Wrapper for k4a_device_t
Wraps a handle for a device.
Definition at line 1104 of file k4a.hpp.
◆ device() [1/2]
Creates a device from a k4a_device_t Takes ownership of the handle, i.e. you should not call k4a_device_close on the handle after giving it to the device; the device will take care of that.
Definition at line 1112 of file k4a.hpp.
◆ device() [2/2]
k4a::device::device |
( |
device && |
dev | ) |
|
|
inlinenoexcept |
Moves another device into a new device
Definition at line 1116 of file k4a.hpp.
◆ ~device()
◆ close()
void k4a::device::close |
( |
| ) |
|
|
inlinenoexcept |
Closes a k4a device.
- See also
- k4a_device_close
Definition at line 1171 of file k4a.hpp.
◆ get_calibration()
Get the camera calibration for the entire K4A device, which is used for all transformation functions. Throws error on failure.
- See also
- k4a_device_get_calibration
Definition at line 1380 of file k4a.hpp.
◆ get_capture() [1/2]
bool k4a::device::get_capture |
( |
capture * |
cap | ) |
|
|
inline |
Reads a sensor capture into cap. Returns true if a capture was read, false if the read timed out. Throws error on failure. This API assumes an inifinate timeout.
- See also
- k4a_device_get_capture
Definition at line 1208 of file k4a.hpp.
◆ get_capture() [2/2]
bool k4a::device::get_capture |
( |
capture * |
cap, |
|
|
std::chrono::milliseconds |
timeout |
|
) |
| |
|
inline |
Reads a sensor capture into cap. Returns true if a capture was read, false if the read timed out. Throws error on failure.
- See also
- k4a_device_get_capture
Definition at line 1185 of file k4a.hpp.
◆ get_color_control()
Get the K4A color sensor control value Throws error on failure.
- See also
- k4a_device_get_color_control
Definition at line 1327 of file k4a.hpp.
◆ get_imu_sample() [1/2]
Reads an IMU sample. Returns true if a sample was read, false if the read timed out. Throws error on failure. This API assumes an infinate timeout.
- See also
- k4a_device_get_imu_sample
Definition at line 1239 of file k4a.hpp.
◆ get_imu_sample() [2/2]
bool k4a::device::get_imu_sample |
( |
k4a_imu_sample_t * |
imu_sample, |
|
|
std::chrono::milliseconds |
timeout |
|
) |
| |
|
inline |
Reads an IMU sample. Returns true if a sample was read, false if the read timed out. Throws error on failure.
- See also
- k4a_device_get_imu_sample
Definition at line 1218 of file k4a.hpp.
◆ get_installed_count()
static uint32_t k4a::device::get_installed_count |
( |
| ) |
|
|
inlinestaticnoexcept |
Gets the number of connected devices
- See also
- k4a_device_get_installed_count
Definition at line 1470 of file k4a.hpp.
◆ get_raw_calibration()
std::vector< uint8_t > k4a::device::get_raw_calibration |
( |
| ) |
const |
|
inline |
Get the raw calibration blob for the entire K4A device. Throws error on failure.
- See also
- k4a_device_get_raw_calibration
Definition at line 1355 of file k4a.hpp.
◆ get_serialnum()
std::string k4a::device::get_serialnum |
( |
| ) |
const |
|
inline |
Get the K4A device serial number Throws error on failure.
- See also
- k4a_device_get_serialnum
Definition at line 1295 of file k4a.hpp.
◆ get_version()
Get the version numbers of the K4A subsystems' firmware Throws error on failure.
- See also
- k4a_device_get_version
Definition at line 1437 of file k4a.hpp.
◆ handle()
Returns the underlying k4a_device_t handle
Note the k4a_device_t handle does not have a reference count will be destroyed when the C++ object is destroyed. The caller is responsible for ensuring the C++ object outlives this handle.
Definition at line 1162 of file k4a.hpp.
◆ is_sync_in_connected()
bool k4a::device::is_sync_in_connected |
( |
| ) |
const |
|
inline |
Get the device jack status for the synchronization in connector Throws error on failure.
- Attention
- The Orbbec device does not support retrieving the jack connection status, so this function will always return false (disconnected).
- See also
- k4a_device_get_sync_jack
Definition at line 1400 of file k4a.hpp.
◆ is_sync_out_connected()
bool k4a::device::is_sync_out_connected |
( |
| ) |
const |
|
inline |
Get the device jack status for the synchronization out connector Throws error on failure.
- Attention
- The Orbbec device does not support retrieving the jack connection status, so this function will always return false (disconnected).
- See also
- k4a_device_get_sync_jack
Definition at line 1420 of file k4a.hpp.
◆ is_valid()
bool k4a::device::is_valid |
( |
| ) |
const |
|
inlinenoexcept |
Returns true if the device is valid, false otherwise
Definition at line 1152 of file k4a.hpp.
◆ open()
static device k4a::device::open |
( |
uint32_t |
index | ) |
|
|
inlinestatic |
Open a k4a device. Throws error on failure.
- See also
- k4a_device_open
Definition at line 1454 of file k4a.hpp.
◆ operator bool()
k4a::device::operator bool |
( |
| ) |
const |
|
inlineexplicitnoexcept |
Returns true if the device is valid, false otherwise
Definition at line 1145 of file k4a.hpp.
◆ operator=()
Moves another device into this device; other is set to invalid
Definition at line 1132 of file k4a.hpp.
◆ set_color_control()
Set the K4A color sensor control value Throws error on failure.
- See also
- k4a_device_set_color_control
Definition at line 1341 of file k4a.hpp.
◆ start_cameras()
Starts the K4A device's cameras Throws error on failure.
- See also
- k4a_device_start_cameras
Definition at line 1249 of file k4a.hpp.
◆ start_imu()
void k4a::device::start_imu |
( |
| ) |
|
|
inline |
Starts the K4A IMU Throws error on failure
- See also
- k4a_device_start_imu
Definition at line 1272 of file k4a.hpp.
◆ stop_cameras()
void k4a::device::stop_cameras |
( |
| ) |
|
|
inlinenoexcept |
Stops the K4A device's cameras
- See also
- k4a_device_stop_cameras
Definition at line 1262 of file k4a.hpp.
◆ stop_imu()
void k4a::device::stop_imu |
( |
| ) |
|
|
inlinenoexcept |
Stops the K4A IMU
- See also
- k4a_device_stop_imu
Definition at line 1285 of file k4a.hpp.
The documentation for this class was generated from the following file: