Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
librealsense::synthetic_sensor Class Reference

#include <sensor.h>

Inheritance diagram for librealsense::synthetic_sensor:
Inheritance graph
[legend]

Public Member Functions

void close () override
 
frame_callback_ptr get_frames_callback () const override
 
std::shared_ptr< sensor_baseget_raw_sensor () const
 
virtual stream_profiles init_stream_profiles () override
 
bool is_opened () const override
 
bool is_streaming () const override
 
void open (const stream_profiles &requests) override
 
int register_before_streaming_changes_callback (std::function< void(bool)> callback) override
 
void register_metadata (rs2_frame_metadata_value metadata, std::shared_ptr< md_attribute_parser_base > metadata_parser) const override
 
void register_notifications_callback (notifications_callback_ptr callback) override
 
virtual void register_option (rs2_option id, std::shared_ptr< option > option)
 
void register_processing_block (const std::vector< stream_profile > &from, const std::vector< stream_profile > &to, std::function< std::shared_ptr< processing_block >(void)> generate_func)
 
void register_processing_block (const processing_block_factory &pbf)
 
void register_processing_block (const std::vector< processing_block_factory > &pbfs)
 
void register_pu (rs2_option id)
 
void set_frames_callback (frame_callback_ptr callback) override
 
void start (frame_callback_ptr callback) override
 
void stop () override
 
 synthetic_sensor (std::string name, std::shared_ptr< sensor_base > sensor, device *device, const std::map< uint32_t, rs2_format > &fourcc_to_rs2_format_map=std::map< uint32_t, rs2_format >(), const std::map< uint32_t, rs2_stream > &fourcc_to_rs2_stream_map=std::map< uint32_t, rs2_stream >())
 
virtual bool try_register_option (rs2_option id, std::shared_ptr< option > option)
 
bool try_register_pu (rs2_option id)
 
void unregister_before_start_callback (int token) override
 
void unregister_option (rs2_option id)
 
 ~synthetic_sensor () override
 
- Public Member Functions inherited from librealsense::sensor_base
rs2_format fourcc_to_rs2_format (uint32_t format) const
 
rs2_stream fourcc_to_rs2_stream (uint32_t fourcc_format) const
 
stream_profiles get_active_streams () const override
 
device_interfaceget_device () override
 
std::shared_ptr< std::map< uint32_t, rs2_format > > & get_fourcc_to_rs2_format_map ()
 
std::shared_ptr< std::map< uint32_t, rs2_stream > > & get_fourcc_to_rs2_stream_map ()
 
const std::stringget_info (rs2_camera_info info) const override
 
notifications_callback_ptr get_notifications_callback () const override
 
virtual std::shared_ptr< notifications_processorget_notifications_processor () const
 
processing_blocks get_recommended_processing_blocks () const override
 
stream_profiles get_stream_profiles (int tag=profile_tag::PROFILE_TAG_ANY) const override
 
void register_on_open (on_open callback)
 
 sensor_base (std::string name, device *device, recommended_proccesing_blocks_interface *owner)
 
void set_source_owner (sensor_base *owner)
 
bool supports_info (rs2_camera_info info) const override
 
virtual ~sensor_base () override
 
- Public Member Functions inherited from librealsense::sensor_interface
virtual ~sensor_interface ()=default
 
- Public Member Functions inherited from librealsense::info_interface
virtual ~info_interface ()=default
 
- Public Member Functions inherited from librealsense::recordable< info_interface >
virtual ~recordable ()=default
 
- Public Member Functions inherited from librealsense::options_interface
virtual ~options_interface ()=default
 
- Public Member Functions inherited from librealsense::recordable< options_interface >
virtual ~recordable ()=default
 
- Public Member Functions inherited from librealsense::recommended_proccesing_blocks_interface
virtual ~recommended_proccesing_blocks_interface ()=default
 
- Public Member Functions inherited from librealsense::options_container
void create_snapshot (std::shared_ptr< options_interface > &snapshot) const override
 
void enable_recording (std::function< void(const options_interface &)> record_action) override
 
optionget_option (rs2_option id) override
 
const optionget_option (rs2_option id) const override
 
std::shared_ptr< optionget_option_handler (rs2_option id)
 
std::shared_ptr< optionget_option_handler (rs2_option id) const
 
virtual const char * get_option_name (rs2_option option) const override
 
std::vector< rs2_optionget_supported_options () const override
 
void register_option (rs2_option id, std::shared_ptr< option > option)
 
bool supports_option (rs2_option id) const override
 
void unregister_option (rs2_option id)
 
void update (std::shared_ptr< extension_snapshot > ext) override
 
- Public Member Functions inherited from librealsense::extension_snapshot
virtual ~extension_snapshot ()=default
 
- Public Member Functions inherited from librealsense::info_container
void create_snapshot (std::shared_ptr< info_interface > &snapshot) const override
 
void enable_recording (std::function< void(const info_interface &)> record_action) override
 
void register_info (rs2_camera_info info, const std::string &val)
 
void update (std::shared_ptr< extension_snapshot > ext) override
 
void update_info (rs2_camera_info info, const std::string &val)
 
- Public Member Functions inherited from librealsense::recommended_proccesing_blocks_base
virtual void create_snapshot (std::shared_ptr< recommended_proccesing_blocks_interface > &snapshot) const override
 
virtual void enable_recording (std::function< void(const recommended_proccesing_blocks_interface &)> recording_function) override
 
 recommended_proccesing_blocks_base (recommended_proccesing_blocks_interface *owner)
 
- Public Member Functions inherited from librealsense::recordable< recommended_proccesing_blocks_interface >
virtual ~recordable ()=default
 

Protected Member Functions

void add_source_profiles_missing_data ()
 
- Protected Member Functions inherited from librealsense::sensor_base
void assign_stream (const std::shared_ptr< stream_interface > &stream, std::shared_ptr< stream_profile_interface > target) const
 
std::shared_ptr< framegenerate_frame_from_data (const platform::frame_object &fo, frame_timestamp_reader *timestamp_reader, const rs2_time_t &last_timestamp, const unsigned long long &last_frame_number, std::shared_ptr< stream_profile_interface > profile)
 
void raise_on_before_streaming_changes (bool streaming)
 
void set_active_streams (const stream_profiles &requests)
 

Private Member Functions

void add_source_profile_missing_data (std::shared_ptr< stream_profile_interface > &source_profile)
 
std::shared_ptr< stream_profile_interfaceclone_profile (const std::shared_ptr< stream_profile_interface > &profile)
 
std::shared_ptr< stream_profile_interfacefilter_frame_by_requests (const frame_interface *f)
 
std::pair< std::shared_ptr< processing_block_factory >, stream_profilesfind_requests_best_pb_match (const stream_profiles &sp)
 
bool is_duplicated_profile (const std::shared_ptr< stream_profile_interface > &duplicate, const stream_profiles &profiles)
 
void register_processing_block_options (const processing_block &pb)
 
stream_profiles resolve_requests (const stream_profiles &requests)
 
void sort_profiles (stream_profiles *profiles)
 
void unregister_processing_block_options (const processing_block &pb)
 

Private Attributes

std::vector< rs2_option_cached_processing_blocks_options
 
std::unordered_map< rs2_format, stream_profiles_cached_requests
 
std::vector< std::shared_ptr< processing_block_factory > > _pb_factories
 
std::unordered_map< processing_block_factory *, stream_profiles_pbf_supported_profiles
 
frame_callback_ptr _post_process_callback
 
std::unordered_map< std::shared_ptr< stream_profile_interface >, std::unordered_set< std::shared_ptr< processing_block > > > _profiles_to_processing_block
 
std::shared_ptr< sensor_base_raw_sensor
 
std::unordered_map< std::shared_ptr< stream_profile_interface >, stream_profiles_source_to_target_profiles_map
 
std::mutex _synthetic_configure_lock
 
std::unordered_map< stream_profile, stream_profiles_target_to_source_profiles_map
 

Additional Inherited Members

- Protected Attributes inherited from librealsense::sensor_base
std::shared_ptr< std::map< uint32_t, rs2_format > > _fourcc_to_rs2_format
 
std::shared_ptr< std::map< uint32_t, rs2_stream > > _fourcc_to_rs2_stream
 
std::vector< platform::stream_profile_internal_config
 
std::atomic< bool > _is_opened
 
std::atomic< bool > _is_streaming
 
std::shared_ptr< metadata_parser_map_metadata_parsers = nullptr
 
std::shared_ptr< notifications_processor_notifications_processor
 
on_open _on_open
 
device_owner
 
frame_source _source
 
sensor_base_source_owner = nullptr
 
std::vector< platform::stream_profile_uvc_profiles
 
- Protected Attributes inherited from librealsense::options_container
std::map< rs2_option, std::shared_ptr< option > > _options
 
std::function< void(const options_interface &)> _recording_function = [](const options_interface&) {}
 

Detailed Description

Definition at line 188 of file sensor.h.

Constructor & Destructor Documentation

librealsense::synthetic_sensor::synthetic_sensor ( std::string  name,
std::shared_ptr< sensor_base sensor,
device device,
const std::map< uint32_t, rs2_format > &  fourcc_to_rs2_format_map = std::map<uint32_trs2_format>(),
const std::map< uint32_t, rs2_stream > &  fourcc_to_rs2_stream_map = std::map<uint32_trs2_stream>() 
)
explicit

Definition at line 1036 of file sensor.cpp.

librealsense::synthetic_sensor::~synthetic_sensor ( )
override

Definition at line 1053 of file sensor.cpp.

Member Function Documentation

void librealsense::synthetic_sensor::add_source_profile_missing_data ( std::shared_ptr< stream_profile_interface > &  source_profile)
private

Definition at line 1323 of file sensor.cpp.

void librealsense::synthetic_sensor::add_source_profiles_missing_data ( )
protected

Definition at line 1352 of file sensor.cpp.

std::shared_ptr< stream_profile_interface > librealsense::synthetic_sensor::clone_profile ( const std::shared_ptr< stream_profile_interface > &  profile)
private

Definition at line 1156 of file sensor.cpp.

void librealsense::synthetic_sensor::close ( )
overridevirtual

Implements librealsense::sensor_interface.

Definition at line 1452 of file sensor.cpp.

std::shared_ptr< stream_profile_interface > librealsense::synthetic_sensor::filter_frame_by_requests ( const frame_interface f)
private

Definition at line 1476 of file sensor.cpp.

std::pair< std::shared_ptr< processing_block_factory >, stream_profiles > librealsense::synthetic_sensor::find_requests_best_pb_match ( const stream_profiles sp)
private

Definition at line 1291 of file sensor.cpp.

frame_callback_ptr librealsense::synthetic_sensor::get_frames_callback ( ) const
overridevirtual

Reimplemented from librealsense::sensor_base.

Definition at line 1585 of file sensor.cpp.

std::shared_ptr<sensor_base> librealsense::synthetic_sensor::get_raw_sensor ( ) const
inline

Definition at line 218 of file sensor.h.

stream_profiles librealsense::synthetic_sensor::init_stream_profiles ( )
overridevirtual
bool librealsense::synthetic_sensor::is_duplicated_profile ( const std::shared_ptr< stream_profile_interface > &  duplicate,
const stream_profiles profiles 
)
private

Definition at line 1215 of file sensor.cpp.

bool librealsense::synthetic_sensor::is_opened ( ) const
overridevirtual

Reimplemented from librealsense::sensor_base.

Definition at line 1624 of file sensor.cpp.

bool librealsense::synthetic_sensor::is_streaming ( ) const
overridevirtual

Reimplemented from librealsense::sensor_base.

Definition at line 1619 of file sensor.cpp.

void librealsense::synthetic_sensor::open ( const stream_profiles requests)
overridevirtual

Implements librealsense::sensor_interface.

Definition at line 1422 of file sensor.cpp.

int librealsense::synthetic_sensor::register_before_streaming_changes_callback ( std::function< void(bool)>  callback)
overridevirtual

Reimplemented from librealsense::sensor_base.

Definition at line 1603 of file sensor.cpp.

void librealsense::synthetic_sensor::register_metadata ( rs2_frame_metadata_value  metadata,
std::shared_ptr< md_attribute_parser_base metadata_parser 
) const
overridevirtual

Reimplemented from librealsense::sensor_base.

Definition at line 1613 of file sensor.cpp.

void librealsense::synthetic_sensor::register_notifications_callback ( notifications_callback_ptr  callback)
overridevirtual

Reimplemented from librealsense::sensor_base.

Definition at line 1597 of file sensor.cpp.

void librealsense::synthetic_sensor::register_option ( rs2_option  id,
std::shared_ptr< option option 
)
virtual

Definition at line 1070 of file sensor.cpp.

void librealsense::synthetic_sensor::register_processing_block ( const std::vector< stream_profile > &  from,
const std::vector< stream_profile > &  to,
std::function< std::shared_ptr< processing_block >(void)>  generate_func 
)

Definition at line 1567 of file sensor.cpp.

void librealsense::synthetic_sensor::register_processing_block ( const processing_block_factory pbf)

Definition at line 1574 of file sensor.cpp.

void librealsense::synthetic_sensor::register_processing_block ( const std::vector< processing_block_factory > &  pbfs)

Definition at line 1579 of file sensor.cpp.

void librealsense::synthetic_sensor::register_processing_block_options ( const processing_block pb)
private

Definition at line 1181 of file sensor.cpp.

void librealsense::synthetic_sensor::register_pu ( rs2_option  id)

Definition at line 1126 of file sensor.cpp.

stream_profiles librealsense::synthetic_sensor::resolve_requests ( const stream_profiles requests)
private

Definition at line 1364 of file sensor.cpp.

void librealsense::synthetic_sensor::set_frames_callback ( frame_callback_ptr  callback)
overridevirtual

Reimplemented from librealsense::sensor_base.

Definition at line 1590 of file sensor.cpp.

void librealsense::synthetic_sensor::sort_profiles ( stream_profiles profiles)
private

Definition at line 1138 of file sensor.cpp.

void librealsense::synthetic_sensor::start ( frame_callback_ptr  callback)
overridevirtual

Implements librealsense::sensor_interface.

Definition at line 1491 of file sensor.cpp.

void librealsense::synthetic_sensor::stop ( )
overridevirtual

Implements librealsense::sensor_interface.

Definition at line 1561 of file sensor.cpp.

bool librealsense::synthetic_sensor::try_register_option ( rs2_option  id,
std::shared_ptr< option option 
)
virtual

Definition at line 1077 of file sensor.cpp.

bool librealsense::synthetic_sensor::try_register_pu ( rs2_option  id)

Definition at line 1132 of file sensor.cpp.

void librealsense::synthetic_sensor::unregister_before_start_callback ( int  token)
overridevirtual

Reimplemented from librealsense::sensor_base.

Definition at line 1608 of file sensor.cpp.

void librealsense::synthetic_sensor::unregister_option ( rs2_option  id)

Definition at line 1120 of file sensor.cpp.

void librealsense::synthetic_sensor::unregister_processing_block_options ( const processing_block pb)
private

Definition at line 1197 of file sensor.cpp.

Member Data Documentation

std::vector<rs2_option> librealsense::synthetic_sensor::_cached_processing_blocks_options
private

Definition at line 252 of file sensor.h.

std::unordered_map<rs2_format, stream_profiles> librealsense::synthetic_sensor::_cached_requests
private

Definition at line 251 of file sensor.h.

std::vector<std::shared_ptr<processing_block_factory> > librealsense::synthetic_sensor::_pb_factories
private

Definition at line 246 of file sensor.h.

std::unordered_map<processing_block_factory*, stream_profiles> librealsense::synthetic_sensor::_pbf_supported_profiles
private

Definition at line 247 of file sensor.h.

frame_callback_ptr librealsense::synthetic_sensor::_post_process_callback
private

Definition at line 244 of file sensor.h.

std::unordered_map<std::shared_ptr<stream_profile_interface>, std::unordered_set<std::shared_ptr<processing_block> > > librealsense::synthetic_sensor::_profiles_to_processing_block
private

Definition at line 248 of file sensor.h.

std::shared_ptr<sensor_base> librealsense::synthetic_sensor::_raw_sensor
private

Definition at line 245 of file sensor.h.

std::unordered_map<std::shared_ptr<stream_profile_interface>, stream_profiles> librealsense::synthetic_sensor::_source_to_target_profiles_map
private

Definition at line 249 of file sensor.h.

std::mutex librealsense::synthetic_sensor::_synthetic_configure_lock
private

Definition at line 242 of file sensor.h.

std::unordered_map<stream_profile, stream_profiles> librealsense::synthetic_sensor::_target_to_source_profiles_map
private

Definition at line 250 of file sensor.h.


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


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