Intel® RealSense™ Cross Platform API
Intel Realsense Cross-platform API
rs_sensor.hpp
Go to the documentation of this file.
1 // License: Apache 2.0. See LICENSE file in root directory.
2 // Copyright(c) 2017 Intel Corporation. All Rights Reserved.
3 
4 #ifndef LIBREALSENSE_RS2_SENSOR_HPP
5 #define LIBREALSENSE_RS2_SENSOR_HPP
6 
7 #include "rs_types.hpp"
8 #include "rs_frame.hpp"
9 #include "rs_processing.hpp"
10 #include "rs_options.hpp"
11 namespace rs2
12 {
13 
15  {
16  public:
18  {
19  rs2_error* e = nullptr;
20  _description = rs2_get_notification_description(nt, &e);
21  error::handle(e);
22  _timestamp = rs2_get_notification_timestamp(nt, &e);
23  error::handle(e);
24  _severity = rs2_get_notification_severity(nt, &e);
25  error::handle(e);
26  _category = rs2_get_notification_category(nt, &e);
27  error::handle(e);
28  _serialized_data = rs2_get_notification_serialized_data(nt, &e);
29  error::handle(e);
30  }
31 
32  notification() = default;
33 
39  {
40  return _category;
41  }
46  std::string get_description() const
47  {
48  return _description;
49  }
50 
55  double get_timestamp() const
56  {
57  return _timestamp;
58  }
59 
65  {
66  return _severity;
67  }
68 
73  std::string get_serialized_data() const
74  {
75  return _serialized_data;
76  }
77 
78  private:
79  std::string _description;
80  double _timestamp = -1;
83  std::string _serialized_data;
84  };
85 
86  template<class T>
88  {
89  T on_notification_function;
90  public:
91  explicit notifications_callback(T on_notification) : on_notification_function(on_notification) {}
92 
93  void on_notification(rs2_notification* _notification) override
94  {
95  on_notification_function(notification{ _notification });
96  }
97 
98  void release() override { delete this; }
99  };
100 
101 
102 
103  class sensor : public options
104  {
105  public:
106 
107  using options::supports;
112  void open(const stream_profile& profile) const
113  {
114  rs2_error* e = nullptr;
115  rs2_open(_sensor.get(),
116  profile.get(),
117  &e);
118  error::handle(e);
119  }
120 
126  bool supports(rs2_camera_info info) const
127  {
128  rs2_error* e = nullptr;
129  auto is_supported = rs2_supports_sensor_info(_sensor.get(), info, &e);
130  error::handle(e);
131  return is_supported > 0;
132  }
133 
139  const char* get_info(rs2_camera_info info) const
140  {
141  rs2_error* e = nullptr;
142  auto result = rs2_get_sensor_info(_sensor.get(), info, &e);
143  error::handle(e);
144  return result;
145  }
146 
152  void open(const std::vector<stream_profile>& profiles) const
153  {
154  rs2_error* e = nullptr;
155 
156  std::vector<const rs2_stream_profile*> profs;
157  profs.reserve(profiles.size());
158  for (auto& p : profiles)
159  {
160  profs.push_back(p.get());
161  }
162 
164  profs.data(),
165  static_cast<int>(profiles.size()),
166  &e);
167  error::handle(e);
168  }
169 
174  void close() const
175  {
176  rs2_error* e = nullptr;
177  rs2_close(_sensor.get(), &e);
178  error::handle(e);
179  }
180 
185  template<class T>
186  void start(T callback) const
187  {
188  rs2_error* e = nullptr;
189  rs2_start_cpp(_sensor.get(), new frame_callback<T>(std::move(callback)), &e);
190  error::handle(e);
191  }
192 
196  void stop() const
197  {
198  rs2_error* e = nullptr;
199  rs2_stop(_sensor.get(), &e);
200  error::handle(e);
201  }
202 
207  template<class T>
208  void set_notifications_callback(T callback) const
209  {
210  rs2_error* e = nullptr;
212  new notifications_callback<T>(std::move(callback)), &e);
213  error::handle(e);
214  }
215 
216 
221  std::vector<stream_profile> get_stream_profiles() const
222  {
223  std::vector<stream_profile> results{};
224 
225  rs2_error* e = nullptr;
226  std::shared_ptr<rs2_stream_profile_list> list(
227  rs2_get_stream_profiles(_sensor.get(), &e),
229  error::handle(e);
230 
231  auto size = rs2_get_stream_profiles_count(list.get(), &e);
232  error::handle(e);
233 
234  for (auto i = 0; i < size; i++)
235  {
236  stream_profile profile(rs2_get_stream_profile(list.get(), i, &e));
237  error::handle(e);
238  results.push_back(profile);
239  }
240 
241  return results;
242  }
243 
248  std::vector<stream_profile> get_active_streams() const
249  {
250  std::vector<stream_profile> results{};
251 
252  rs2_error* e = nullptr;
253  std::shared_ptr<rs2_stream_profile_list> list(
254  rs2_get_active_streams(_sensor.get(), &e),
256  error::handle(e);
257 
258  auto size = rs2_get_stream_profiles_count(list.get(), &e);
259  error::handle(e);
260 
261  for (auto i = 0; i < size; i++)
262  {
263  stream_profile profile(rs2_get_stream_profile(list.get(), i, &e));
264  error::handle(e);
265  results.push_back(profile);
266  }
267 
268  return results;
269  }
270 
275  std::vector<filter> get_recommended_filters() const
276  {
277  std::vector<filter> results{};
278 
279  rs2_error* e = nullptr;
280  std::shared_ptr<rs2_processing_block_list> list(
283  error::handle(e);
284 
285  auto size = rs2_get_recommended_processing_blocks_count(list.get(), &e);
286  error::handle(e);
287 
288  for (auto i = 0; i < size; i++)
289  {
290  auto f = std::shared_ptr<rs2_processing_block>(
291  rs2_get_processing_block(list.get(), i, &e),
293  error::handle(e);
294  results.push_back(f);
295  }
296 
297  return results;
298  }
299 
300  sensor& operator=(const std::shared_ptr<rs2_sensor> other)
301  {
302  options::operator=(other);
303  _sensor.reset();
304  _sensor = other;
305  return *this;
306  }
307 
308  sensor& operator=(const sensor& other)
309  {
310  *this = nullptr;
312  _sensor = other._sensor;
313  return *this;
314  }
315  sensor() : _sensor(nullptr) {}
316 
317  operator bool() const
318  {
319  return _sensor != nullptr;
320  }
321 
322  const std::shared_ptr<rs2_sensor>& get() const
323  {
324  return _sensor;
325  }
326 
327  template<class T>
328  bool is() const
329  {
330  T extension(*this);
331  return extension;
332  }
333 
334  template<class T>
335  T as() const
336  {
337  T extension(*this);
338  return extension;
339  }
340 
341  explicit sensor(std::shared_ptr<rs2_sensor> dev)
342  :options((rs2_options*)dev.get()), _sensor(dev)
343  {
344  }
345  explicit operator std::shared_ptr<rs2_sensor>() { return _sensor; }
346 
347  protected:
348  friend context;
349  friend device_list;
350  friend device;
351  friend device_base;
352  friend roi_sensor;
353 
354  std::shared_ptr<rs2_sensor> _sensor;
355 
356 
357  };
358 
359  inline std::shared_ptr<sensor> sensor_from_frame(frame f)
360  {
361  std::shared_ptr<rs2_sensor> psens(f.get_sensor(), rs2_delete_sensor);
362  return std::make_shared<sensor>(psens);
363  }
364 
365  inline bool operator==(const sensor& lhs, const sensor& rhs)
366  {
369  return false;
370 
371  return std::string(lhs.get_info(RS2_CAMERA_INFO_NAME)) == rhs.get_info(RS2_CAMERA_INFO_NAME)
373  }
374 
375  class color_sensor : public sensor
376  {
377  public:
379  : sensor(s.get())
380  {
381  rs2_error* e = nullptr;
383  {
384  _sensor.reset();
385  }
386  error::handle(e);
387  }
388  operator bool() const { return _sensor.get() != nullptr; }
389  };
390 
391  class motion_sensor : public sensor
392  {
393  public:
395  : sensor(s.get())
396  {
397  rs2_error* e = nullptr;
399  {
400  _sensor.reset();
401  }
402  error::handle(e);
403  }
404  operator bool() const { return _sensor.get() != nullptr; }
405  };
406 
407  class fisheye_sensor : public sensor
408  {
409  public:
411  : sensor(s.get())
412  {
413  rs2_error* e = nullptr;
415  {
416  _sensor.reset();
417  }
418  error::handle(e);
419  }
420  operator bool() const { return _sensor.get() != nullptr; }
421  };
422 
423  class roi_sensor : public sensor
424  {
425  public:
427  : sensor(s.get())
428  {
429  rs2_error* e = nullptr;
430  if(rs2_is_sensor_extendable_to(_sensor.get(), RS2_EXTENSION_ROI, &e) == 0 && !e)
431  {
432  _sensor.reset();
433  }
434  error::handle(e);
435  }
436 
438  {
439  rs2_error* e = nullptr;
440  rs2_set_region_of_interest(_sensor.get(), roi.min_x, roi.min_y, roi.max_x, roi.max_y, &e);
441  error::handle(e);
442  }
443 
445  {
446  region_of_interest roi {};
447  rs2_error* e = nullptr;
448  rs2_get_region_of_interest(_sensor.get(), &roi.min_x, &roi.min_y, &roi.max_x, &roi.max_y, &e);
449  error::handle(e);
450  return roi;
451  }
452 
453  operator bool() const { return _sensor.get() != nullptr; }
454  };
455 
456  class depth_sensor : public sensor
457  {
458  public:
460  : sensor(s.get())
461  {
462  rs2_error* e = nullptr;
464  {
465  _sensor.reset();
466  }
467  error::handle(e);
468  }
469 
473  float get_depth_scale() const
474  {
475  rs2_error* e = nullptr;
476  auto res = rs2_get_depth_scale(_sensor.get(), &e);
477  error::handle(e);
478  return res;
479  }
480 
481  operator bool() const { return _sensor.get() != nullptr; }
482  explicit depth_sensor(std::shared_ptr<rs2_sensor> dev) : depth_sensor(sensor(dev)) {}
483  };
484 
486  {
487  public:
489  {
490  rs2_error* e = nullptr;
492  {
493  _sensor.reset();
494  }
495  error::handle(e);
496  }
497 
501  float get_stereo_baseline() const
502  {
503  rs2_error* e = nullptr;
504  auto res = rs2_get_stereo_baseline(_sensor.get(), &e);
505  error::handle(e);
506  return res;
507  }
508 
509  operator bool() const { return _sensor.get() != nullptr; }
510  };
511 
512 
513  class pose_sensor : public sensor
514  {
515  public:
517  : sensor(s.get())
518  {
519  rs2_error* e = nullptr;
521  {
522  _sensor.reset();
523  }
524  error::handle(e);
525  }
526 
536  bool import_localization_map(const std::vector<uint8_t>& lmap_buf) const
537  {
538  rs2_error* e = nullptr;
539  auto res = rs2_import_localization_map(_sensor.get(), lmap_buf.data(), uint32_t(lmap_buf.size()), &e);
540  error::handle(e);
541  return !!res;
542  }
543 
549  std::vector<uint8_t> export_localization_map() const
550  {
551  std::vector<uint8_t> results;
552  rs2_error* e = nullptr;
554  error::handle(e);
555  std::shared_ptr<const rs2_raw_data_buffer> loc_map(map, rs2_delete_raw_data);
556 
557  auto start = rs2_get_raw_data(loc_map.get(), &e);
558  error::handle(e);
559 
560  if (start)
561  {
562  auto size = rs2_get_raw_data_size(loc_map.get(), &e);
563  error::handle(e);
564 
565  results = std::vector<uint8_t>(start, start + size);
566  }
567  return results;
568  }
569 
580  bool set_static_node(const std::string& guid, const rs2_vector& pos, const rs2_quaternion& orient) const
581  {
582  rs2_error* e = nullptr;
583  auto res = rs2_set_static_node(_sensor.get(), guid.c_str(), pos, orient, &e);
584  error::handle(e);
585  return !!res;
586  }
587 
588 
600  bool get_static_node(const std::string& guid, rs2_vector& pos, rs2_quaternion& orient) const
601  {
602  rs2_error* e = nullptr;
603  auto res = rs2_get_static_node(_sensor.get(), guid.c_str(), &pos, &orient, &e);
604  error::handle(e);
605  return !!res;
606  }
607 
612  bool remove_static_node(const std::string& guid) const
613  {
614  rs2_error* e = nullptr;
615  auto res = rs2_remove_static_node(_sensor.get(), guid.c_str(), &e);
616  error::handle(e);
617  return !!res;
618  }
619 
620  operator bool() const { return _sensor.get() != nullptr; }
621  explicit pose_sensor(std::shared_ptr<rs2_sensor> dev) : pose_sensor(sensor(dev)) {}
622  };
623 
624  class wheel_odometer : public sensor
625  {
626  public:
628  : sensor(s.get())
629  {
630  rs2_error* e = nullptr;
632  {
633  _sensor.reset();
634  }
635  error::handle(e);
636  }
637 
642  bool load_wheel_odometery_config(const std::vector<uint8_t>& odometry_config_buf) const
643  {
644  rs2_error* e = nullptr;
645  auto res = rs2_load_wheel_odometry_config(_sensor.get(), odometry_config_buf.data(), uint32_t(odometry_config_buf.size()), &e);
646  error::handle(e);
647  return !!res;
648  }
649 
656  bool send_wheel_odometry(uint8_t wo_sensor_id, uint32_t frame_num, const rs2_vector& translational_velocity)
657  {
658  rs2_error* e = nullptr;
659  auto res = rs2_send_wheel_odometry(_sensor.get(), wo_sensor_id, frame_num, translational_velocity, &e);
660  error::handle(e);
661  return !!res;
662  }
663 
664  operator bool() const { return _sensor.get() != nullptr; }
665  explicit wheel_odometer(std::shared_ptr<rs2_sensor> dev) : wheel_odometer(sensor(dev)) {}
666  };
667 }
668 #endif // LIBREALSENSE_RS2_SENSOR_HPP
notification(rs2_notification *nt)
Definition: rs_sensor.hpp:17
Definition: rs_frame.hpp:22
rs2_camera_info
Read-only strings that can be queried from the device. Not all information attributes are available o...
Definition: rs_sensor.h:22
pose_sensor(std::shared_ptr< rs2_sensor > dev)
Definition: rs_sensor.hpp:621
Definition: rs_sensor.hpp:103
bool operator==(const sensor &lhs, const sensor &rhs)
Definition: rs_sensor.hpp:365
Definition: rs_frame.hpp:336
struct rs2_raw_data_buffer rs2_raw_data_buffer
Definition: rs_types.h:219
Definition: rs_types.hpp:177
float rs2_get_depth_scale(rs2_sensor *sensor, rs2_error **error)
bool supports(rs2_option option) const
Definition: rs_options.hpp:19
friend device
Definition: rs_sensor.hpp:350
void stop() const
Definition: rs_sensor.hpp:196
std::vector< stream_profile > get_stream_profiles() const
Definition: rs_sensor.hpp:221
region_of_interest get_region_of_interest() const
Definition: rs_sensor.hpp:444
Definition: rs_types.h:178
fisheye_sensor(sensor s)
Definition: rs_sensor.hpp:410
void on_notification(rs2_notification *_notification) override
Definition: rs_sensor.hpp:93
Definition: rs_types.hpp:39
Definition: rs_sensor.hpp:456
void start(T callback) const
Definition: rs_sensor.hpp:186
int min_x
Definition: rs_types.hpp:179
Definition: rs_sensor.h:24
int rs2_get_static_node(const rs2_sensor *sensor, const char *guid, rs2_vector *pos, rs2_quaternion *orient, rs2_error **error)
Definition: rs_sensor.hpp:407
void rs2_set_region_of_interest(const rs2_sensor *sensor, int min_x, int min_y, int max_x, int max_y, rs2_error **error)
sets the active region of interest to be used by auto-exposure algorithm
depth_sensor(sensor s)
Definition: rs_sensor.hpp:459
const unsigned char * rs2_get_raw_data(const rs2_raw_data_buffer *buffer, rs2_error **error)
int rs2_import_localization_map(const rs2_sensor *sensor, const unsigned char *lmap_blob, unsigned int blob_size, rs2_error **error)
friend context
Definition: rs_sensor.hpp:348
void rs2_stop(const rs2_sensor *sensor, rs2_error **error)
std::vector< filter > get_recommended_filters() const
Definition: rs_sensor.hpp:275
depth_stereo_sensor(sensor s)
Definition: rs_sensor.hpp:488
std::vector< uint8_t > export_localization_map() const
Definition: rs_sensor.hpp:549
void release() override
Definition: rs_sensor.hpp:98
const char * rs2_get_notification_serialized_data(rs2_notification *notification, rs2_error **error)
Definition: rs_context.hpp:11
bool supports(rs2_camera_info info) const
Definition: rs_sensor.hpp:126
Definition: rs_sensor.h:23
rs2_log_severity rs2_get_notification_severity(rs2_notification *notification, rs2_error **error)
bool get_static_node(const std::string &guid, rs2_vector &pos, rs2_quaternion &orient) const
Definition: rs_sensor.hpp:600
notification()=default
void rs2_delete_raw_data(const rs2_raw_data_buffer *buffer)
Definition: rs_types.h:143
int max_y
Definition: rs_types.hpp:182
sensor(std::shared_ptr< rs2_sensor > dev)
Definition: rs_sensor.hpp:341
friend roi_sensor
Definition: rs_sensor.hpp:352
void set_region_of_interest(const region_of_interest &roi)
Definition: rs_sensor.hpp:437
int max_x
Definition: rs_types.hpp:181
Definition: rs_sensor.hpp:391
rs2_notification_category get_category() const
Definition: rs_sensor.hpp:38
rs2_stream_profile_list * rs2_get_active_streams(rs2_sensor *sensor, rs2_error **error)
int rs2_get_raw_data_size(const rs2_raw_data_buffer *buffer, rs2_error **error)
rs2_stream_profile_list * rs2_get_stream_profiles(rs2_sensor *sensor, rs2_error **error)
void rs2_open(rs2_sensor *device, const rs2_stream_profile *profile, rs2_error **error)
notifications_callback(T on_notification)
Definition: rs_sensor.hpp:91
bool load_wheel_odometery_config(const std::vector< uint8_t > &odometry_config_buf) const
Definition: rs_sensor.hpp:642
Quaternion used to represent rotation.
Definition: rs_types.h:103
Definition: rs_frame.hpp:1135
double get_timestamp() const
Definition: rs_sensor.hpp:55
void open(const stream_profile &profile) const
Definition: rs_sensor.hpp:112
void set_notifications_callback(T callback) const
Definition: rs_sensor.hpp:208
struct rs2_notification rs2_notification
Definition: rs_types.h:245
std::shared_ptr< rs2_sensor > _sensor
Definition: rs_sensor.hpp:354
Definition: rs_types.h:142
bool remove_static_node(const std::string &guid) const
Definition: rs_sensor.hpp:612
Definition: rs_sensor.hpp:14
float rs2_get_stereo_baseline(rs2_sensor *sensor, rs2_error **error)
friend device_base
Definition: rs_sensor.hpp:351
Definition: rs_types.h:153
Definition: rs_types.h:179
int rs2_get_recommended_processing_blocks_count(const rs2_processing_block_list *list, rs2_error **error)
void rs2_delete_sensor(rs2_sensor *sensor)
void rs2_get_region_of_interest(const rs2_sensor *sensor, int *min_x, int *min_y, int *max_x, int *max_y, rs2_error **error)
gets the active region of interest to be used by auto-exposure algorithm
rs2_time_t rs2_get_notification_timestamp(rs2_notification *notification, rs2_error **error)
sensor()
Definition: rs_sensor.hpp:315
int rs2_remove_static_node(const rs2_sensor *sensor, const char *guid, rs2_error **error)
Definition: rs_types.h:180
depth_sensor(std::shared_ptr< rs2_sensor > dev)
Definition: rs_sensor.hpp:482
const rs2_stream_profile * rs2_get_stream_profile(const rs2_stream_profile_list *list, int index, rs2_error **error)
void rs2_set_notifications_callback_cpp(const rs2_sensor *sensor, rs2_notifications_callback *callback, rs2_error **error)
Definition: rs_options.hpp:11
T as() const
Definition: rs_sensor.hpp:335
pose_sensor(sensor s)
Definition: rs_sensor.hpp:516
void rs2_delete_processing_block(rs2_processing_block *block)
int rs2_supports_sensor_info(const rs2_sensor *sensor, rs2_camera_info info, rs2_error **error)
struct rs2_options rs2_options
Definition: rs_types.h:242
void rs2_delete_recommended_processing_blocks(rs2_processing_block_list *list)
bool import_localization_map(const std::vector< uint8_t > &lmap_buf) const
Definition: rs_sensor.hpp:536
Definition: rs_sensor.hpp:87
static void handle(rs2_error *e)
Definition: rs_types.hpp:137
rs2_sensor * get_sensor()
Definition: rs_frame.hpp:438
std::string get_serialized_data() const
Definition: rs_sensor.hpp:73
bool is() const
Definition: rs_sensor.hpp:328
void close() const
Definition: rs_sensor.hpp:174
const rs2_stream_profile * get() const
Definition: rs_frame.hpp:137
Definition: rs_types.h:128
void open(const std::vector< stream_profile > &profiles) const
Definition: rs_sensor.hpp:152
wheel_odometer(sensor s)
Definition: rs_sensor.hpp:627
float get_stereo_baseline() const
Definition: rs_sensor.hpp:501
Definition: rs_types.h:25
int rs2_is_sensor_extendable_to(const rs2_sensor *sensor, rs2_extension extension, rs2_error **error)
3D vector in Euclidean coordinate space
Definition: rs_types.h:97
Definition: rs_types.h:171
rs2_log_severity get_severity() const
Definition: rs_sensor.hpp:64
Definition: rs_sensor.hpp:375
rs2_notification_category
Category of the librealsense notification.
Definition: rs_types.h:17
void rs2_delete_stream_profiles_list(rs2_stream_profile_list *list)
void rs2_close(const rs2_sensor *sensor, rs2_error **error)
bool set_static_node(const std::string &guid, const rs2_vector &pos, const rs2_quaternion &orient) const
Definition: rs_sensor.hpp:580
motion_sensor(sensor s)
Definition: rs_sensor.hpp:394
options & operator=(const options &other)
Definition: rs_options.hpp:134
Definition: rs_sensor.hpp:624
void rs2_open_multiple(rs2_sensor *device, const rs2_stream_profile **profiles, int count, rs2_error **error)
void rs2_start_cpp(const rs2_sensor *sensor, rs2_frame_callback *callback, rs2_error **error)
Definition: rs_sensor.hpp:423
friend device_list
Definition: rs_sensor.hpp:349
rs2_notification_category rs2_get_notification_category(rs2_notification *notification, rs2_error **error)
rs2_processing_block * rs2_get_processing_block(const rs2_processing_block_list *list, int index, rs2_error **error)
bool send_wheel_odometry(uint8_t wo_sensor_id, uint32_t frame_num, const rs2_vector &translational_velocity)
Definition: rs_sensor.hpp:656
int rs2_set_static_node(const rs2_sensor *sensor, const char *guid, const rs2_vector pos, const rs2_quaternion orient, rs2_error **error)
Definition: rs_types.h:170
const rs2_raw_data_buffer * rs2_export_localization_map(const rs2_sensor *sensor, rs2_error **error)
std::string get_description() const
Definition: rs_sensor.hpp:46
float get_depth_scale() const
Definition: rs_sensor.hpp:473
const char * rs2_get_sensor_info(const rs2_sensor *sensor, rs2_camera_info info, rs2_error **error)
sensor & operator=(const sensor &other)
Definition: rs_sensor.hpp:308
const char * rs2_get_notification_description(rs2_notification *notification, rs2_error **error)
int rs2_get_stream_profiles_count(const rs2_stream_profile_list *list, rs2_error **error)
const std::shared_ptr< rs2_sensor > & get() const
Definition: rs_sensor.hpp:322
struct rs2_error rs2_error
Definition: rs_types.h:217
int rs2_load_wheel_odometry_config(const rs2_sensor *sensor, const unsigned char *odometry_config_buf, unsigned int blob_size, rs2_error **error)
rs2_log_severity
Severity of the librealsense logger.
Definition: rs_types.h:121
Definition: rs_sensor.hpp:485
rs2_processing_block_list * rs2_get_recommended_processing_blocks(rs2_sensor *sensor, rs2_error **error)
int rs2_send_wheel_odometry(const rs2_sensor *sensor, char wo_sensor_id, unsigned int frame_num, const rs2_vector translational_velocity, rs2_error **error)
Definition: rs_sensor.hpp:513
color_sensor(sensor s)
Definition: rs_sensor.hpp:378
std::vector< stream_profile > get_active_streams() const
Definition: rs_sensor.hpp:248
sensor & operator=(const std::shared_ptr< rs2_sensor > other)
Definition: rs_sensor.hpp:300
const char * get_info(rs2_camera_info info) const
Definition: rs_sensor.hpp:139
wheel_odometer(std::shared_ptr< rs2_sensor > dev)
Definition: rs_sensor.hpp:665
std::shared_ptr< sensor > sensor_from_frame(frame f)
Definition: rs_sensor.hpp:359
int min_y
Definition: rs_types.hpp:180
roi_sensor(sensor s)
Definition: rs_sensor.hpp:426