#include "catch/catch.hpp"
#include <librealsense/rs.h>
#include <limits>
#include <cmath>
#include <cassert>
#include <thread>
#include <map>
#include <mutex>
#include <condition_variable>
#include <atomic>
Go to the source code of this file.
|
void | check_fps (double actual_fps, double configured_fps) |
|
float | dot_product (const float(&a)[3], const float(&b)[3]) |
|
void | frame_callback (rs_device *dev, rs_frame_ref *frame, void *user) |
|
void | motion_callback (rs_device *, rs_motion_data, void *) |
|
void | require_cross_product (const float(&r)[3], const float(&a)[3], const float(&b)[3]) |
|
void | require_identity_matrix (const float(&matrix)[9]) |
|
void | require_rotation_matrix (const float(&matrix)[9]) |
|
void | require_transposed (const float(&a)[9], const float(&b)[9]) |
|
void | require_zero_vector (const float(&vector)[3]) |
|
void | test_frame_callback (rs_device *device, std::initializer_list< stream_mode > &modes, std::map< rs_stream, test_duration > &duration_per_stream) |
|
void | test_option (rs_device *device, rs_option option, std::initializer_list< int > good_values, std::initializer_list< int > bad_values) |
|
void | test_streaming (rs_device *device, std::initializer_list< stream_mode > modes) |
|
void | test_wait_for_frames (rs_device *device, std::initializer_list< stream_mode > &modes, std::map< rs_stream, test_duration > &duration_per_stream) |
|
void | timestamp_callback (rs_device *, rs_timestamp_data, void *) |
|
float | vector_length (const float(&v)[3]) |
|
#define LIBREALSENSE_UNITTESTS_COMMON_H |
#define NOEXCEPT_FALSE noexcept(false) |
void check_fps |
( |
double |
actual_fps, |
|
|
double |
configured_fps |
|
) |
| |
|
inline |
float dot_product |
( |
const float(&) |
a[3], |
|
|
const float(&) |
b[3] |
|
) |
| |
|
inline |
void require_cross_product |
( |
const float(&) |
r[3], |
|
|
const float(&) |
a[3], |
|
|
const float(&) |
b[3] |
|
) |
| |
|
inline |
void require_identity_matrix |
( |
const float(&) |
matrix[9] | ) |
|
|
inline |
void require_rotation_matrix |
( |
const float(&) |
matrix[9] | ) |
|
|
inline |
void require_transposed |
( |
const float(&) |
a[9], |
|
|
const float(&) |
b[9] |
|
) |
| |
|
inline |
void require_zero_vector |
( |
const float(&) |
vector[3] | ) |
|
|
inline |
void test_option |
( |
rs_device * |
device, |
|
|
rs_option |
option, |
|
|
std::initializer_list< int > |
good_values, |
|
|
std::initializer_list< int > |
bad_values |
|
) |
| |
|
inline |
float vector_length |
( |
const float(&) |
v[3] | ) |
|
|
inline |
std::condition_variable cv |
|
static |
const int max_capture_time_sec = 3 |
const uint32_t max_frames_to_receive = 50 |
std::atomic<bool> stop_streaming |
|
static |