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

#include <rs_sensor.hpp>

Inheritance diagram for rs2::sensor:
rs2::options rs2::color_sensor rs2::debug_stream_sensor rs2::depth_sensor rs2::fisheye_sensor rs2::max_usable_range_sensor rs2::motion_sensor rs2::pose_sensor rs2::roi_sensor rs2::software_sensor rs2::wheel_odometer

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
 
std::vector< stream_profileget_active_streams () const
 
std::vector< filterget_recommended_filters () 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
 
 sensor (std::shared_ptr< rs2_sensor > dev)
 
 operator std::shared_ptr< rs2_sensor > ()
 
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_name (rs2_option option) const
 
const char * get_option_value_description (rs2_option option, float val) const
 
float get_option (rs2_option option) const
 
option_value get_option_value (rs2_option option_id) const
 
option_range get_option_range (rs2_option option) const
 
void set_option (rs2_option option, float value) const
 
void set_option_value (option_value const &value) const
 
bool is_option_read_only (rs2_option option) const
 
void on_options_changed (std::function< void(const options_list &) > callback) const
 
std::vector< rs2_optionget_supported_options ()
 
options_list get_supported_option_values ()
 
optionsoperator= (const options &other)
 
 options (const options &other)
 
virtual ~options ()=default
 

Protected Attributes

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

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ sensor() [1/2]

rs2::sensor::sensor ( )
inline

◆ sensor() [2/2]

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

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_active_streams()

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

Retrieves the list of stream profiles currently streaming on the sensor.

Returns
list of stream profiles that given sensor is streaming

◆ 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_recommended_filters()

std::vector<filter> rs2::sensor::get_recommended_filters ( ) const
inline

get the recommended list of filters by the sensor

Returns
list of filters that recommended by sensor

◆ get_stream_profiles()

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

Retrieves the list of stream profiles supported by the sensor.

Returns
list of stream profiles that given sensor can provide

◆ 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 std::shared_ptr< rs2_sensor >()

rs2::sensor::operator std::shared_ptr< rs2_sensor > ( )
inlineexplicit

◆ 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: