#include "approx.h"
#include "../include/librealsense2/rs.hpp"
#include "../include/librealsense2/hpp/rs_context.hpp"
#include "../include/librealsense2/hpp/rs_internal.hpp"
#include <limits>
#include <cmath>
#include <cassert>
#include <thread>
#include <map>
#include <mutex>
#include <condition_variable>
#include <atomic>
#include <vector>
#include <fstream>
#include <array>
#include "../src/types.h"
Go to the source code of this file.
Classes | |
class | command_line_params |
struct | device_profiles |
struct | frame_metadata |
struct | internal_frame_additional_data |
struct | profile |
class | require_error |
class | require_no_error |
struct | stream_request |
struct | test_duration |
struct | user_data |
Macros | |
#define | LIBREALSENSE_UNITTESTS_COMMON_H |
#define | NOEXCEPT_FALSE noexcept(false) |
#define | SECTION_FROM_TEST_NAME space_to_underscore(Catch::getCurrentContext().getResultCapture()->getCurrentTestName()).c_str() |
Typedefs | |
typedef std::pair< std::string, bool > | dev_type |
Enumerations | |
enum | special_folder { user_desktop, user_documents, user_pictures, user_videos, temp_folder } |
Functions | |
void | check_fps (double actual_fps, double configured_fps) |
std::vector< profile > | configure_all_supported_streams (rs2::sensor &sensor, int width=640, int height=480, int fps=60) |
std::pair< std::vector< rs2::sensor >, std::vector< profile > > | configure_all_supported_streams (rs2::device &dev, int width=640, int height=480, int fps=30) |
void | disable_sensitive_options_for (rs2::sensor &sen) |
void | disable_sensitive_options_for (rs2::device &dev) |
std::shared_ptr< rs2::device > | do_with_waiting_for_camera_connection (rs2::context ctx, std::shared_ptr< rs2::device > dev, std::string serial, std::function< void()> operation) |
float | dot_product (const float(&a)[3], const float(&b)[3]) |
bool | file_exists (const std::string &filename) |
void | frame_callback (rs2::device &dev, rs2::frame frame, void *user) |
dev_type | get_PID (rs2::device &dev) |
rs2::stream_profile | get_profile_by_resolution_type (rs2::sensor &s, res_type res) |
bool | is_usb3 (const rs2::device &dev) |
bool | make_context (const char *id, rs2::context *ctx, std::string min_api_version="0.0.0") |
std::ostream & | operator<< (std::ostream &stream, const profile &cap) |
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]) |
rs2::depth_sensor | restart_first_device_and_return_depth_sensor (const rs2::context &ctx, const rs2::device_list &devices_list) |
std::string | space_to_underscore (const std::string &text) |
void | test_option (rs2::sensor &device, rs2_option option, std::initializer_list< int > good_values, std::initializer_list< int > bad_values) |
float | vector_length (const float(&v)[3]) |
bool | wait_for_reset (std::function< bool(void)> func, std::shared_ptr< rs2::device > dev) |
Variables | |
static std::mutex | cb_mtx |
static std::condition_variable | cv |
static int | done |
static std::mutex | m |
const int | max_capture_time_sec = 3 |
const uint32_t | max_frames_to_receive = 50 |
static std::atomic< bool > | stop_streaming |
#define LIBREALSENSE_UNITTESTS_COMMON_H |
Definition at line 6 of file unit-tests-common.h.
#define NOEXCEPT_FALSE noexcept(false) |
Definition at line 35 of file unit-tests-common.h.
#define SECTION_FROM_TEST_NAME space_to_underscore(Catch::getCurrentContext().getResultCapture()->getCurrentTestName()).c_str() |
Definition at line 196 of file unit-tests-common.h.
typedef std::pair<std::string, bool > dev_type |
Definition at line 265 of file unit-tests-common.h.
enum special_folder |
Enumerator | |
---|---|
user_desktop | |
user_documents | |
user_pictures | |
user_videos | |
temp_folder |
Definition at line 866 of file unit-tests-common.h.
|
inline |
Definition at line 527 of file unit-tests-common.h.
|
inline |
Definition at line 101 of file unit-tests-common.h.
|
inline |
Definition at line 166 of file unit-tests-common.h.
|
inline |
Definition at line 205 of file unit-tests-common.h.
|
inline |
Definition at line 226 of file unit-tests-common.h.
|
inline |
Definition at line 804 of file unit-tests-common.h.
|
inline |
Definition at line 420 of file unit-tests-common.h.
|
inline |
Definition at line 311 of file unit-tests-common.h.
|
inline |
Definition at line 622 of file unit-tests-common.h.
|
inline |
Definition at line 267 of file unit-tests-common.h.
|
inline |
Definition at line 785 of file unit-tests-common.h.
|
inline |
Definition at line 248 of file unit-tests-common.h.
|
inline |
Definition at line 317 of file unit-tests-common.h.
|
inline |
Definition at line 87 of file unit-tests-common.h.
|
inline |
Definition at line 432 of file unit-tests-common.h.
|
inline |
Definition at line 488 of file unit-tests-common.h.
|
inline |
Definition at line 460 of file unit-tests-common.h.
|
inline |
Definition at line 446 of file unit-tests-common.h.
|
inline |
Definition at line 440 of file unit-tests-common.h.
|
inline |
Definition at line 850 of file unit-tests-common.h.
|
inline |
Definition at line 184 of file unit-tests-common.h.
|
inline |
Definition at line 750 of file unit-tests-common.h.
|
inline |
Definition at line 426 of file unit-tests-common.h.
|
inline |
Definition at line 232 of file unit-tests-common.h.
|
static |
Definition at line 612 of file unit-tests-common.h.
|
static |
Definition at line 613 of file unit-tests-common.h.
|
static |
Definition at line 615 of file unit-tests-common.h.
|
static |
Definition at line 611 of file unit-tests-common.h.
const int max_capture_time_sec = 3 |
Definition at line 533 of file unit-tests-common.h.
const uint32_t max_frames_to_receive = 50 |
Definition at line 534 of file unit-tests-common.h.
|
static |
Definition at line 614 of file unit-tests-common.h.