16 if (!device_count) printf(
"No device detected. Is it plugged in?\n");
18 for(
int i = 0; i < device_count; ++i)
22 std::cout <<
"Device " << i <<
" - " << dev->
get_name() <<
":\n";
23 std::cout <<
" Serial number: " << dev->
get_serial() <<
"\n";
25 try { std::cout <<
" USB Port ID: " << dev->
get_usb_port_id() <<
"\n"; }
catch (...) {}
30 std::cout <<
" Camera info: \n";
39 std::cout << std::setw(55) <<
" Supported options:" << std::setw(10) <<
"min" << std::setw(10) <<
" max" << std::setw(6) <<
" step" << std::setw(10) <<
" default" << std::endl;
45 double min, max, step, def;
47 std::cout <<
" " <<
std::left << std::setw(50) << opt <<
" : " << std::setw(5) << min <<
"... " << std::setw(12) << max << std::setw(6) << step << std::setw(10) << def <<
"\n";
57 if(mode_count == 0)
continue;
60 std::cout <<
" Stream " << strm <<
" - " << mode_count <<
" modes:\n";
61 for(
int k = 0; k < mode_count; ++k)
67 std::cout <<
" " << width <<
"\tx " << height <<
"\t@ " << framerate <<
"Hz\t" <<
format;
74 std::cout <<
"\t" << std::setprecision(3) << intrin.
hfov() <<
" x " << intrin.
vfov() <<
" degrees, distortion = " << intrin.
model() << std::endl;
void log_to_console(log_severity min_severity)
Provides convenience methods relating to devices.
intrinsics get_stream_intrinsics(stream stream) const
Retrieves intrinsic camera parameters for specific stream.
void enable_stream(stream stream, int width, int height, format format, int framerate, output_buffer_format output_buffer_type=output_buffer_format::continous)
Enables specific stream and requests specific properties.
const std::string & get_failed_args() const
const char * rs_camera_info_to_string(rs_camera_info info)
GLint GLint GLsizei GLsizei height
const char * get_firmware_version() const
Retrieves version of firmware currently installed on device.
const char * get_info(camera_info info) const
Retrieves camera-specific information such as versions of various components.
void get_option_range(option option, double &min, double &max, double &step)
Retrieves available range of values of supported option.
const char * get_usb_port_id() const
Retrieves USB port number of device.
camera_info
Read-only strings that can be queried from the device.
Exposes librealsense functionality for C++ compilers.
option
Defines general configuration controls.
int get_stream_mode_count(stream stream) const
Determines number of streaming modes available for given stream.
stream
Streams are different types of data provided by RealSense devices.
rs_camera_info
Read-only strings that can be queried from the device.
const char * get_name() const
Retrieves human-readable device model string.
format
Formats: defines how each stream can be encoded. rs_format specifies how a frame is represented in me...
void get_stream_mode(stream stream, int index, int &width, int &height, format &format, int &framerate) const
Determines properties of specific streaming mode.
const char * get_serial() const
Retrieves unique serial number of device.
bool supports_option(option option) const
Determines if device allows specific option to be queried and set.
void disable_stream(stream stream)
Disables specific stream.
GLint GLint GLsizei width
bool supports(capabilities capability) const
Determines device capabilities.
device * get_device(int index)
const std::string & get_failed_function() const
int get_device_count() const