8 #if !defined(MAKEFILE) || ( defined(F200_TEST) && defined(LIVE_TEST) ) 10 #define CATCH_CONFIG_MAIN 20 std::map<rs_stream, test_duration> duration_per_stream;
21 for(
auto &
mode : modes)
23 duration_per_stream.insert(std::pair<rs_stream, test_duration>(
mode.stream,
test_duration()));
30 for(
auto &
mode : modes)
37 TEST_CASE(
"F200 metadata enumerates correctly",
"[live] [f200]" )
45 for(
int i=0; i<device_count; ++i)
50 SECTION(
"device name is Intel RealSense F200" )
58 TEST_CASE(
"F200 devices support all required options",
"[live] [f200]" )
66 for(
int i=0; i<device_count; ++i)
71 SECTION(
"device supports standard picture options and F200 extension options, and nothing else" )
73 const int supported_options[] = {
97 if(std::find(std::begin(supported_options),
std::end(supported_options), i) !=
std::end(supported_options))
113 TEST_CASE(
"F200 device extrinsics are within expected parameters",
"[live] [f200]" )
121 for(
int i=0; i<device_count; ++i)
126 SECTION(
"no extrinsic transformation between DEPTH and INFRARED" )
135 SECTION(
"depth scale is 1/32 mm" )
146 TEST_CASE(
"F200 streams depth (Z16)",
"[live] [f200] [one-camera]")
155 SECTION(
"F200 streams depth 640x480 (VGA), [15,30,60] fps")
157 for (
auto & fps : { 15, 30, 60 })
159 INFO(
"Testing " << fps <<
" fps");
164 SECTION(
"F200 streams depth 640x240 (HVGA), [15,30,60] fps")
166 for (
auto & fps : { 15, 30, 60})
168 INFO(
"Testing " << fps <<
" fps");
178 TEST_CASE(
"F200 streams infrared (Y16)",
"[live] [f200] [one-camera]")
187 SECTION(
"F200 streams infrared 640x480 depth (VGA), [30,60,120] fps")
189 for (
auto & fps : { 30, 60, 120 })
191 INFO(
"Testing " << fps <<
" fps")
196 SECTION(
"F200 streams infrared 640x240 depth (HVGA), [30,60,120] fps")
198 for (
auto & fps : { 30, 60, 120 })
200 INFO(
"Testing " << fps <<
" fps")
206 TEST_CASE(
"F200 has no INFRARED2 streaming modes",
"[live] [f200]" )
214 for(
int i=0; i<device_count; ++i)
226 TEST_CASE(
"a single F200 can stream a variety of reasonable streaming mode combinations",
"[live] [f200] [one-camera]" )
230 SECTION(
"exactly one device is connected" )
239 SECTION(
"device name is Intel RealSense F200" )
245 SECTION(
"streaming is possible in some reasonable configurations" )
int rs_get_device_count(const rs_context *context, rs_error **error)
Determines number of connected devices.
void test_f200_streaming(rs_device *device, std::initializer_list< stream_mode > modes)
GLsizei const GLchar *const * string
const char * rs_get_device_name(const rs_device *device, rs_error **error)
Retrieves human-readable device model string.
rs_option
Defines general configuration controls.
float rs_get_device_depth_scale(const rs_device *device, rs_error **error)
Retrieves mapping between the units of the depth image and meters.
void require_zero_vector(const float(&vector)[3])
int rs_get_stream_mode_count(const rs_device *device, rs_stream stream, rs_error **error)
Determines the number of streaming modes available for a given stream.
TEST_CASE("F200 metadata enumerates correctly","[live] [f200]")
void rs_disable_stream(rs_device *device, rs_stream stream, rs_error **error)
Disables a specific stream.
void rs_get_device_extrinsics(const rs_device *device, rs_stream from_stream, rs_stream to_stream, rs_extrinsics *extrin, rs_error **error)
Retrieves extrinsic transformation between the viewpoints of two different streams.
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.
void rs_enable_stream(rs_device *device, rs_stream stream, int width, int height, rs_format format, int framerate, rs_error **error)
Enables a specific stream and requests specific properties.
void test_wait_for_frames(rs_device *device, std::initializer_list< stream_mode > &modes, std::map< rs_stream, test_duration > &duration_per_stream)
REQUIRE(rs_get_device_count(ctx, require_no_error())==1)
void require_identity_matrix(const float(&matrix)[9])
Cross-stream extrinsics: encode the topology describing how the different devices are connected...
GLuint const GLchar * name
rs_device * rs_get_device(rs_context *context, int index, rs_error **error)
Retrieves connected device by index.
#define SECTION(name, description)
int rs_is_stream_enabled(const rs_device *device, rs_stream stream, rs_error **error)
Determines if a specific stream is enabled.