Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
librealsense::platform::rs_uvc_device Class Reference

#include <uvc-device.h>

Inheritance diagram for librealsense::platform::rs_uvc_device:
Inheritance graph
[legend]

Public Member Functions

virtual void close (stream_profile profile) override
 
virtual std::string get_device_location () const override
 
virtual power_state get_power_state () const override
 
virtual std::vector< stream_profileget_profiles () const override
 
virtual bool get_pu (rs2_option opt, int32_t &value) const override
 
virtual control_range get_pu_range (rs2_option opt) const override
 
virtual usb_spec get_usb_specification () const override
 
virtual bool get_xu (const extension_unit &xu, uint8_t ctrl, uint8_t *data, int len) const override
 
virtual control_range get_xu_range (const extension_unit &xu, uint8_t ctrl, int len) const override
 
virtual void init_xu (const extension_unit &xu) override
 
virtual void lock () const override
 
virtual void probe_and_commit (stream_profile profile, frame_callback callback, int buffers=DEFAULT_V4L2_FRAME_BUFFERS) override
 
 rs_uvc_device (const rs_usb_device &usb_device, const uvc_device_info &info, uint8_t usb_request_count=2)
 
virtual void set_power_state (power_state state) override
 
virtual bool set_pu (rs2_option opt, int32_t value) override
 
virtual bool set_xu (const extension_unit &xu, uint8_t ctrl, const uint8_t *data, int len) override
 
virtual void start_callbacks () override
 
virtual void stop_callbacks () override
 
virtual void stream_on (std::function< void(const notification &n)> error_handler=[](const notification &n){}) override
 
virtual void unlock () const override
 
virtual ~rs_uvc_device ()
 
- Public Member Functions inherited from librealsense::platform::uvc_device
virtual ~uvc_device ()=default
 

Private Member Functions

void check_connection () const
 
void close_uvc_device ()
 
std::vector< uvc_format_tget_available_formats_all () const
 
int32_t get_data_usb (uvc_req_code action, int control, int unit, unsigned int length=sizeof(uint32_t)) const
 
usb_status get_stream_ctrl_format_size (uvc_format_t format, const std::shared_ptr< uvc_stream_ctrl_t > &control)
 
void listen_to_interrupts ()
 
void play_profile (stream_profile profile, frame_callback callback)
 
usb_status probe_stream_ctrl (const std::shared_ptr< uvc_stream_ctrl_t > &control)
 
usb_status query_stream_ctrl (const std::shared_ptr< uvc_stream_ctrl_t > &control, uint8_t probe, int req)
 
int rs2_option_to_ctrl_selector (rs2_option option, int &unit) const
 
int32_t rs2_value_translate (uvc_req_code action, rs2_option option, int32_t value) const
 
void set_data_usb (uvc_req_code action, int control, int unit, int value) const
 
void stop_stream_cleanup (const stream_profile &profile, std::vector< profile_and_callback >::iterator &elem)
 
bool uvc_get_ctrl (uint8_t unit, uint8_t ctrl, void *data, int len, uvc_req_code req_code) const
 
bool uvc_set_ctrl (uint8_t unit, uint8_t ctrl, void *data, int len)
 

Private Attributes

dispatcher _action_dispatcher
 
std::vector< frame_callback_frame_callbacks
 
const uvc_device_info _info
 
rs_usb_request_callback _interrupt_callback
 
rs_usb_request _interrupt_request
 
std::string _location
 
rs_usb_messenger _messenger
 
std::shared_ptr< uvc_parser_parser
 
power_state _power_state = D3
 
std::vector< stream_profile_profiles
 
std::vector< std::shared_ptr< uvc_streamer > > _streamers
 
std::vector< profile_and_callback_streams
 
rs_usb_device _usb_device = nullptr
 
uint8_t _usb_request_count
 

Friends

class source_reader_callback
 

Additional Inherited Members

- Protected Attributes inherited from librealsense::platform::uvc_device
std::function< void(const notification &n)> _error_handler
 

Detailed Description

Definition at line 36 of file uvc-device.h.

Constructor & Destructor Documentation

librealsense::platform::rs_uvc_device::rs_uvc_device ( const rs_usb_device usb_device,
const uvc_device_info info,
uint8_t  usb_request_count = 2 
)

