Intel® RealSense™ Cross Platform API  2.13.0
Intel Realsense Cross-platform API
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
rs2::sensor Class Reference

#include <rs_sensor.hpp>

Inheritance diagram for rs2::sensor:
rs2::options rs2::depth_sensor rs2::roi_sensor rs2::software_sensor rs2::depth_stereo_sensor

Public Member Functions

void open (const stream_profile &profile) const
 
bool supports (rs2_camera_info info) const
 
const char * get_info (rs2_camera_info info) const
 
void open (const std::vector< stream_profile > &profiles) const
 
void close () const
 
template<class T >
void start (T callback) const
 
void stop () const
 
template<class T >
void set_notifications_callback (T callback) const
 
std::vector< stream_profileget_stream_profiles () const
 
sensoroperator= (const std::shared_ptr< rs2_sensor > other)
 
sensoroperator= (const sensor &other)
 
 sensor ()
 
 operator bool () const
 
const std::shared_ptr< rs2_sensor > & get () const
 
template<class T >
bool is () const
 
template<class T >
as () const
 
bool supports (rs2_option option) const
 
- Public Member Functions inherited from rs2::options
bool supports (rs2_option option) const
 
const char * get_option_description (rs2_option option) const
 
const char * get_option_value_description (rs2_option option, float val) const
 
float get_option (rs2_option option) const
 
option_range get_option_range (rs2_option option) const
 
void set_option (rs2_option option, float value) const
 
bool is_option_read_only (rs2_option option) const
 
optionsoperator= (const options &other)
 
virtual ~options ()=default
 

Protected Member Functions

 sensor (std::shared_ptr< rs2_sensor > dev)
 
- Protected Member Functions inherited from rs2::options
 options (rs2_options *o=nullptr)
 
template<class T >
optionsoperator= (const T &dev)
 
 options (const options &other)
 

Protected Attributes

friend context
 
friend device_list
 
friend device
 
friend device_base
 
friend roi_sensor
 
std::shared_ptr< rs2_sensor_sensor
 

Constructor & Destructor Documentation

◆ sensor() [1/2]

rs2::sensor::sensor ( )
inline

◆ sensor() [2/2]

rs2::sensor::sensor ( std::shared_ptr< rs2_sensor dev)
inlineexplicitprotected

Member Function Documentation

◆ as()

template<class T >
T rs2::sensor::as ( ) const
inline

◆ close()

void rs2::sensor::close ( ) const
inline

close sensor for exclusive access this method should be used for releasing sensor resource

◆ get()

const std::shared_ptr<rs2_sensor>& rs2::sensor::get ( ) const
inline

◆ get_info()

const char* rs2::sensor::get_info ( rs2_camera_info  info) const
inline

retrieve camera specific information, like versions of various internal components

Parameters
[in]infocamera info type to retrieve
Returns
the requested camera info string, in a format specific to the sensor model

◆ get_stream_profiles()

std::vector<stream_profile> rs2::sensor::get_stream_profiles ( ) const
inline

check if physical sensor is supported

Returns
list of stream profiles that given sensor can provide, should be released by rs2_delete_profiles_list

◆ is()

template<class T >
bool rs2::sensor::is ( ) const
inline

◆ open() [1/2]

void rs2::sensor::open ( const stream_profile profile) const
inline

open sensor for exclusive access, by committing to a configuration

Parameters
[in]profileconfiguration committed by the sensor

◆ open() [2/2]

void rs2::sensor::open ( const std::vector< stream_profile > &  profiles) const
inline

open sensor for exclusive access, by committing to composite configuration, specifying one or more stream profiles this method should be used for interdependent streams, such as depth and infrared, that have to be configured together

Parameters
[in]profilesvector of configurations to be commited by the sensor

◆ operator bool()

rs2::sensor::operator bool ( ) const
inline

◆ operator=() [1/2]

sensor& rs2::sensor::operator= ( const std::shared_ptr< rs2_sensor other)
inline

◆ operator=() [2/2]

sensor& rs2::sensor::operator= ( const sensor other)
inline

◆ set_notifications_callback()

template<class T >
void rs2::sensor::set_notifications_callback ( callback) const
inline

register notifications callback

Parameters
[in]callbacknotifications callback

◆ start()

template<class T >
void rs2::sensor::start ( callback) const
inline

Start passing frames into user provided callback

Parameters
[in]callbackStream callback, can be any callable object accepting rs2::frame

◆ stop()

void rs2::sensor::stop ( ) const
inline

stop streaming

◆ supports() [1/2]

bool rs2::options::supports
inline

check if particular option is supported

Parameters
[in]optionoption id to be checked
Returns
true if option is supported

◆ supports() [2/2]

bool rs2::sensor::supports ( rs2_camera_info  info) const
inline

check if specific camera info is supported

Parameters
[in]infothe parameter to check for support
Returns
true if the parameter both exist and well-defined for the specific sensor

Member Data Documentation

◆ _sensor

std::shared_ptr<rs2_sensor> rs2::sensor::_sensor
protected

◆ context

friend rs2::sensor::context
protected

◆ device

friend rs2::sensor::device
protected

◆ device_base

friend rs2::sensor::device_base
protected

◆ device_list

friend rs2::sensor::device_list
protected

◆ roi_sensor

friend rs2::sensor::roi_sensor
protected

The documentation for this class was generated from the following file: