Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
librealsense::sensor_base Class Referenceabstract

#include <sensor.h>

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

Public Member Functions

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 ()
 
virtual frame_callback_ptr get_frames_callback () const override
 
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
 
virtual stream_profiles init_stream_profiles ()=0
 
virtual bool is_opened () const
 
bool is_streaming () const override
 
int register_before_streaming_changes_callback (std::function< void(bool)> callback) override
 
virtual void register_metadata (rs2_frame_metadata_value metadata, std::shared_ptr< md_attribute_parser_base > metadata_parser) const
 
void register_notifications_callback (notifications_callback_ptr callback) override
 
void register_on_open (on_open callback)
 
 sensor_base (std::string name, device *device, recommended_proccesing_blocks_interface *owner)
 
virtual void set_frames_callback (frame_callback_ptr callback) override
 
void set_source_owner (sensor_base *owner)
 
bool supports_info (rs2_camera_info info) const override
 
void unregister_before_start_callback (int token) override
 
virtual ~sensor_base () override
 
- Public Member Functions inherited from librealsense::sensor_interface
virtual void close ()=0
 
virtual void open (const stream_profiles &requests)=0
 
virtual void start (frame_callback_ptr callback)=0
 
virtual void stop ()=0
 
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 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)
 

Protected Attributes

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&) {}
 

Private Attributes

std::mutex _active_profile_mutex
 
stream_profiles _active_profiles
 
lazy< stream_profiles_profiles
 
signal< sensor_base, bool > on_before_streaming_changes
 

Detailed Description

Definition at line 44 of file sensor.h.

Constructor & Destructor Documentation

librealsense::sensor_base::sensor_base ( std::string  name,
device device,
recommended_proccesing_blocks_interface owner 
)
explicit

Definition at line 27 of file sensor.cpp.

virtual librealsense::sensor_base::~sensor_base ( )
inlineoverridevirtual

Definition at line 51 of file sensor.h.

Member Function Documentation

void librealsense::sensor_base::assign_stream ( const std::shared_ptr< stream_interface > &  stream,
std::shared_ptr< stream_profile_interface target 
) const
protected

Definition at line 184 of file sensor.cpp.

rs2_format librealsense::sensor_base::fourcc_to_rs2_format ( uint32_t  format) const

Definition at line 142 of file sensor.cpp.

rs2_stream librealsense::sensor_base::fourcc_to_rs2_stream ( uint32_t  fourcc_format) const

Definition at line 158 of file sensor.cpp.

std::shared_ptr< frame > librealsense::sensor_base::generate_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 
)
protected

Definition at line 249 of file sensor.cpp.

stream_profiles librealsense::sensor_base::get_active_streams ( ) const
overridevirtual

Implements librealsense::sensor_interface.

Definition at line 60 of file sensor.cpp.

device_interface & librealsense::sensor_base::get_device ( )
overridevirtual

Implements librealsense::sensor_interface.

Definition at line 244 of file sensor.cpp.

std::shared_ptr< std::map< uint32_t, rs2_format > > & librealsense::sensor_base::get_fourcc_to_rs2_format_map ( )

Definition at line 132 of file sensor.cpp.

std::shared_ptr< std::map< uint32_t, rs2_stream > > & librealsense::sensor_base::get_fourcc_to_rs2_stream_map ( )

Definition at line 137 of file sensor.cpp.

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

Implements librealsense::sensor_interface.

Reimplemented in librealsense::synthetic_sensor.

Definition at line 97 of file sensor.cpp.

const std::string & librealsense::sensor_base::get_info ( rs2_camera_info  info) const
overridevirtual

Reimplemented from librealsense::info_container.

Definition at line 49 of file sensor.cpp.

notifications_callback_ptr librealsense::sensor_base::get_notifications_callback ( ) const
overridevirtual

Implements librealsense::sensor_interface.

Definition at line 76 of file sensor.cpp.

std::shared_ptr< notifications_processor > librealsense::sensor_base::get_notifications_processor ( ) const
virtual

Definition at line 116 of file sensor.cpp.

processing_blocks librealsense::sensor_base::get_recommended_processing_blocks ( ) const
inlineoverridevirtual

Reimplemented from librealsense::recommended_proccesing_blocks_base.

Definition at line 77 of file sensor.h.

