RsSensor.hh
Go to the documentation of this file.
1 // License: Apache 2.0. See LICENSE file in root directory.
2 // Copyright(c) 2020 Intel Corporation. All Rights Reserved.
3 
4 #pragma once
5 
7 #include <chrono>
10 #include <librealsense2/rs.hpp>
11 #include <unordered_map>
12 
13 typedef struct RsOption
14 {
17 } RsOption;
18 
19 class RsSensor
20 {
21 public:
22  RsSensor(UsageEnvironment* t_env, rs2::sensor t_sensor, rs2::device t_device);
23  int open(std::unordered_map<long long int, rs2::frame_queue>& t_streamProfilesQueues);
24  int start(std::unordered_map<long long int, rs2::frame_queue>& t_streamProfilesQueues);
25  int close();
26  int stop();
28  {
29  return m_sensor;
30  }
31  std::unordered_map<long long int, rs2::video_stream_profile> getStreamProfiles()
32  {
33  return m_streamProfiles;
34  }
35  static long long int getStreamProfileKey(rs2::stream_profile t_profile);
36  std::string getSensorName();
38  {
39  return m_device;
40  }
41  std::vector<RsOption> getSupportedOptions();
42 
43 private:
44  UsageEnvironment* env;
46  std::unordered_map<long long int, rs2::video_stream_profile> m_streamProfiles;
47  std::unordered_map<long long int, std::shared_ptr<ICompression>> m_iCompress;
50  std::unordered_map<long long int, std::chrono::high_resolution_clock::time_point> m_prevSample;
51 };
std::unordered_map< long long int, std::chrono::high_resolution_clock::time_point > m_prevSample
Definition: RsSensor.hh:50
rs2::sensor m_sensor
Definition: RsSensor.hh:45
rs2_option
Defines general configuration controls. These can generally be mapped to camera UVC controls...
Definition: rs_option.h:22
GLsizei const GLchar *const * string
static const textual_icon stop
Definition: model-views.h:225
rs2::device getDevice()
Definition: RsSensor.hh:37
rs2::sensor & getRsSensor()
Definition: RsSensor.hh:27
std::unordered_map< long long int, rs2::video_stream_profile > getStreamProfiles()
Definition: RsSensor.hh:31
struct RsOption RsOption
rs2_option m_opt
Definition: RsSensor.hh:15
std::unordered_map< long long int, rs2::video_stream_profile > m_streamProfiles
Definition: RsSensor.hh:46
GLuint start
MemoryPool * m_memPool
Definition: RsSensor.hh:49
UsageEnvironment * env
Definition: RsSensor.hh:44
std::unordered_map< long long int, std::shared_ptr< ICompression > > m_iCompress
Definition: RsSensor.hh:47
rs2::device m_device
Definition: RsSensor.hh:48
rs2::option_range m_range
Definition: RsSensor.hh:16


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