Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
unit-tests
func
alt-ir
test-sanity-while-streaming.cpp
Go to the documentation of this file.
1
// License: Apache 2.0. See LICENSE file in root directory.
2
// Copyright(c) 2021 Intel Corporation. All Rights Reserved.
3
4
//#test:device L500*
5
6
#include "../func-common.h"
7
#include "
alt-ir-common.h
"
8
9
using namespace
rs2
;
10
11
TEST_CASE
(
"AltIR"
,
"[l500][live]"
)
12
{
13
14
auto
devices
=
find_devices_by_product_line_or_exit
(
RS2_PRODUCT_LINE_L500
);
15
auto
dev
=
devices
[0];
16
17
auto
depth_sens =
dev
.first<
rs2::depth_sensor
>();
18
if
(
alt_ir_supported_or_message
( depth_sens ) )
19
{
20
option_range
r
;
21
REQUIRE_NOTHROW
( r = depth_sens.get_option_range(
RS2_OPTION_ALTERNATE_IR
) );
22
23
start_default_l500_depth_profiles
( depth_sens, [&](
rs2::frame
f
) {} ,
true
);
24
25
for
(
auto
i
= r.
min
;
i
<= r.
max
;
i
+=r.
step
)
26
{
27
// We expect that no delay is needed between set and get, as would be the case
28
// with XU options (during streaming)
29
CHECK_NOTHROW
( depth_sens.set_option(
RS2_OPTION_ALTERNATE_IR
,
i
) );
30
CHECK
( depth_sens.get_option(
RS2_OPTION_ALTERNATE_IR
) ==
i
);
31
}
32
33
depth_sens.stop();
34
depth_sens.close();
35
}
36
}
start_default_l500_depth_profiles
void start_default_l500_depth_profiles(rs2::depth_sensor depth_sens, T callback, bool with_confidence=false)
Definition:
func-common.h:168
rs2::frame
Definition:
rs_frame.hpp:343
test-bad-conditions.dev
dev
Definition:
test-bad-conditions.py:16
rs2::depth_sensor
Definition:
rs_sensor.hpp:454
rs2::option_range::min
float min
Definition:
rs_types.hpp:178
rs2
Definition:
cah-model.h:10
rs2::option_range::max
float max
Definition:
rs_types.hpp:179
rs2::option_range::step
float step
Definition:
rs_types.hpp:181
f
GLdouble f
Definition:
glad/glad/glad.h:1518
alt_ir_supported_or_message
bool alt_ir_supported_or_message(const rs2::depth_sensor &depth_sens)
Definition:
alt-ir-common.h:10
r
GLdouble GLdouble r
Definition:
glad/glad/glad.h:1854
rs2::option_range
Definition:
rs_types.hpp:176
find_devices_by_product_line_or_exit
rs2::device_list find_devices_by_product_line_or_exit(int product)
Definition:
func-common.h:24
test-fg.devices
devices
Definition:
test-fg.py:9
RS2_PRODUCT_LINE_L500
#define RS2_PRODUCT_LINE_L500
Definition:
rs_context.h:96
RS2_OPTION_ALTERNATE_IR
Definition:
rs_option.h:107
TEST_CASE
TEST_CASE("AltIR","[l500][live]")
Definition:
test-sanity-while-streaming.cpp:11
CHECK_NOTHROW
#define CHECK_NOTHROW(...)
Definition:
catch.hpp:17421
alt-ir-common.h
REQUIRE_NOTHROW
REQUIRE_NOTHROW(rs2_log(RS2_LOG_SEVERITY_INFO,"Log message using rs2_log()", nullptr))
i
int i
Definition:
rs-pcl-color.cpp:54
CHECK
#define CHECK(condition)
Definition:
easylogging++.h:4483
librealsense2
Author(s): Sergey Dorodnicov
, Doron Hirshberg
, Mark Horn
, Reagan Lopez
, Itay Carpis
autogenerated on Mon May 3 2021 02:50:11