rs_internal.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_INTERNAL_HPP
5 #define LIBREALSENSE_RS2_INTERNAL_HPP
6 
7 #include "rs_types.hpp"
8 #include "rs_device.hpp"
9 #include "rs_context.hpp"
10 #include "../h/rs_internal.h"
11 
12 namespace rs2
13 {
14  class recording_context : public context
15  {
16  public:
22  const std::string& section = "",
24  {
25  rs2_error* e = nullptr;
26  _context = std::shared_ptr<rs2_context>(
27  rs2_create_recording_context(RS2_API_VERSION, filename.c_str(), section.c_str(), mode, &e),
29  error::handle(e);
30  }
31 
32  recording_context() = delete;
33  };
34 
35  class mock_context : public context
36  {
37  public:
44  const std::string& section = "",
45  const std::string& min_api_version = "0.0.0")
46  {
47  rs2_error* e = nullptr;
48  _context = std::shared_ptr<rs2_context>(
49  rs2_create_mock_context_versioned(RS2_API_VERSION, filename.c_str(), section.c_str(), min_api_version.c_str(), &e),
51  error::handle(e);
52  }
53 
54  mock_context() = delete;
55  };
56 
57  namespace internal
58  {
62  inline double get_time()
63  {
64  rs2_error* e = nullptr;
65  auto time = rs2_get_time( &e);
66 
67  error::handle(e);
68 
69  return time;
70  }
71  }
72 
73  template<class T>
75  {
77  public:
78  explicit software_device_destruction_callback(T on_destruction) : on_destruction_function(on_destruction) {}
79 
80  void on_destruction() override
81  {
82  on_destruction_function();
83  }
84 
85  void release() override { delete this; }
86  };
87 
88  class software_sensor : public sensor
89  {
90  public:
96  stream_profile add_video_stream(rs2_video_stream video_stream, bool is_default=false)
97  {
98  rs2_error* e = nullptr;
99 
100  auto profile = rs2_software_sensor_add_video_stream_ex(_sensor.get(), video_stream, is_default, &e);
101  error::handle(e);
102 
104  return stream;
105  }
106 
112  stream_profile add_motion_stream(rs2_motion_stream motion_stream, bool is_default=false)
113  {
114  rs2_error* e = nullptr;
115 
116  auto profile = rs2_software_sensor_add_motion_stream_ex(_sensor.get(), motion_stream, is_default, &e);
117  error::handle(e);
118 
120  return stream;
121  }
122 
128  stream_profile add_pose_stream(rs2_pose_stream pose_stream, bool is_default=false)
129  {
130  rs2_error* e = nullptr;
131 
132  auto profile = rs2_software_sensor_add_pose_stream_ex(_sensor.get(), pose_stream, is_default, &e);
133  error::handle(e);
134 
136  return stream;
137  }
138 
145  {
146  rs2_error* e = nullptr;
147  rs2_software_sensor_on_video_frame(_sensor.get(), frame, &e);
148  error::handle(e);
149  }
150 
157  {
158  rs2_error* e = nullptr;
159  rs2_software_sensor_on_motion_frame(_sensor.get(), frame, &e);
160  error::handle(e);
161  }
162 
169  {
170  rs2_error* e = nullptr;
171  rs2_software_sensor_on_pose_frame(_sensor.get(), frame, &e);
172  error::handle(e);
173  }
174 
181  {
182  rs2_error* e = nullptr;
183  rs2_software_sensor_set_metadata(_sensor.get(), value, type, &e);
184  error::handle(e);
185  }
186 
194  {
195  rs2_error* e = nullptr;
197  error::handle(e);
198  }
199 
207  {
208  rs2_error* e = nullptr;
210  error::handle(e);
211  }
218  void add_option(rs2_option option, const option_range& range, bool is_writable=true)
219  {
220  rs2_error* e = nullptr;
221  rs2_software_sensor_add_option(_sensor.get(), option, range.min,
222  range.max, range.step, range.def, is_writable, &e);
223  error::handle(e);
224  }
225 
227  {
228  rs2_error * e = nullptr;
229  rs2_software_sensor_on_notification(_sensor.get(), notif, &e);
230  error::handle(e);
231  }
237  void detach()
238  {
239  rs2_error * e = nullptr;
240  rs2_software_sensor_detach(_sensor.get(), &e);
241  error::handle(e);
242  }
243 
244  private:
245  friend class software_device;
246 
247  software_sensor(std::shared_ptr<rs2_sensor> s)
248  : rs2::sensor(s)
249  {
250  rs2_error* e = nullptr;
251  if (rs2_is_sensor_extendable_to(_sensor.get(), RS2_EXTENSION_SOFTWARE_SENSOR, &e) == 0 && !e)
252  {
253  _sensor = nullptr;
254  }
256  }
257  };
258 
259 
260  class software_device : public device
261  {
262  std::shared_ptr<rs2_device> create_device_ptr(std::function<void(rs2_device*)> deleter)
263  {
264  rs2_error* e = nullptr;
265  std::shared_ptr<rs2_device> dev(
267  deleter);
268  error::handle(e);
269  return dev;
270  }
271 
272  public:
273  software_device(std::function<void(rs2_device*)> deleter = &rs2_delete_device)
274  : device(create_device_ptr(deleter))
275  {
276  this->set_destruction_callback([]{});
277  }
278 
280  : device(create_device_ptr(&rs2_delete_device))
281  {
282  update_info(RS2_CAMERA_INFO_NAME, name);
283  }
284 
291  {
292  rs2_error* e = nullptr;
293  std::shared_ptr<rs2_sensor> sensor(
294  rs2_software_device_add_sensor(_dev.get(), name.c_str(), &e),
296  error::handle(e);
297 
298  return software_sensor(sensor);
299  }
300 
305  template<class T>
307  {
308  rs2_error* e = nullptr;
311  error::handle(e);
312  }
313 
322  {
323  rs2_error* e = nullptr;
324  rs2_context_add_software_device(ctx._context.get(), _dev.get(), &e);
325  error::handle(e);
326  }
327 
335  {
336  rs2_error* e = nullptr;
337  rs2_software_device_register_info(_dev.get(), info, val.c_str(), &e);
338  error::handle(e);
339  }
340 
348  {
349  rs2_error* e = nullptr;
350  rs2_software_device_update_info(_dev.get(), info, val.c_str(), &e);
351  error::handle(e);
352  }
353 
359  {
360  rs2_error* e = nullptr;
361  rs2_software_device_create_matcher(_dev.get(), matcher, &e);
362  error::handle(e);
363  }
364  };
365 
367  {
368  public:
369  explicit firmware_log_message(std::shared_ptr<rs2_firmware_log_message> msg) :
370  _fw_log_message(msg) {}
371 
373  rs2_error* e = nullptr;
374  rs2_log_severity severity = rs2_fw_log_message_severity(_fw_log_message.get(), &e);
375  error::handle(e);
376  return severity;
377  }
379  return rs2_log_severity_to_string(get_severity());
380  }
381 
383  {
384  rs2_error* e = nullptr;
385  uint32_t timestamp = rs2_fw_log_message_timestamp(_fw_log_message.get(), &e);
386  error::handle(e);
387  return timestamp;
388  }
389 
390  int size() const
391  {
392  rs2_error* e = nullptr;
393  int size = rs2_fw_log_message_size(_fw_log_message.get(), &e);
394  error::handle(e);
395  return size;
396  }
397 
398  std::vector<uint8_t> data() const
399  {
400  rs2_error* e = nullptr;
401  auto size = rs2_fw_log_message_size(_fw_log_message.get(), &e);
402  error::handle(e);
403  std::vector<uint8_t> result;
404  if (size > 0)
405  {
406  auto start = rs2_fw_log_message_data(_fw_log_message.get(), &e);
407  error::handle(e);
408  result.insert(result.begin(), start, start + size);
409  }
410  return result;
411  }
412 
413  const std::shared_ptr<rs2_firmware_log_message> get_message() const { return _fw_log_message; }
414 
415  private:
416  std::shared_ptr<rs2_firmware_log_message> _fw_log_message;
417  };
418 
420  {
421  public:
422  explicit firmware_log_parsed_message(std::shared_ptr<rs2_firmware_log_parsed_message> msg) :
423  _parsed_fw_log(msg) {}
424 
426  {
427  rs2_error* e = nullptr;
428  std::string msg(rs2_get_fw_log_parsed_message(_parsed_fw_log.get(), &e));
429  error::handle(e);
430  return msg;
431  }
433  {
434  rs2_error* e = nullptr;
435  std::string file_name(rs2_get_fw_log_parsed_file_name(_parsed_fw_log.get(), &e));
436  error::handle(e);
437  return file_name;
438  }
440  {
441  rs2_error* e = nullptr;
442  std::string thread_name(rs2_get_fw_log_parsed_thread_name(_parsed_fw_log.get(), &e));
443  error::handle(e);
444  return thread_name;
445  }
447  {
448  rs2_error* e = nullptr;
449  rs2_log_severity sev = rs2_get_fw_log_parsed_severity(_parsed_fw_log.get(), &e);
450  error::handle(e);
452  }
453  uint32_t line() const
454  {
455  rs2_error* e = nullptr;
456  uint32_t line(rs2_get_fw_log_parsed_line(_parsed_fw_log.get(), &e));
457  error::handle(e);
458  return line;
459  }
461  {
462  rs2_error* e = nullptr;
463  uint32_t timestamp(rs2_get_fw_log_parsed_timestamp(_parsed_fw_log.get(), &e));
464  error::handle(e);
465  return timestamp;
466  }
467 
469  {
470  rs2_error* e = nullptr;
471  uint32_t sequence(rs2_get_fw_log_parsed_sequence_id(_parsed_fw_log.get(), &e));
472  error::handle(e);
473  return sequence;
474  }
475 
476  const std::shared_ptr<rs2_firmware_log_parsed_message> get_message() const { return _parsed_fw_log; }
477 
478  private:
479  std::shared_ptr<rs2_firmware_log_parsed_message> _parsed_fw_log;
480  };
481 
482  class firmware_logger : public device
483  {
484  public:
486  : device(d.get())
487  {
488  rs2_error* e = nullptr;
489  if (rs2_is_device_extendable_to(_dev.get(), RS2_EXTENSION_FW_LOGGER, &e) == 0 && !e)
490  {
491  _dev.reset();
492  }
493  error::handle(e);
494  }
495 
497  {
498  rs2_error* e = nullptr;
499  std::shared_ptr<rs2_firmware_log_message> msg(
500  rs2_create_fw_log_message(_dev.get(), &e),
502  error::handle(e);
503 
504  return firmware_log_message(msg);
505  }
506 
508  {
509  rs2_error* e = nullptr;
510  std::shared_ptr<rs2_firmware_log_parsed_message> msg(
511  rs2_create_fw_log_parsed_message(_dev.get(), &e),
513  error::handle(e);
514 
515  return firmware_log_parsed_message(msg);
516  }
517 
519  {
520  rs2_error* e = nullptr;
521  rs2_firmware_log_message* m = msg.get_message().get();
522  bool fw_log_pulling_status =
523  rs2_get_fw_log(_dev.get(), m, &e);
524 
525  error::handle(e);
526 
527  return fw_log_pulling_status;
528  }
529 
531  {
532  rs2_error* e = nullptr;
533  rs2_firmware_log_message* m = msg.get_message().get();
534  bool flash_log_pulling_status =
535  rs2_get_flash_log(_dev.get(), m, &e);
536 
537  error::handle(e);
538 
539  return flash_log_pulling_status;
540  }
541 
542  bool init_parser(const std::string& xml_content)
543  {
544  rs2_error* e = nullptr;
545 
546  bool parser_initialized = rs2_init_fw_log_parser(_dev.get(), xml_content.c_str(), &e);
547  error::handle(e);
548 
549  return parser_initialized;
550  }
551 
553  {
554  rs2_error* e = nullptr;
555 
556  bool parsingResult = rs2_parse_firmware_log(_dev.get(), msg.get_message().get(), parsed_msg.get_message().get(), &e);
557  error::handle(e);
558 
559  return parsingResult;
560  }
561 
562  unsigned int get_number_of_fw_logs() const
563  {
564  rs2_error* e = nullptr;
565  unsigned int num_of_fw_logs = rs2_get_number_of_fw_logs(_dev.get(), &e);
566  error::handle(e);
567 
568  return num_of_fw_logs;
569  }
570  };
571 
573  {
574  public:
575  terminal_parser(const std::string& xml_content)
576  {
577  rs2_error* e = nullptr;
578 
579  _terminal_parser = std::shared_ptr<rs2_terminal_parser>(
580  rs2_create_terminal_parser(xml_content.c_str(), &e),
582  error::handle(e);
583  }
584 
585  std::vector<uint8_t> parse_command(const std::string& command)
586  {
587  rs2_error* e = nullptr;
588 
589  std::shared_ptr<const rs2_raw_data_buffer> list(
590  rs2_terminal_parse_command(_terminal_parser.get(), command.c_str(), (unsigned int)command.size(), &e),
592  error::handle(e);
593 
594  auto size = rs2_get_raw_data_size(list.get(), &e);
595  error::handle(e);
596 
597  auto start = rs2_get_raw_data(list.get(), &e);
598 
599  std::vector<uint8_t> results;
600  results.insert(results.begin(), start, start + size);
601 
602  return results;
603  }
604 
605  std::string parse_response(const std::string& command, const std::vector<uint8_t>& response)
606  {
607  rs2_error* e = nullptr;
608 
609  std::shared_ptr<const rs2_raw_data_buffer> list(
610  rs2_terminal_parse_response(_terminal_parser.get(), command.c_str(), (unsigned int)command.size(),
611  (void*)response.data(), (unsigned int)response.size(), &e),
613  error::handle(e);
614 
615  auto size = rs2_get_raw_data_size(list.get(), &e);
616  error::handle(e);
617 
618  auto start = rs2_get_raw_data(list.get(), &e);
619 
620  std::string results;
621  results.insert(results.begin(), start, start + size);
622 
623  return results;
624  }
625 
626  private:
627  std::shared_ptr<rs2_terminal_parser> _terminal_parser;
628  };
629 
630 }
631 #endif // LIBREALSENSE_RS2_INTERNAL_HPP
unsigned int get_number_of_fw_logs() const
void rs2_software_sensor_set_metadata(rs2_sensor *sensor, rs2_frame_metadata_value value, rs2_metadata_type type, rs2_error **error)
Definition: rs.cpp:2506
void rs2_software_device_set_destruction_callback_cpp(const rs2_device *dev, rs2_software_device_destruction_callback *callback, rs2_error **error)
Definition: rs.cpp:814
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
rs2::firmware_log_message create_message()
recording_context(const std::string &filename, const std::string &section="", rs2_recording_mode mode=RS2_RECORDING_MODE_BLANK_FRAMES)
Definition: rs_internal.hpp:21
stream_profile add_pose_stream(rs2_pose_stream pose_stream, bool is_default=false)
rs2_log_severity get_severity() const
#define RS2_API_VERSION
Definition: rs.h:41
GLenum GLuint GLenum severity
GLuint const GLchar * name
const std::shared_ptr< rs2_firmware_log_message > get_message() const
rs2_option
Defines general configuration controls. These can generally be mapped to camera UVC controls...
Definition: rs_option.h:22
GLdouble s
terminal_parser(const std::string &xml_content)
const GLfloat * m
Definition: glext.h:6814
std::shared_ptr< rs2_firmware_log_parsed_message > _parsed_fw_log
std::vector< uint8_t > parse_command(const std::string &command)
void register_info(rs2_camera_info info, const std::string &val)
bool get_firmware_log(rs2::firmware_log_message &msg) const
rs2_recording_mode
Definition: rs_internal.h:32
rs2_stream_profile * rs2_software_sensor_add_pose_stream_ex(rs2_sensor *sensor, rs2_pose_stream pose_stream, int is_default, rs2_error **error)
Definition: rs.cpp:2554
void rs2_software_sensor_add_option(rs2_sensor *sensor, rs2_option option, float min, float max, float step, float def, int is_writable, rs2_error **error)
Definition: rs.cpp:2578
void rs2_delete_device(rs2_device *device)
Definition: rs.cpp:301
GLfloat value
void rs2_delete_context(rs2_context *context)
Frees the relevant context object.
Definition: rs.cpp:171
void on_video_frame(rs2_software_video_frame frame)
const char * rs2_get_fw_log_parsed_thread_name(rs2_firmware_log_parsed_message *fw_log_parsed_msg, rs2_error **error)
Gets RealSense firmware log parsed message thread name.
Definition: rs.cpp:3325
All the parameters required to define a video stream.
Definition: rs_internal.h:41
void set_metadata(rs2_frame_metadata_value value, rs2_metadata_type type)
All the parameters required to define a pose frame.
Definition: rs_internal.h:100
const unsigned char * rs2_get_raw_data(const rs2_raw_data_buffer *buffer, rs2_error **error)
Definition: rs.cpp:567
int rs2_fw_log_message_size(rs2_firmware_log_message *msg, rs2_error **error)
Gets RealSense firmware log message size.
Definition: rs.cpp:3240
software_device_destruction_callback(T on_destruction)
Definition: rs_internal.hpp:78
unsigned int rs2_get_fw_log_parsed_sequence_id(rs2_firmware_log_parsed_message *fw_log_parsed_msg, rs2_error **error)
Gets RealSense firmware log parsed message sequence id - cyclic number of FW log with [0...
Definition: rs.cpp:3353
std::string parse_response(const std::string &command, const std::vector< uint8_t > &response)
unsigned int rs2_fw_log_message_timestamp(rs2_firmware_log_message *msg, rs2_error **error)
Gets RealSense firmware log message timestamp.
Definition: rs.cpp:3253
Definition: cah-model.h:10
GLsizei const GLchar *const * string
d
Definition: rmse.py:171
void on_motion_frame(rs2_software_motion_frame frame)
void rs2_delete_raw_data(const rs2_raw_data_buffer *buffer)
Definition: rs.cpp:581
software_sensor add_sensor(std::string name)
software_device(std::function< void(rs2_device *)> deleter=&rs2_delete_device)
GLuint GLuint stream
Definition: glext.h:1790
uint32_t get_timestamp() const
e
Definition: rmse.py:177
stream_profile add_motion_stream(rs2_motion_stream motion_stream, bool is_default=false)
void set_read_only_option(rs2_option option, float val)
int rs2_get_raw_data_size(const rs2_raw_data_buffer *buffer, rs2_error **error)
Definition: rs.cpp:574
std::string severity() const
bool parse_log(const rs2::firmware_log_message &msg, const rs2::firmware_log_parsed_message &parsed_msg)
void rs2_delete_fw_log_parsed_message(rs2_firmware_log_parsed_message *fw_log_parsed_msg)
Deletes RealSense firmware log parsed message.
Definition: rs.cpp:3304
GLuint GLfloat * val
rs2_context * rs2_create_recording_context(int api_version, const char *filename, const char *section, rs2_recording_mode mode, rs2_error **error)
Definition: rs.cpp:1194
def info(name, value, persistent=False)
Definition: test.py:301
rs2::firmware_log_parsed_message create_parsed_message()
unsigned int rs2_get_fw_log_parsed_line(rs2_firmware_log_parsed_message *fw_log_parsed_msg, rs2_error **error)
Gets RealSense firmware log parsed message relevant line (in the file that is returned by rs2_get_fw_...
Definition: rs.cpp:3339
firmware_log_parsed_message(std::shared_ptr< rs2_firmware_log_parsed_message > msg)
GLenum mode
void rs2_software_sensor_detach(rs2_sensor *sensor, rs2_error **error)
Definition: rs.cpp:2589
rs2_stream_profile * rs2_software_sensor_add_video_stream_ex(rs2_sensor *sensor, rs2_video_stream video_stream, int is_default, rs2_error **error)
Definition: rs.cpp:2522
int rs2_get_flash_log(rs2_device *dev, rs2_firmware_log_message *fw_log_msg, rs2_error **error)
Gets RealSense flash log - this is a fw log that has been written in the device during the previous s...
Definition: rs.cpp:3211
GLuint GLenum option
Definition: glext.h:5923
firmware_log_message(std::shared_ptr< rs2_firmware_log_message > msg)
Definition: getopt.h:41
rs2_time_t rs2_get_time(rs2_error **error)
Definition: rs.cpp:2422
GLsizeiptr size
rs2_log_severity rs2_fw_log_message_severity(const rs2_firmware_log_message *msg, rs2_error **error)
Gets RealSense firmware log message severity.
Definition: rs.cpp:3247
std::string thread_name() const
std::shared_ptr< rs2_context > _context
Definition: rs_context.hpp:218
All the parameters required to define a pose stream.
Definition: rs_internal.h:66
void rs2_delete_sensor(rs2_sensor *sensor)
Definition: rs.cpp:320
unsigned int uint32_t
Definition: stdint.h:80
rs2_matchers
Specifies types of different matchers.
Definition: rs_types.h:230
rs2_raw_data_buffer * rs2_terminal_parse_response(rs2_terminal_parser *terminal_parser, const char *command, unsigned int size_of_command, const void *response, unsigned int size_of_response, rs2_error **error)
Parses terminal response via RealSense terminal parser.
Definition: rs.cpp:3389
int rs2_is_device_extendable_to(const rs2_device *device, rs2_extension extension, rs2_error **error)
Definition: rs.cpp:1425
std::shared_ptr< rs2_device > create_device_ptr(std::function< void(rs2_device *)> deleter)
void rs2_software_sensor_on_pose_frame(rs2_sensor *sensor, rs2_software_pose_frame frame, rs2_error **error)
Definition: rs.cpp:2490
rs2_device * rs2_create_software_device(rs2_error **error)
Definition: rs.cpp:2428
void rs2_software_sensor_add_read_only_option(rs2_sensor *sensor, rs2_option option, float val, rs2_error **error)
Definition: rs.cpp:2562
Definition: api.h:28
def callback(frame)
Definition: t265_stereo.py:91
std::shared_ptr< rs2_terminal_parser > _terminal_parser
const char * rs2_get_fw_log_parsed_message(rs2_firmware_log_parsed_message *fw_log_parsed_msg, rs2_error **error)
Gets RealSense firmware log parsed message.
Definition: rs.cpp:3311
GLuint start
void create_matcher(rs2_matchers matcher)
All the parameters required to define a motion stream.
Definition: rs_internal.h:55
BOOST_DEDUCED_TYPENAME optional< T >::reference_const_type get(optional< T > const &opt)
std::string message() const
unsigned int rs2_get_fw_log_parsed_timestamp(rs2_firmware_log_parsed_message *fw_log_parsed_msg, rs2_error **error)
Gets RealSense firmware log parsed message timestamp.
Definition: rs.cpp:3346
std::shared_ptr< rs2_firmware_log_message > _fw_log_message
rs2_stream_profile * rs2_software_sensor_add_motion_stream_ex(rs2_sensor *sensor, rs2_motion_stream motion_stream, int is_default, rs2_error **error)
Definition: rs.cpp:2538
void update_info(rs2_camera_info info, const std::string &val)
rs2_raw_data_buffer * rs2_terminal_parse_command(rs2_terminal_parser *terminal_parser, const char *command, unsigned int size_of_command, rs2_error **error)
Parses terminal command via RealSense terminal parser.
Definition: rs.cpp:3374
std::string get_severity_str() const
static void handle(rs2_error *e)
Definition: rs_types.hpp:144
rs2_sensor * rs2_software_device_add_sensor(rs2_device *dev, const char *sensor_name, rs2_error **error)
Definition: rs.cpp:2463
void rs2_software_sensor_update_read_only_option(rs2_sensor *sensor, rs2_option option, float val, rs2_error **error)
Definition: rs.cpp:2570
void rs2_software_sensor_on_notification(rs2_sensor *sensor, rs2_software_notification notif, rs2_error **error)
Definition: rs.cpp:2498
bool get_flash_log(rs2::firmware_log_message &msg) const
void set_destruction_callback(T callback) const
void on_notification(rs2_software_notification notif)
void add_to(context &ctx)
void rs2_software_device_create_matcher(rs2_device *dev, rs2_matchers matcher, rs2_error **error)
Definition: rs.cpp:2435
software_sensor(std::shared_ptr< rs2_sensor > s)
int rs2_is_sensor_extendable_to(const rs2_sensor *sensor, rs2_extension extension, rs2_error **error)
Definition: rs.cpp:1394
void rs2_delete_terminal_parser(rs2_terminal_parser *terminal_parser)
Deletes RealSense terminal parser.
Definition: rs.cpp:3367
int rs2_init_fw_log_parser(rs2_device *dev, const char *xml_content, rs2_error **error)
Initializes RealSense firmware logs parser in device.
Definition: rs.cpp:3260
All the parameters required to define a sensor notification.
Definition: rs_internal.h:122
long long rs2_metadata_type
Definition: rs_types.h:301
GLenum type
rs2_context * rs2_create_mock_context_versioned(int api_version, const char *filename, const char *section, const char *min_api_version, rs2_error **error)
Definition: rs.cpp:1204
const std::shared_ptr< rs2_firmware_log_parsed_message > get_message() const
void on_pose_frame(rs2_software_pose_frame frame)
void rs2_delete_fw_log_message(rs2_firmware_log_message *msg)
Definition: rs.cpp:3226
void rs2_context_add_software_device(rs2_context *ctx, rs2_device *dev, rs2_error **error)
Definition: rs.cpp:1529
All the parameters required to define a motion frame.
Definition: rs_internal.h:89
void rs2_software_sensor_on_motion_frame(rs2_sensor *sensor, rs2_software_motion_frame frame, rs2_error **error)
Definition: rs.cpp:2482
typename::boost::move_detail::remove_reference< T >::type && move(T &&t) BOOST_NOEXCEPT
software_device(std::string name)
void add_option(rs2_option option, const option_range &range, bool is_writable=true)
GLsizei range
rs2_log_severity rs2_get_fw_log_parsed_severity(rs2_firmware_log_parsed_message *fw_log_parsed_msg, rs2_error **error)
Gets RealSense firmware log parsed message severity.
Definition: rs.cpp:3332
bool init_parser(const std::string &xml_content)
rs2_firmware_log_message * rs2_create_fw_log_message(rs2_device *dev, rs2_error **error)
Creates RealSense firmware log message.
Definition: rs.cpp:3186
void add_read_only_option(rs2_option option, float val)
std::string file_name() const
void rs2_software_sensor_on_video_frame(rs2_sensor *sensor, rs2_software_video_frame frame, rs2_error **error)
Definition: rs.cpp:2474
All the parameters required to define a video frame.
Definition: rs_internal.h:76
const char * rs2_log_severity_to_string(rs2_log_severity info)
Definition: rs.cpp:1271
const char * rs2_get_fw_log_parsed_file_name(rs2_firmware_log_parsed_message *fw_log_parsed_msg, rs2_error **error)
Gets RealSense firmware log parsed message file name.
Definition: rs.cpp:3318
int rs2_parse_firmware_log(rs2_device *dev, rs2_firmware_log_message *fw_log_msg, rs2_firmware_log_parsed_message *parsed_msg, rs2_error **error)
Gets RealSense firmware log parser.
Definition: rs.cpp:3280
const unsigned char * rs2_fw_log_message_data(rs2_firmware_log_message *msg, rs2_error **error)
Gets RealSense firmware log message data.
Definition: rs.cpp:3233
rs2_firmware_log_parsed_message * rs2_create_fw_log_parsed_message(rs2_device *dev, rs2_error **error)
Creates RealSense firmware log parsed message.
Definition: rs.cpp:3270
void rs2_software_device_register_info(rs2_device *dev, rs2_camera_info info, const char *val, rs2_error **error)
Definition: rs.cpp:2443
rs2_log_severity
Severity of the librealsense logger.
Definition: rs_types.h:153
rs2_terminal_parser * rs2_create_terminal_parser(const char *xml_content, rs2_error **error)
Creates RealSense terminal parser.
Definition: rs.cpp:3360
GLuint64EXT * result
Definition: glext.h:10921
unsigned int rs2_get_number_of_fw_logs(rs2_device *dev, rs2_error **error)
Returns number of fw logs already polled from device but not by user yet.
Definition: rs.cpp:3295
int rs2_get_fw_log(rs2_device *dev, rs2_firmware_log_message *fw_log_msg, rs2_error **error)
Gets RealSense firmware log.
Definition: rs.cpp:3195
stream_profile add_video_stream(rs2_video_stream video_stream, bool is_default=false)
Definition: rs_internal.hpp:96
double get_time()
Definition: rs_internal.hpp:62
std::vector< uint8_t > data() const
rs2_frame_metadata_value
Per-Frame-Metadata is the set of read-only properties that might be exposed for each individual frame...
Definition: rs_frame.h:29
mock_context(const std::string &filename, const std::string &section="", const std::string &min_api_version="0.0.0")
Definition: rs_internal.hpp:43
void rs2_software_device_update_info(rs2_device *dev, rs2_camera_info info, const char *val, rs2_error **error)
Definition: rs.cpp:2451


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