Class sensor
Defined in File rs_sensor.hpp
Inheritance Relationships
Base Type
public rs2::options
(Class options)
Derived Types
public rs2::color_sensor
(Class color_sensor)public rs2::debug_stream_sensor
(Class debug_stream_sensor)public rs2::depth_sensor
(Class depth_sensor)public rs2::fisheye_sensor
(Class fisheye_sensor)public rs2::max_usable_range_sensor
(Class max_usable_range_sensor)public rs2::motion_sensor
(Class motion_sensor)public rs2::pose_sensor
(Class pose_sensor)public rs2::roi_sensor
(Class roi_sensor)public rs2::software_sensor
(Class software_sensor)public rs2::wheel_odometer
(Class wheel_odometer)
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
-
inline std::vector<filter> get_recommended_filters() const
get the recommended list of filters by the sensor
- Returns:
list of filters that recommended by sensor
-
inline sensor()
-
inline operator bool() const
-
inline const std::shared_ptr<rs2_sensor> &get() const
-
template<class T>
inline bool is() const
-
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
-
inline void open(const stream_profile &profile) const