Definition at line 78 of file uvc-device.cpp.

librealsense::platform::rs_uvc_device::~rs_uvc_device ( )
virtual

Definition at line 88 of file uvc-device.cpp.

Member Function Documentation

void librealsense::platform::rs_uvc_device::check_connection ( ) const
private

Definition at line 903 of file uvc-device.cpp.

void librealsense::platform::rs_uvc_device::close ( stream_profile  profile)
overridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 147 of file uvc-device.cpp.

void librealsense::platform::rs_uvc_device::close_uvc_device ( )
private

Definition at line 688 of file uvc-device.cpp.

std::vector< uvc_format_t > librealsense::platform::rs_uvc_device::get_available_formats_all ( ) const
private

Definition at line 717 of file uvc-device.cpp.

int32_t librealsense::platform::rs_uvc_device::get_data_usb ( uvc_req_code  action,
int  control,
int  unit,
unsigned int  length = sizeof(uint32_t) 
) const
private

Definition at line 484 of file uvc-device.cpp.

std::string librealsense::platform::rs_uvc_device::get_device_location ( ) const
overridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 339 of file uvc-device.cpp.

power_state librealsense::platform::rs_uvc_device::get_power_state ( ) const
overridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 204 of file uvc-device.cpp.

std::vector< stream_profile > librealsense::platform::rs_uvc_device::get_profiles ( ) const
overridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 302 of file uvc-device.cpp.

bool librealsense::platform::rs_uvc_device::get_pu ( rs2_option  opt,
int32_t value 
) const
overridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 256 of file uvc-device.cpp.

control_range librealsense::platform::rs_uvc_device::get_pu_range ( rs2_option  opt) const
overridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 279 of file uvc-device.cpp.

usb_status librealsense::platform::rs_uvc_device::get_stream_ctrl_format_size ( uvc_format_t  format,
const std::shared_ptr< uvc_stream_ctrl_t > &  control 
)
private

Definition at line 746 of file uvc-device.cpp.

usb_spec librealsense::platform::rs_uvc_device::get_usb_specification ( ) const
overridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 344 of file uvc-device.cpp.

bool librealsense::platform::rs_uvc_device::get_xu ( const extension_unit xu,
uint8_t  ctrl,
uint8_t data,
int  len 
) const
overridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 220 of file uvc-device.cpp.

control_range librealsense::platform::rs_uvc_device::get_xu_range ( const extension_unit xu,
uint8_t  ctrl,
int  len 
) const
overridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 225 of file uvc-device.cpp.

void librealsense::platform::rs_uvc_device::init_xu ( const extension_unit xu)
overridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 209 of file uvc-device.cpp.

void librealsense::platform::rs_uvc_device::listen_to_interrupts ( )
private

Definition at line 651 of file uvc-device.cpp.

void librealsense::platform::rs_uvc_device::lock ( ) const
overridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 329 of file uvc-device.cpp.

void librealsense::platform::rs_uvc_device::play_profile ( stream_profile  profile,
frame_callback  callback 
)
private

Definition at line 421 of file uvc-device.cpp.

void librealsense::platform::rs_uvc_device::probe_and_commit ( stream_profile  profile,
frame_callback  callback,
int  buffers = DEFAULT_V4L2_FRAME_BUFFERS 
)
overridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 99 of file uvc-device.cpp.

usb_status librealsense::platform::rs_uvc_device::probe_stream_ctrl ( const std::shared_ptr< uvc_stream_ctrl_t > &  control)
private

Definition at line 701 of file uvc-device.cpp.

usb_status librealsense::platform::rs_uvc_device::query_stream_ctrl ( const std::shared_ptr< uvc_stream_ctrl_t > &  control,
uint8_t  probe,
int  req 
)
private
Todo:
support UVC 1.1
Todo:
support UVC 1.1

Definition at line 788 of file uvc-device.cpp.

int librealsense::platform::rs_uvc_device::rs2_option_to_ctrl_selector ( rs2_option  option,
int &  unit 
) const
private

Definition at line 532 of file uvc-device.cpp.