stream_profiles librealsense::sensor_base::get_stream_profiles ( int  tag = profile_tag::PROFILE_TAG_ANY) const
overridevirtual

Implements librealsense::sensor_interface.

Definition at line 196 of file sensor.cpp.

virtual stream_profiles librealsense::sensor_base::init_stream_profiles ( )
pure virtual
bool librealsense::sensor_base::is_opened ( ) const
virtual

Reimplemented in librealsense::synthetic_sensor.

Definition at line 111 of file sensor.cpp.

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

Implements librealsense::sensor_interface.

Reimplemented in librealsense::synthetic_sensor.

Definition at line 106 of file sensor.cpp.

void librealsense::sensor_base::raise_on_before_streaming_changes ( bool  streaming)
protected

Definition at line 174 of file sensor.cpp.

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

Implements librealsense::sensor_interface.

Reimplemented in librealsense::synthetic_sensor.

Definition at line 81 of file sensor.cpp.

void librealsense::sensor_base::register_metadata ( rs2_frame_metadata_value  metadata,
std::shared_ptr< md_attribute_parser_base metadata_parser 
) const
virtual

Reimplemented in librealsense::synthetic_sensor.

Definition at line 121 of file sensor.cpp.

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

Implements librealsense::sensor_interface.

Reimplemented in librealsense::synthetic_sensor.

Definition at line 66 of file sensor.cpp.

void librealsense::sensor_base::register_on_open ( on_open  callback)
inline

Definition at line 67 of file sensor.h.

void librealsense::sensor_base::set_active_streams ( const stream_profiles requests)
protected

Definition at line 178 of file sensor.cpp.

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

Implements librealsense::sensor_interface.

Reimplemented in librealsense::synthetic_sensor.

Definition at line 101 of file sensor.cpp.

void librealsense::sensor_base::set_source_owner ( sensor_base owner)

Definition at line 191 of file sensor.cpp.

bool librealsense::sensor_base::supports_info ( rs2_camera_info  info) const
overridevirtual

Reimplemented from librealsense::info_container.

Definition at line 55 of file sensor.cpp.

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

Implements librealsense::sensor_interface.

Reimplemented in librealsense::synthetic_sensor.

Definition at line 88 of file sensor.cpp.

Member Data Documentation

std::mutex librealsense::sensor_base::_active_profile_mutex
mutableprivate

Definition at line 120 of file sensor.h.

stream_profiles librealsense::sensor_base::_active_profiles
private

Definition at line 119 of file sensor.h.

std::shared_ptr<std::map<uint32_t, rs2_format> > librealsense::sensor_base::_fourcc_to_rs2_format
protected

Definition at line 114 of file sensor.h.

std::shared_ptr<std::map<uint32_t, rs2_stream> > librealsense::sensor_base::_fourcc_to_rs2_stream
protected

Definition at line 115 of file sensor.h.

std::vector<platform::stream_profile> librealsense::sensor_base::_internal_config
protected

Definition at line 101 of file sensor.h.

std::atomic<bool> librealsense::sensor_base::_is_opened
protected

Definition at line 104 of file sensor.h.

std::atomic<bool> librealsense::sensor_base::_is_streaming
protected

Definition at line 103 of file sensor.h.

std::shared_ptr<metadata_parser_map> librealsense::sensor_base::_metadata_parsers = nullptr
protected

Definition at line 107 of file sensor.h.

std::shared_ptr<notifications_processor> librealsense::sensor_base::_notifications_processor
protected

Definition at line 105 of file sensor.h.

on_open librealsense::sensor_base::_on_open
protected

Definition at line 106 of file sensor.h.

device* librealsense::sensor_base::_owner
protected

Definition at line 111 of file sensor.h.

lazy<stream_profiles> librealsense::sensor_base::_profiles
private

Definition at line 118 of file sensor.h.

frame_source librealsense::sensor_base::_source
protected

Definition at line 110 of file sensor.h.

sensor_base* librealsense::sensor_base::_source_owner = nullptr
protected

Definition at line 109 of file sensor.h.

std::vector<platform::stream_profile> librealsense::sensor_base::_uvc_profiles
protected

Definition at line 112 of file sensor.h.

signal<sensor_base, bool> librealsense::sensor_base::on_before_streaming_changes
private

Definition at line 121 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