unit-tests-live-r200.cpp
Go to the documentation of this file.
1 // License: Apache 2.0. See LICENSE file in root directory.
2 // Copyright(c) 2015 Intel Corporation. All Rights Reserved.
3 
5 // This set of tests is valid only for the R200 camera //
7 
8 #if !defined(MAKEFILE) || ( defined(LIVE_TEST) && defined(R200_TEST) )
9 
10 #include "catch/catch.hpp"
12 
13 #include <climits>
14 #include <sstream>
15 
17 // Streaming tests //
19 
20 TEST_CASE("R200 device-unique options support", "[live] [DS-device]")
21 {
22  // Require at least one device to be plugged in
24  const int device_count = rs_get_device_count(ctx, require_no_error());
25  REQUIRE(device_count > 0);
26 
27  // For each device
28  for (int i = 0; i<device_count; ++i)
29  {
31  REQUIRE(dev != nullptr);
33 
34  // Prerequisite for the following options list
36 
37  const int supported_options[] = {
42  };
43 
44  std::stringstream ss;
45  for (auto opt : supported_options)
46  {
47  ss.str(""); ss << "Verifying support for R200-specific: " << rs_option_to_string((rs_option)i);
49  }
50  }
51 }
52 
53 TEST_CASE( "R200 streams HD Raw10", "[live] [r200] [one-camera]" )
54 {
56 }
57 
58 //TEST_CASE("R200 Testing RGB Exposure values", "[live] [DS-device] [one-camera]")
59 //{
60 // // The logarithmic range is [-13:1:-4]
61 // test_ds_device_option(RS_OPTION_COLOR_EXPOSURE, { -13, -9, -4, -6, -10 }, {}, BEFORE_START_DEVICE | AFTER_START_DEVICE);
62 //}
63 
64 #endif /* !defined(MAKEFILE) || ( defined(LIVE_TEST) && defined(R200_TEST) ) */
int rs_get_device_count(const rs_context *context, rs_error **error)
Determines number of connected devices.
Definition: rs.cpp:113
#define REQUIRE(expr)
Definition: catch.hpp:9333
void rs_set_device_option(rs_device *device, rs_option option, double value, rs_error **error)
Sets the current value of a single option.
Definition: rs.cpp:712
const char * rs_get_device_name(const rs_device *device, rs_error **error)
Retrieves human-readable device model string.
Definition: rs.cpp:128
rs_option
Defines general configuration controls.
Definition: rs.h:128
void test_ds_device_streaming(std::initializer_list< stream_mode > modes)
TEST_CASE("R200 device-unique options support","[live] [DS-device]")
int rs_device_supports_option(const rs_device *device, rs_option option, rs_error **error)
Determines if the device allows a specific option to be queried and set.
Definition: rs.cpp:182
auto ctx
const char * rs_option_to_string(rs_option option)
Definition: rs.cpp:758
rs_device * dev
rs_device * rs_get_device(rs_context *context, int index, rs_error **error)
Retrieves connected device by index.
Definition: rs.cpp:120
static const std::vector< std::string > ds_names


librealsense
Author(s): Sergey Dorodnicov , Mark Horn , Reagan Lopez
autogenerated on Fri Mar 13 2020 03:16:18