tools/fw-logger/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 namespace fw_logger
14 {
15  struct fw_log_event
16  {
17  size_t num_of_params;
19 
20  fw_log_event();
21  fw_log_event(int input_num_of_params, const std::string& input_line);
22  };
23 
24  typedef std::pair<int,std::string> kvp; // XML key/value pair
25 
26  class fw_logs_xml_helper;
27 
29  {
30  public:
31  fw_logs_formating_options(const std::string& xml_full_file_path);
33 
34 
35  bool get_event_data(int id, fw_log_event* log_event_data) const;
36  bool get_file_name(int id, std::string* file_name) const;
37  bool get_thread_name(uint32_t thread_id, std::string* thread_name) const;
38  std::unordered_map<std::string, std::vector<kvp>> get_enums() const;
39  bool initialize_from_xml();
40 
41  private:
43  std::unordered_map<int, fw_log_event> _fw_logs_event_list;
44  std::unordered_map<int, std::string> _fw_logs_file_names_list;
45  std::unordered_map<int, std::string> _fw_logs_thread_names_list;
46  std::unordered_map<std::string, std::vector<std::pair<int,std::string>>> _fw_logs_enum_names_list;
47 
49  };
50 }
std::unordered_map< std::string, std::vector< std::pair< int, std::string > > > _fw_logs_enum_names_list
std::unordered_map< int, std::string > _fw_logs_thread_names_list
GLsizei const GLchar *const * string
std::unordered_map< int, fw_log_event > _fw_logs_event_list
unsigned int uint32_t
Definition: stdint.h:80
std::unordered_map< int, std::string > _fw_logs_file_names_list
std::string get_file_name(const std::string &path)
Definition: os.cpp:224
std::pair< int, std::string > kvp


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