Intel® RealSense™ Cross Platform API
Intel Realsense Cross-platform API
Loading...
Searching...
No Matches
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
12namespace rs2
13{
14 namespace internal
15 {
19 inline double get_time()
20 {
21 rs2_error* e = nullptr;
22 auto time = rs2_get_time( &e);
23
25
26 return time;
27 }
28 }
29
30 template<class T>
32 {
33 T on_destruction_function;
34 public:
35 explicit software_device_destruction_callback(T on_destruction) : on_destruction_function(on_destruction) {}
36
37 void on_destruction() override
38 {
39 on_destruction_function();
40 }
41
42 void release() override { delete this; }
43 };
44
45 class software_sensor : public sensor
46 {
47 public:
53 stream_profile add_video_stream(rs2_video_stream video_stream, bool is_default=false)
54 {
55 rs2_error* e = nullptr;
56
57 auto profile = rs2_software_sensor_add_video_stream_ex(_sensor.get(), video_stream, is_default, &e);
59
60 stream_profile stream(profile);
61 return stream;
62 }
63
69 stream_profile add_motion_stream(rs2_motion_stream motion_stream, bool is_default=false)
70 {
71 rs2_error* e = nullptr;
72
73 auto profile = rs2_software_sensor_add_motion_stream_ex(_sensor.get(), motion_stream, is_default, &e);
75
76 stream_profile stream(profile);
77 return stream;
78 }
79
85 stream_profile add_pose_stream(rs2_pose_stream pose_stream, bool is_default=false)
86 {
87 rs2_error* e = nullptr;
88
89 auto profile = rs2_software_sensor_add_pose_stream_ex(_sensor.get(), pose_stream, is_default, &e);
91
92 stream_profile stream(profile);
93 return stream;
94 }
95
102 {
103 rs2_error* e = nullptr;
105 error::handle(e);
106 }
107
114 {
115 rs2_error* e = nullptr;
117 error::handle(e);
118 }
119
126 {
127 rs2_error* e = nullptr;
129 error::handle(e);
130 }
131
138 {
139 rs2_error* e = nullptr;
140 rs2_software_sensor_set_metadata(_sensor.get(), value, type, &e);
141 error::handle(e);
142 }
143
150 void add_read_only_option(rs2_option option, float val)
151 {
152 rs2_error* e = nullptr;
154 error::handle(e);
155 }
156
163 void set_read_only_option(rs2_option option, float val)
164 {
165 rs2_error* e = nullptr;
167 error::handle(e);
168 }
175 void add_option(rs2_option option, const option_range& range, bool is_writable=true)
176 {
177 rs2_error* e = nullptr;
178 rs2_software_sensor_add_option(_sensor.get(), option, range.min,
179 range.max, range.step, range.def, is_writable, &e);
180 error::handle(e);
181 }
182
184 {
185 rs2_error * e = nullptr;
187 error::handle(e);
188 }
194 void detach()
195 {
196 rs2_error * e = nullptr;
198 error::handle(e);
199 }
200
201 private:
202 friend class software_device;
203
204 software_sensor(std::shared_ptr<rs2_sensor> s)
205 : rs2::sensor(s)
206 {
207 rs2_error* e = nullptr;
209 {
210 _sensor = nullptr;
211 }
213 }
214 };
215
216
217 class software_device : public device
218 {
219 std::shared_ptr<rs2_device> create_device_ptr(std::function<void(rs2_device*)> deleter)
220 {
221 rs2_error* e = nullptr;
222 std::shared_ptr<rs2_device> dev(
224 deleter);
225 error::handle(e);
226 return dev;
227 }
228
229 public:
230 software_device(std::function<void(rs2_device*)> deleter = &rs2_delete_device)
231 : device(create_device_ptr(deleter))
232 {
233 this->set_destruction_callback([]{});
234 }
235
236 software_device(std::string name)
237 : device(create_device_ptr(&rs2_delete_device))
238 {
240 }
241
247 software_sensor add_sensor(std::string name)
248 {
249 rs2_error* e = nullptr;
250 std::shared_ptr<rs2_sensor> sensor(
251 rs2_software_device_add_sensor(_dev.get(), name.c_str(), &e),
253 error::handle(e);
254
255 return software_sensor(sensor);
256 }
257
262 template<class T>
263 void set_destruction_callback(T callback) const
264 {
265 rs2_error* e = nullptr;
267 new software_device_destruction_callback<T>(std::move(callback)), &e);
268 error::handle(e);
269 }
270
278 void add_to(context& ctx)
279 {
280 rs2_error* e = nullptr;
281 rs2_context_add_software_device(ctx._context.get(), _dev.get(), &e);
282 error::handle(e);
283 }
284
291 void register_info(rs2_camera_info info, const std::string& val)
292 {
293 rs2_error* e = nullptr;
294 rs2_software_device_register_info(_dev.get(), info, val.c_str(), &e);
295 error::handle(e);
296 }
297
304 void update_info(rs2_camera_info info, const std::string& val)
305 {
306 rs2_error* e = nullptr;
307 rs2_software_device_update_info(_dev.get(), info, val.c_str(), &e);
308 error::handle(e);
309 }
310
316 {
317 rs2_error* e = nullptr;
318 rs2_software_device_create_matcher(_dev.get(), matcher, &e);
319 error::handle(e);
320 }
321 };
322
324 {
325 public:
326 explicit firmware_log_message(std::shared_ptr<rs2_firmware_log_message> msg) :
327 _fw_log_message(msg) {}
328
330 rs2_error* e = nullptr;
331 rs2_log_severity severity = rs2_fw_log_message_severity(_fw_log_message.get(), &e);
332 error::handle(e);
333 return severity;
334 }
335 std::string get_severity_str() const {
337 }
338
339 uint32_t get_timestamp() const
340 {
341 rs2_error* e = nullptr;
342 uint32_t timestamp = rs2_fw_log_message_timestamp(_fw_log_message.get(), &e);
343 error::handle(e);
344 return timestamp;
345 }
346
347 int size() const
348 {
349 rs2_error* e = nullptr;
350 int size = rs2_fw_log_message_size(_fw_log_message.get(), &e);
351 error::handle(e);
352 return size;
353 }
354
355 std::vector<uint8_t> data() const
356 {
357 rs2_error* e = nullptr;
358 auto size = rs2_fw_log_message_size(_fw_log_message.get(), &e);
359 error::handle(e);
360 std::vector<uint8_t> result;
361 if (size > 0)
362 {
363 auto start = rs2_fw_log_message_data(_fw_log_message.get(), &e);
364 error::handle(e);
365 result.insert(result.begin(), start, start + size);
366 }
367 return result;
368 }
369
370 const std::shared_ptr<rs2_firmware_log_message> get_message() const { return _fw_log_message; }
371
372 private:
373 std::shared_ptr<rs2_firmware_log_message> _fw_log_message;
374 };
375
377 {
378 public:
379 explicit firmware_log_parsed_message(std::shared_ptr<rs2_firmware_log_parsed_message> msg) :
380 _parsed_fw_log(msg) {}
381
382 std::string message() const
383 {
384 rs2_error* e = nullptr;
385 std::string msg(rs2_get_fw_log_parsed_message(_parsed_fw_log.get(), &e));
386 error::handle(e);
387 return msg;
388 }
389 std::string file_name() const
390 {
391 rs2_error* e = nullptr;
392 std::string file_name(rs2_get_fw_log_parsed_file_name(_parsed_fw_log.get(), &e));
393 error::handle(e);
394 return file_name;
395 }
396 std::string thread_name() const
397 {
398 rs2_error* e = nullptr;
399 std::string thread_name(rs2_get_fw_log_parsed_thread_name(_parsed_fw_log.get(), &e));
400 error::handle(e);
401 return thread_name;
402 }
403 std::string severity() const
404 {
405 rs2_error* e = nullptr;
406 rs2_log_severity sev = rs2_get_fw_log_parsed_severity(_parsed_fw_log.get(), &e);
407 error::handle(e);
408 return std::string(rs2_log_severity_to_string(sev));
409 }
410 uint32_t line() const
411 {
412 rs2_error* e = nullptr;
413 uint32_t line(rs2_get_fw_log_parsed_line(_parsed_fw_log.get(), &e));
414 error::handle(e);
415 return line;
416 }
417 uint32_t timestamp() const
418 {
419 rs2_error* e = nullptr;
420 uint32_t timestamp(rs2_get_fw_log_parsed_timestamp(_parsed_fw_log.get(), &e));
421 error::handle(e);
422 return timestamp;
423 }
424
425 uint32_t sequence_id() const
426 {
427 rs2_error* e = nullptr;
428 uint32_t sequence(rs2_get_fw_log_parsed_sequence_id(_parsed_fw_log.get(), &e));
429 error::handle(e);
430 return sequence;
431 }
432
433 const std::shared_ptr<rs2_firmware_log_parsed_message> get_message() const { return _parsed_fw_log; }
434
435 private:
436 std::shared_ptr<rs2_firmware_log_parsed_message> _parsed_fw_log;
437 };
438
439 class firmware_logger : public device
440 {
441 public:
443 : device(d.get())
444 {
445 rs2_error* e = nullptr;
447 {
448 _dev.reset();
449 }
450 error::handle(e);
451 }
452
454 {
455 rs2_error* e = nullptr;
456 std::shared_ptr<rs2_firmware_log_message> msg(
459 error::handle(e);
460
461 return firmware_log_message(msg);
462 }
463
465 {
466 rs2_error* e = nullptr;
467 std::shared_ptr<rs2_firmware_log_parsed_message> msg(
470 error::handle(e);
471
472 return firmware_log_parsed_message(msg);
473 }
474
476 {
477 rs2_error* e = nullptr;
478 rs2_firmware_log_message* m = msg.get_message().get();
479 bool fw_log_pulling_status =
480 !!rs2_get_fw_log(_dev.get(), m, &e);
481
482 error::handle(e);
483
484 return fw_log_pulling_status;
485 }
486
488 {
489 rs2_error* e = nullptr;
490 rs2_firmware_log_message* m = msg.get_message().get();
491 bool flash_log_pulling_status =
492 !!rs2_get_flash_log(_dev.get(), m, &e);
493
494 error::handle(e);
495
496 return flash_log_pulling_status;
497 }
498
499 bool init_parser(const std::string& xml_content)
500 {
501 rs2_error* e = nullptr;
502
503 bool parser_initialized = !!rs2_init_fw_log_parser(_dev.get(), xml_content.c_str(), &e);
504 error::handle(e);
505
506 return parser_initialized;
507 }
508
510 {
511 rs2_error* e = nullptr;
512
513 bool parsingResult = !!rs2_parse_firmware_log(_dev.get(), msg.get_message().get(), parsed_msg.get_message().get(), &e);
514 error::handle(e);
515
516 return parsingResult;
517 }
518
519 unsigned int get_number_of_fw_logs() const
520 {
521 rs2_error* e = nullptr;
522 unsigned int num_of_fw_logs = rs2_get_number_of_fw_logs(_dev.get(), &e);
523 error::handle(e);
524
525 return num_of_fw_logs;
526 }
527 };
528
530 {
531 public:
532 terminal_parser(const std::string& xml_content)
533 {
534 rs2_error* e = nullptr;
535
536 _terminal_parser = std::shared_ptr<rs2_terminal_parser>(
537 rs2_create_terminal_parser(xml_content.c_str(), &e),
539 error::handle(e);
540 }
541
542 std::vector<uint8_t> parse_command(const std::string& command)
543 {
544 rs2_error* e = nullptr;
545
546 std::shared_ptr<const rs2_raw_data_buffer> list(
547 rs2_terminal_parse_command(_terminal_parser.get(), command.c_str(), (unsigned int)command.size(), &e),
549 error::handle(e);
550
551 auto size = rs2_get_raw_data_size(list.get(), &e);
552 error::handle(e);
553
554 auto start = rs2_get_raw_data(list.get(), &e);
555
556 std::vector<uint8_t> results;
557 results.insert(results.begin(), start, start + size);
558
559 return results;
560 }
561
562 std::string parse_response(const std::string& command, const std::vector<uint8_t>& response)
563 {
564 rs2_error* e = nullptr;
565
566 std::shared_ptr<const rs2_raw_data_buffer> list(
567 rs2_terminal_parse_response(_terminal_parser.get(), command.c_str(), (unsigned int)command.size(),
568 (void*)response.data(), (unsigned int)response.size(), &e),
570 error::handle(e);
571
572 auto size = rs2_get_raw_data_size(list.get(), &e);
573 error::handle(e);
574
575 auto start = rs2_get_raw_data(list.get(), &e);
576
577 std::string results;
578 results.insert(results.begin(), start, start + size);
579
580 return results;
581 }
582
583 private:
584 std::shared_ptr<rs2_terminal_parser> _terminal_parser;
585 };
586
587}
588#endif // LIBREALSENSE_RS2_INTERNAL_HPP
Definition rs_context.hpp:97
std::shared_ptr< rs2_context > _context
Definition rs_context.hpp:218
Definition rs_device.hpp:19
const std::shared_ptr< rs2_device > & get() const
Definition rs_device.hpp:116
std::shared_ptr< rs2_device > _dev
Definition rs_device.hpp:146
static void handle(rs2_error *e)
Definition rs_types.hpp:144
Definition rs_internal.hpp:324
uint32_t get_timestamp() const
Definition rs_internal.hpp:339
std::vector< uint8_t > data() const
Definition rs_internal.hpp:355
rs2_log_severity get_severity() const
Definition rs_internal.hpp:329
std::string get_severity_str() const
Definition rs_internal.hpp:335
int size() const
Definition rs_internal.hpp:347
firmware_log_message(std::shared_ptr< rs2_firmware_log_message > msg)
Definition rs_internal.hpp:326
const std::shared_ptr< rs2_firmware_log_message > get_message() const
Definition rs_internal.hpp:370
Definition rs_internal.hpp:377
std::string file_name() const
Definition rs_internal.hpp:389
std::string thread_name() const
Definition rs_internal.hpp:396
firmware_log_parsed_message(std::shared_ptr< rs2_firmware_log_parsed_message > msg)
Definition rs_internal.hpp:379
uint32_t timestamp() const
Definition rs_internal.hpp:417
std::string message() const
Definition rs_internal.hpp:382
std::string severity() const
Definition rs_internal.hpp:403
uint32_t sequence_id() const
Definition rs_internal.hpp:425
const std::shared_ptr< rs2_firmware_log_parsed_message > get_message() const
Definition rs_internal.hpp:433
uint32_t line() const
Definition rs_internal.hpp:410
Definition rs_internal.hpp:440
rs2::firmware_log_message create_message()
Definition rs_internal.hpp:453
firmware_logger(device d)
Definition rs_internal.hpp:442
bool get_firmware_log(rs2::firmware_log_message &msg) const
Definition rs_internal.hpp:475
rs2::firmware_log_parsed_message create_parsed_message()
Definition rs_internal.hpp:464
bool init_parser(const std::string &xml_content)
Definition rs_internal.hpp:499
bool parse_log(const rs2::firmware_log_message &msg, const rs2::firmware_log_parsed_message &parsed_msg)
Definition rs_internal.hpp:509
bool get_flash_log(rs2::firmware_log_message &msg) const
Definition rs_internal.hpp:487
unsigned int get_number_of_fw_logs() const
Definition rs_internal.hpp:519
Definition rs_frame.hpp:346
Definition rs_sensor.hpp:103
std::shared_ptr< rs2_sensor > _sensor
Definition rs_sensor.hpp:352
Definition rs_internal.hpp:32
software_device_destruction_callback(T on_destruction)
Definition rs_internal.hpp:35
void on_destruction() override
Definition rs_internal.hpp:37
void release() override
Definition rs_internal.hpp:42
Definition rs_internal.hpp:218
software_device(std::function< void(rs2_device *)> deleter=&rs2_delete_device)
Definition rs_internal.hpp:230
software_sensor add_sensor(std::string name)
Definition rs_internal.hpp:247
void set_destruction_callback(T callback) const
Definition rs_internal.hpp:263
software_device(std::string name)
Definition rs_internal.hpp:236
void add_to(context &ctx)
Definition rs_internal.hpp:278
void register_info(rs2_camera_info info, const std::string &val)
Definition rs_internal.hpp:291
void update_info(rs2_camera_info info, const std::string &val)
Definition rs_internal.hpp:304
void create_matcher(rs2_matchers matcher)
Definition rs_internal.hpp:315
Definition rs_internal.hpp:46
void on_pose_frame(rs2_software_pose_frame frame)
Definition rs_internal.hpp:125
stream_profile add_pose_stream(rs2_pose_stream pose_stream, bool is_default=false)
Definition rs_internal.hpp:85
void set_metadata(rs2_frame_metadata_value value, rs2_metadata_type type)
Definition rs_internal.hpp:137
void add_option(rs2_option option, const option_range &range, bool is_writable=true)
Definition rs_internal.hpp:175
void set_read_only_option(rs2_option option, float val)
Definition rs_internal.hpp:163
stream_profile add_video_stream(rs2_video_stream video_stream, bool is_default=false)
Definition rs_internal.hpp:53
void add_read_only_option(rs2_option option, float val)
Definition rs_internal.hpp:150
void detach()
Definition rs_internal.hpp:194
void on_video_frame(rs2_software_video_frame frame)
Definition rs_internal.hpp:101
void on_notification(rs2_software_notification notif)
Definition rs_internal.hpp:183
void on_motion_frame(rs2_software_motion_frame frame)
Definition rs_internal.hpp:113
stream_profile add_motion_stream(rs2_motion_stream motion_stream, bool is_default=false)
Definition rs_internal.hpp:69
Definition rs_frame.hpp:23
Definition rs_internal.hpp:530
std::vector< uint8_t > parse_command(const std::string &command)
Definition rs_internal.hpp:542
std::string parse_response(const std::string &command, const std::vector< uint8_t > &response)
Definition rs_internal.hpp:562
terminal_parser(const std::string &xml_content)
Definition rs_internal.hpp:532
double get_time()
Definition rs_internal.hpp:19
Definition rs_processing_gl.hpp:13
const unsigned char * rs2_get_raw_data(const rs2_raw_data_buffer *buffer, rs2_error **error)
rs2_time_t rs2_get_time(rs2_error **error)
int rs2_get_raw_data_size(const rs2_raw_data_buffer *buffer, rs2_error **error)
void rs2_delete_raw_data(const rs2_raw_data_buffer *buffer)
void rs2_context_add_software_device(rs2_context *ctx, rs2_device *dev, rs2_error **error)
void rs2_delete_device(rs2_device *device)
int rs2_is_device_extendable_to(const rs2_device *device, rs2_extension extension, rs2_error **error)
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:30
rs2_firmware_log_message * rs2_create_fw_log_message(rs2_device *dev, rs2_error **error)
Creates RealSense firmware log message.
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.
void rs2_software_device_update_info(rs2_device *dev, rs2_camera_info info, const char *val, rs2_error **error)
rs2_stream_profile * rs2_software_sensor_add_pose_stream_ex(rs2_sensor *sensor, rs2_pose_stream pose_stream, int is_default, rs2_error **error)
unsigned int rs2_fw_log_message_timestamp(rs2_firmware_log_message *msg, rs2_error **error)
Gets RealSense firmware log message timestamp.
void rs2_delete_fw_log_parsed_message(rs2_firmware_log_parsed_message *fw_log_parsed_msg)
Deletes RealSense firmware log parsed message.
void rs2_software_sensor_set_metadata(rs2_sensor *sensor, rs2_frame_metadata_value value, rs2_metadata_type type, rs2_error **error)
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)
rs2_firmware_log_parsed_message * rs2_create_fw_log_parsed_message(rs2_device *dev, rs2_error **error)
Creates RealSense firmware log parsed message.
void rs2_software_sensor_on_pose_frame(rs2_sensor *sensor, rs2_software_pose_frame frame, rs2_error **error)
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.
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....
void rs2_software_sensor_on_notification(rs2_sensor *sensor, rs2_software_notification notif, rs2_error **error)
void rs2_software_device_create_matcher(rs2_device *dev, rs2_matchers matcher, rs2_error **error)
void rs2_software_device_set_destruction_callback_cpp(const rs2_device *dev, rs2_software_device_destruction_callback *callback, rs2_error **error)
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.
rs2_device * rs2_create_software_device(rs2_error **error)
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.
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.
void rs2_software_sensor_detach(rs2_sensor *sensor, rs2_error **error)
void rs2_software_sensor_update_read_only_option(rs2_sensor *sensor, rs2_option option, float val, rs2_error **error)
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_...
int rs2_get_fw_log(rs2_device *dev, rs2_firmware_log_message *fw_log_msg, rs2_error **error)
Gets RealSense firmware log.
rs2_stream_profile * rs2_software_sensor_add_motion_stream_ex(rs2_sensor *sensor, rs2_motion_stream motion_stream, int is_default, rs2_error **error)
void rs2_software_sensor_on_video_frame(rs2_sensor *sensor, rs2_software_video_frame frame, rs2_error **error)
int rs2_init_fw_log_parser(rs2_device *dev, const char *xml_content, rs2_error **error)
Initializes RealSense firmware logs parser in device.
int rs2_fw_log_message_size(rs2_firmware_log_message *msg, rs2_error **error)
Gets RealSense firmware log message size.
void rs2_software_sensor_add_read_only_option(rs2_sensor *sensor, rs2_option option, float val, rs2_error **error)
rs2_sensor * rs2_software_device_add_sensor(rs2_device *dev, const char *sensor_name, rs2_error **error)
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...
void rs2_delete_fw_log_message(rs2_firmware_log_message *msg)
rs2_stream_profile * rs2_software_sensor_add_video_stream_ex(rs2_sensor *sensor, rs2_video_stream video_stream, int is_default, rs2_error **error)
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.
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.
rs2_terminal_parser * rs2_create_terminal_parser(const char *xml_content, rs2_error **error)
Creates RealSense terminal parser.
void rs2_delete_terminal_parser(rs2_terminal_parser *terminal_parser)
Deletes RealSense terminal parser.
rs2_log_severity rs2_fw_log_message_severity(const rs2_firmware_log_message *msg, rs2_error **error)
Gets RealSense firmware log message severity.
const unsigned char * rs2_fw_log_message_data(rs2_firmware_log_message *msg, rs2_error **error)
Gets RealSense firmware log message data.
void rs2_software_device_register_info(rs2_device *dev, rs2_camera_info info, const char *val, rs2_error **error)
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.
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.
void rs2_software_sensor_on_motion_frame(rs2_sensor *sensor, rs2_software_motion_frame frame, rs2_error **error)
rs2_option
Defines general configuration controls. These can generally be mapped to camera UVC controls,...
Definition rs_option.h:23
int rs2_is_sensor_extendable_to(const rs2_sensor *sensor, rs2_extension extension, rs2_error **error)
void rs2_delete_sensor(rs2_sensor *sensor)
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_CAMERA_INFO_NAME
Definition rs_sensor.h:23
rs2_log_severity
Severity of the librealsense logger.
Definition rs_types.h:153
struct rs2_device rs2_device
Definition rs_types.h:258
struct rs2_firmware_log_message rs2_firmware_log_message
Definition rs_types.h:289
@ RS2_EXTENSION_FW_LOGGER
Definition rs_types.h:215
@ RS2_EXTENSION_SOFTWARE_SENSOR
Definition rs_types.h:192
const char * rs2_log_severity_to_string(rs2_log_severity info)
struct rs2_error rs2_error
Definition rs_types.h:259
rs2_matchers
Specifies types of different matchers.
Definition rs_types.h:231
long long rs2_metadata_type
Definition rs_types.h:302
Definition rs_types.hpp:177
float def
Definition rs_types.hpp:180
float step
Definition rs_types.hpp:181
float max
Definition rs_types.hpp:179
float min
Definition rs_types.hpp:178
All the parameters required to define a motion stream.
Definition rs_internal.h:58
All the parameters required to define a pose stream.
Definition rs_internal.h:69
All the parameters required to define a motion frame.
Definition rs_internal.h:93
All the parameters required to define a sensor notification.
Definition rs_internal.h:126
All the parameters required to define a pose frame.
Definition rs_internal.h:104
All the parameters required to define a video frame.
Definition rs_internal.h:79
All the parameters required to define a video stream.
Definition rs_internal.h:44