Class sensor

Inheritance Relationships

Base Type

Derived Types

Class Documentation

class sensor : public rs2::options

Subclassed by 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 Functions

inline void open(const stream_profile &profile) const

open sensor for exclusive access, by committing to a configuration

Parameters:

profile[in] configuration committed by the sensor

inline bool supports(rs2_camera_info info) const

check if specific camera info is supported

Parameters:

info[in] the parameter to check for support

Returns:

true if the parameter both exist and well-defined for the specific sensor

inline const char *get_info(rs2_camera_info info) const

retrieve camera specific information, like versions of various internal components

Parameters:

info[in] camera info type to retrieve

Returns:

the requested camera info string, in a format specific to the sensor model

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

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:

profiles[in] vector of configurations to be commited by the sensor

inline void close() const

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

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

Start passing frames into user provided callback

Parameters:

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

inline void stop() const

stop streaming

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

register notifications callback

Parameters:

callback[in] notifications callback

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

Retrieves the list of stream profiles supported by the sensor.

Returns:

list of stream profiles that given sensor can provide

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

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

Returns:

list of stream profiles that given sensor is streaming

get the recommended list of filters by the sensor

Returns:

list of filters that recommended by sensor

inline sensor &operator=(const std::shared_ptr<rs2_sensor> other)
inline sensor &operator=(const sensor &other)
inline sensor()
inline operator bool() const
inline const std::shared_ptr<rs2_sensor> &get() const
template<class T>
inline bool is() const
template<class T>
inline T as() const
inline explicit sensor(std::shared_ptr<rs2_sensor> dev)
inline explicit operator std::shared_ptr<rs2_sensor>()
inline bool supports(rs2_option option) const

check if particular option is supported

Parameters:

option[in] option id to be checked

Returns:

true if option is supported

Protected Attributes

friend context
friend device_list
friend device
friend device_base
friend roi_sensor
std::shared_ptr<rs2_sensor> _sensor