int32_t librealsense::platform::rs_uvc_device::rs2_value_translate ( uvc_req_code  action,
rs2_option  option,
int32_t  value 
) const
private

Definition at line 351 of file uvc-device.cpp.

void librealsense::platform::rs_uvc_device::set_data_usb ( uvc_req_code  action,
int  control,
int  unit,
int  value 
) const
private

Definition at line 573 of file uvc-device.cpp.

void librealsense::platform::rs_uvc_device::set_power_state ( power_state  state)
overridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 167 of file uvc-device.cpp.

bool librealsense::platform::rs_uvc_device::set_pu ( rs2_option  opt,
int32_t  value 
)
overridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 268 of file uvc-device.cpp.

bool librealsense::platform::rs_uvc_device::set_xu ( const extension_unit xu,
uint8_t  ctrl,
const uint8_t data,
int  len 
)
overridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 215 of file uvc-device.cpp.

void librealsense::platform::rs_uvc_device::start_callbacks ( )
overridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 135 of file uvc-device.cpp.

void librealsense::platform::rs_uvc_device::stop_callbacks ( )
overridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 141 of file uvc-device.cpp.

void librealsense::platform::rs_uvc_device::stop_stream_cleanup ( const stream_profile profile,
std::vector< profile_and_callback >::iterator &  elem 
)
private

Definition at line 466 of file uvc-device.cpp.

void librealsense::platform::rs_uvc_device::stream_on ( std::function< void(const notification &n)>  error_handler = [](const notificationn){})
overridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 108 of file uvc-device.cpp.

void librealsense::platform::rs_uvc_device::unlock ( ) const
overridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 334 of file uvc-device.cpp.

bool librealsense::platform::rs_uvc_device::uvc_get_ctrl ( uint8_t  unit,
uint8_t  ctrl,
void data,
int  len,
uvc_req_code  req_code 
) const
private

Definition at line 605 of file uvc-device.cpp.

bool librealsense::platform::rs_uvc_device::uvc_set_ctrl ( uint8_t  unit,
uint8_t  ctrl,
void data,
int  len 
)
private

Definition at line 628 of file uvc-device.cpp.

Friends And Related Function Documentation

friend class source_reader_callback
friend

Definition at line 69 of file uvc-device.h.

Member Data Documentation

dispatcher librealsense::platform::rs_uvc_device::_action_dispatcher
mutableprivate

Definition at line 107 of file uvc-device.h.

std::vector<frame_callback> librealsense::platform::rs_uvc_device::_frame_callbacks
private

Definition at line 99 of file uvc-device.h.

const uvc_device_info librealsense::platform::rs_uvc_device::_info
private

Definition at line 92 of file uvc-device.h.

rs_usb_request_callback librealsense::platform::rs_uvc_device::_interrupt_callback
private

Definition at line 104 of file uvc-device.h.

rs_usb_request librealsense::platform::rs_uvc_device::_interrupt_request
private

Definition at line 103 of file uvc-device.h.

std::string librealsense::platform::rs_uvc_device::_location
private

Definition at line 97 of file uvc-device.h.

rs_usb_messenger librealsense::platform::rs_uvc_device::_messenger
private

Definition at line 102 of file uvc-device.h.

std::shared_ptr<uvc_parser> librealsense::platform::rs_uvc_device::_parser
private

Definition at line 109 of file uvc-device.h.

power_state librealsense::platform::rs_uvc_device::_power_state = D3
private

Definition at line 93 of file uvc-device.h.

std::vector<stream_profile> librealsense::platform::rs_uvc_device::_profiles
private

Definition at line 98 of file uvc-device.h.

std::vector<std::shared_ptr<uvc_streamer> > librealsense::platform::rs_uvc_device::_streamers
private

Definition at line 110 of file uvc-device.h.

std::vector<profile_and_callback> librealsense::platform::rs_uvc_device::_streams
private

Definition at line 95 of file uvc-device.h.

rs_usb_device librealsense::platform::rs_uvc_device::_usb_device = nullptr
private

Definition at line 101 of file uvc-device.h.

uint8_t librealsense::platform::rs_uvc_device::_usb_request_count
private

Definition at line 105 of file uvc-device.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:39