Public Member Functions | Private Member Functions | Friends | List of all members
rs2::software_sensor Class Reference

#include <rs_internal.hpp>

Inheritance diagram for rs2::software_sensor:
Inheritance graph
[legend]

Public Member Functions

stream_profile add_motion_stream (rs2_motion_stream motion_stream, bool is_default=false)
 
void add_option (rs2_option option, const option_range &range, bool is_writable=true)
 
stream_profile add_pose_stream (rs2_pose_stream pose_stream, bool is_default=false)
 
void add_read_only_option (rs2_option option, float val)
 
stream_profile add_video_stream (rs2_video_stream video_stream, bool is_default=false)
 
void detach ()
 
void on_motion_frame (rs2_software_motion_frame frame)
 
void on_notification (rs2_software_notification notif)
 
void on_pose_frame (rs2_software_pose_frame frame)
 
void on_video_frame (rs2_software_video_frame frame)
 
void set_metadata (rs2_frame_metadata_value value, rs2_metadata_type type)
 
void set_read_only_option (rs2_option option, float val)
 
- Public Member Functions inherited from rs2::sensor
template<class T >
as () const
 
void close () const
 
const std::shared_ptr< rs2_sensor > & get () const
 
std::vector< stream_profileget_active_streams () const
 
const char * get_info (rs2_camera_info info) const
 
std::vector< filterget_recommended_filters () const
 
std::vector< stream_profileget_stream_profiles () const
 
template<class T >
bool is () const
 
void open (const stream_profile &profile) const
 
void open (const std::vector< stream_profile > &profiles) const
 
 operator bool () const
 
 operator std::shared_ptr< rs2_sensor > ()
 
sensoroperator= (const std::shared_ptr< rs2_sensor > other)
 
sensoroperator= (const sensor &other)
 
 sensor ()
 
 sensor (std::shared_ptr< rs2_sensor > dev)
 
template<class T >
void set_notifications_callback (T callback) const
 
template<class T >
void start (T callback) const
 
void stop () const
 
bool supports (rs2_camera_info info) const
 
- Public Member Functions inherited from rs2::options
float get_option (rs2_option option) const
 
const char * get_option_description (rs2_option option) const
 
const char * get_option_name (rs2_option option) const
 
option_range get_option_range (rs2_option option) const
 
const char * get_option_value_description (rs2_option option, float val) const
 
std::vector< rs2_optionget_supported_options ()
 
bool is_option_read_only (rs2_option option) const
 
optionsoperator= (const options &other)
 
 options (const options &other)
 
void set_option (rs2_option option, float value) const
 
bool supports (rs2_option option) const
 
virtual ~options ()=default
 

Private Member Functions

 software_sensor (std::shared_ptr< rs2_sensor > s)
 

Friends

class software_device
 

Additional Inherited Members

- Protected Member Functions inherited from rs2::options
template<class T >
optionsoperator= (const T &dev)
 
 options (rs2_options *o=nullptr)
 
- Protected Attributes inherited from rs2::sensor
std::shared_ptr< rs2_sensor_sensor
 
friend context
 
friend device
 
friend device_base
 
friend device_list
 
friend roi_sensor
 

Detailed Description

Definition at line 88 of file rs_internal.hpp.

Constructor & Destructor Documentation

rs2::software_sensor::software_sensor ( std::shared_ptr< rs2_sensor s)
inlineprivate

Definition at line 247 of file rs_internal.hpp.

Member Function Documentation

stream_profile rs2::software_sensor::add_motion_stream ( rs2_motion_stream  motion_stream,
bool  is_default = false 
)
inline

Add motion stream to software sensor

Parameters
[in]motionall the parameters that required to defind motion stream

Definition at line 112 of file rs_internal.hpp.

void rs2::software_sensor::add_option ( rs2_option  option,
const option_range range,
bool  is_writable = true 
)
inline

Register option that will be supported by the sensor

Parameters
[in]optionthe option
[in]rangerange data for the option. range.def will be used as the initial value

Definition at line 218 of file rs_internal.hpp.

stream_profile rs2::software_sensor::add_pose_stream ( rs2_pose_stream  pose_stream,
bool  is_default = false 
)
inline

Add pose stream to software sensor

Parameters
[in]poseall the parameters that required to defind pose stream

Definition at line 128 of file rs_internal.hpp.

void rs2::software_sensor::add_read_only_option ( rs2_option  option,
float  val 
)
inline

Register read-only option that will be supported by the sensor

Parameters
[in]optionthe option
[in]valthe initial value

Definition at line 193 of file rs_internal.hpp.

stream_profile rs2::software_sensor::add_video_stream ( rs2_video_stream  video_stream,
bool  is_default = false 
)
inline

Add video stream to software sensor

Parameters
[in]video_streamall the parameters that required to defind video stream

Definition at line 96 of file rs_internal.hpp.

void rs2::software_sensor::detach ( )
inline

Sensors hold the parent device in scope via a shared_ptr. This function detaches that so that the software sensor doesn't keep the software device alive. Note that this is dangerous as it opens the door to accessing freed memory if care isn't taken.

Definition at line 237 of file rs_internal.hpp.

void rs2::software_sensor::on_motion_frame ( rs2_software_motion_frame  frame)
inline

Inject motion frame into the sensor

Parameters
[in]frameall the parameters that required to define motion frame

Definition at line 156 of file rs_internal.hpp.

void rs2::software_sensor::on_notification ( rs2_software_notification  notif)
inline

Definition at line 226 of file rs_internal.hpp.

void rs2::software_sensor::on_pose_frame ( rs2_software_pose_frame  frame)
inline

Inject pose frame into the sensor

Parameters
[in]frameall the parameters that required to define pose frame

Definition at line 168 of file rs_internal.hpp.

void rs2::software_sensor::on_video_frame ( rs2_software_video_frame  frame)
inline

Inject video frame into the sensor

Parameters
[in]frameall the parameters that required to define video frame

Definition at line 144 of file rs_internal.hpp.

void rs2::software_sensor::set_metadata ( rs2_frame_metadata_value  value,
rs2_metadata_type  type 
)
inline

Set frame metadata for the upcoming frames

Parameters
[in]valuemetadata key to set
[in]typemetadata value

Definition at line 180 of file rs_internal.hpp.

void rs2::software_sensor::set_read_only_option ( rs2_option  option,
float  val 
)
inline

Update value of registered read-only option

Parameters
[in]optionthe option
[in]valthe initial value

Definition at line 206 of file rs_internal.hpp.

Friends And Related Function Documentation

friend class software_device
friend

Definition at line 245 of file rs_internal.hpp.


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


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:50:41