Public Member Functions | Protected Attributes | Friends | List of all members
rs2::context Class Reference

#include <rs_context.hpp>

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

Public Member Functions

 context ()
 
 context (std::shared_ptr< rs2_context > ctx)
 
device get_sensor_parent (const sensor &s) const
 
playback load_device (const std::string &file)
 
 operator std::shared_ptr< rs2_context > ()
 
std::vector< sensorquery_all_sensors () const
 Generate a flat list of all available sensors from all RealSense devices. More...
 
device_list query_devices () const
 
device_list query_devices (int mask) const
 
template<class T >
void set_devices_changed_callback (T callback)
 
void unload_device (const std::string &file)
 
void unload_tracking_module ()
 

Protected Attributes

std::shared_ptr< rs2_context_context
 

Friends

class rs2::device_hub
 
class rs2::pipeline
 
class rs2::software_device
 

Detailed Description

default librealsense context class includes realsense API version as provided by RS2_API_VERSION macro

Definition at line 96 of file rs_context.hpp.

Constructor & Destructor Documentation

rs2::context::context ( )
inline

Definition at line 99 of file rs_context.hpp.

rs2::context::context ( std::shared_ptr< rs2_context ctx)
inline

Definition at line 209 of file rs_context.hpp.

Member Function Documentation

device rs2::context::get_sensor_parent ( const sensor s) const
inline

Definition at line 154 of file rs_context.hpp.

playback rs2::context::load_device ( const std::string file)
inline

Creates a device from a RealSense file

On successful load, the device will be appended to the context and a devices_changed event triggered

Parameters
filePath to a RealSense File
Returns
A playback device matching the given file

Definition at line 184 of file rs_context.hpp.

rs2::context::operator std::shared_ptr< rs2_context > ( )
inlineexplicit

Definition at line 212 of file rs_context.hpp.

std::vector<sensor> rs2::context::query_all_sensors ( ) const
inline

Generate a flat list of all available sensors from all RealSense devices.

Returns
List of sensors

Definition at line 142 of file rs_context.hpp.

device_list rs2::context::query_devices ( ) const
inline

create a static snapshot of all connected devices at the time of the call

Returns
the list of devices connected devices at the time of the call

Definition at line 112 of file rs_context.hpp.

device_list rs2::context::query_devices ( int  mask) const
inline

create a static snapshot of all connected devices at the time of the call

Returns
the list of devices connected devices at the time of the call

Definition at line 127 of file rs_context.hpp.

template<class T >
void rs2::context::set_devices_changed_callback ( callback)
inline

register devices changed callback

Parameters
[in]callbackdevices changed callback

Definition at line 169 of file rs_context.hpp.

void rs2::context::unload_device ( const std::string file)
inline

Definition at line 195 of file rs_context.hpp.

void rs2::context::unload_tracking_module ( )
inline

Definition at line 202 of file rs_context.hpp.

Friends And Related Function Documentation

friend class rs2::device_hub
friend

Definition at line 215 of file rs_context.hpp.

friend class rs2::pipeline
friend

Definition at line 212 of file rs_context.hpp.

friend class rs2::software_device
friend

Definition at line 216 of file rs_context.hpp.

Member Data Documentation

std::shared_ptr<rs2_context> rs2::context::_context
protected

Definition at line 218 of file rs_context.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 Sat Apr 3 2021 02:51:28