src/fw-logs/fw-logs-formating-options.h
Go to the documentation of this file.
1 /* License: Apache 2.0. See LICENSE file in root directory. */
2 /* Copyright(c) 2019 Intel Corporation. All Rights Reserved. */
3 #pragma once
4 #include <unordered_map>
5 #include <string>
6 #include <stdint.h>
7 #include <vector>
8 
9 #ifdef ANDROID
10 #include "../../common/android_helpers.h"
11 #endif
12 
13 
14 namespace librealsense
15 {
16  namespace fw_logs
17  {
18  struct fw_log_event
19  {
20  size_t num_of_params;
22 
23  fw_log_event();
24  fw_log_event(int input_num_of_params, const std::string& input_line);
25  };
26 
27  typedef std::pair<int, std::string> kvp; // XML key/value pair
28 
29  class fw_logs_xml_helper;
30 
32  {
33  public:
34  fw_logs_formating_options(const std::string& xml_content);
36 
37 
38  bool get_event_data(int id, fw_log_event* log_event_data) const;
39  bool get_file_name(int id, std::string* file_name) const;
40  bool get_thread_name(uint32_t thread_id, std::string* thread_name) const;
41  std::unordered_map<std::string, std::vector<kvp>> get_enums() const;
42  bool initialize_from_xml();
43 
44  private:
46  std::unordered_map<int, fw_log_event> _fw_logs_event_list;
47  std::unordered_map<int, std::string> _fw_logs_file_names_list;
48  std::unordered_map<int, std::string> _fw_logs_thread_names_list;
49  std::unordered_map<std::string, std::vector<std::pair<int, std::string>>> _fw_logs_enum_names_list;
50 
52  };
53  }
54 }
GLsizei const GLchar *const * string
unsigned int uint32_t
Definition: stdint.h:80
std::string get_file_name(const std::string &path)
Definition: os.cpp:224
std::unordered_map< std::string, std::vector< std::pair< int, std::string > > > _fw_logs_enum_names_list


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