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

#include <context.h>

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

Public Member Functions

std::shared_ptr< playback_device_infoadd_device (const std::string &file)
 
void add_software_device (std::shared_ptr< device_info > software_device)
 
 context (backend_type type, const char *filename=nullptr, const char *section=nullptr, rs2_recording_mode mode=RS2_RECORDING_MODE_COUNT, std::string min_api_version="0.0.0")
 
std::vector< std::shared_ptr< device_info > > create_devices (platform::backend_device_group devices, const std::map< std::string, std::weak_ptr< device_info >> &playback_devices, int mask) const
 
const platform::backendget_backend () const
 
std::vector< std::shared_ptr< device_info > > query_devices (int mask) const
 
uint64_t register_internal_device_callback (devices_changed_callback_ptr callback)
 
void remove_device (const std::string &file)
 
void set_devices_changed_callback (devices_changed_callback_ptr callback)
 
void stop ()
 
void unregister_internal_device_callback (uint64_t cb_id)
 
 ~context ()
 

Private Member Functions

std::shared_ptr< lazy< rs2_extrinsics > > fetch_edge (int from, int to)
 
int find_stream_profile (const stream_interface &p)
 
void on_device_changed (platform::backend_device_group old, platform::backend_device_group curr, const std::map< std::string, std::weak_ptr< device_info >> &old_playback_devices, const std::map< std::string, std::weak_ptr< device_info >> &new_playback_devices)
 
void raise_devices_changed (const std::vector< rs2_device_info > &removed, const std::vector< rs2_device_info > &added)
 

Private Attributes

std::shared_ptr< platform::backend_backend
 
std::shared_ptr< platform::device_watcher_device_watcher
 
devices_changed_callback_ptr _devices_changed_callback
 
std::map< uint64_t, devices_changed_callback_ptr_devices_changed_callbacks
 
std::mutex _devices_changed_callbacks_mtx
 
std::map< int, std::map< int, std::weak_ptr< lazy< rs2_extrinsics > > > > _extrinsics
 
std::map< std::string, std::weak_ptr< device_info > > _playback_devices
 
std::map< int, std::weak_ptr< const stream_interface > > _streams
 
std::mutex _streams_mutex
 

Detailed Description

Definition at line 106 of file context.h.

Constructor & Destructor Documentation

librealsense::context::context ( backend_type  type,
const char *  filename = nullptr,
const char *  section = nullptr,
rs2_recording_mode  mode = RS2_RECORDING_MODE_COUNT,
std::string  min_api_version = "0.0.0" 
)
explicit

Definition at line 99 of file context.cpp.

librealsense::context::~context ( )

Definition at line 315 of file context.cpp.

Member Function Documentation

std::shared_ptr< playback_device_info > librealsense::context::add_device ( const std::string file)

Definition at line 533 of file context.cpp.

void librealsense::context::add_software_device ( std::shared_ptr< device_info software_device)

Definition at line 549 of file context.cpp.

std::vector< std::shared_ptr< device_info > > librealsense::context::create_devices ( platform::backend_device_group  devices,
const std::map< std::string, std::weak_ptr< device_info >> &  playback_devices,
int  mask 
) const

Definition at line 327 of file context.cpp.

std::shared_ptr<lazy<rs2_extrinsics> > librealsense::context::fetch_edge ( int  from,
int  to 
)
private
int librealsense::context::find_stream_profile ( const stream_interface p)
private
const platform::backend& librealsense::context::get_backend ( ) const
inline

Definition at line 118 of file context.h.

void librealsense::context::on_device_changed ( platform::backend_device_group  old,
platform::backend_device_group  curr,
const std::map< std::string, std::weak_ptr< device_info >> &  old_playback_devices,
const std::map< std::string, std::weak_ptr< device_info >> &  new_playback_devices 
)
private

Definition at line 387 of file context.cpp.

std::vector< std::shared_ptr< device_info > > librealsense::context::query_devices ( int  mask) const

Definition at line 320 of file context.cpp.

void librealsense::context::raise_devices_changed ( const std::vector< rs2_device_info > &  removed,
const std::vector< rs2_device_info > &  added 
)
private

Definition at line 437 of file context.cpp.

uint64_t librealsense::context::register_internal_device_callback ( devices_changed_callback_ptr  callback)

Definition at line 452 of file context.cpp.

void librealsense::context::remove_device ( const std::string file)

Definition at line 564 of file context.cpp.

void librealsense::context::set_devices_changed_callback ( devices_changed_callback_ptr  callback)

Definition at line 467 of file context.cpp.

void librealsense::context::stop ( )
inline

Definition at line 115 of file context.h.

void librealsense::context::unregister_internal_device_callback ( uint64_t  cb_id)

Definition at line 461 of file context.cpp.

Member Data Documentation

std::shared_ptr<platform::backend> librealsense::context::_backend
private

Definition at line 145 of file context.h.

std::shared_ptr<platform::device_watcher> librealsense::context::_device_watcher
private

Definition at line 146 of file context.h.

devices_changed_callback_ptr librealsense::context::_devices_changed_callback
private

Definition at line 150 of file context.h.

std::map<uint64_t, devices_changed_callback_ptr> librealsense::context::_devices_changed_callbacks
private

Definition at line 148 of file context.h.

std::mutex librealsense::context::_devices_changed_callbacks_mtx
private

Definition at line 153 of file context.h.

std::map<int, std::map<int, std::weak_ptr<lazy<rs2_extrinsics> > > > librealsense::context::_extrinsics
private

Definition at line 152 of file context.h.

std::map<std::string, std::weak_ptr<device_info> > librealsense::context::_playback_devices
private

Definition at line 147 of file context.h.

std::map<int, std::weak_ptr<const stream_interface> > librealsense::context::_streams
private

Definition at line 151 of file context.h.

std::mutex librealsense::context::_streams_mutex
private

Definition at line 153 of file context.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:37