Classes | Macros | Typedefs | Enumerations | Functions | Variables
parser.hpp File Reference
#include <string>
#include <map>
#include <fstream>
#include <sstream>
#include <vector>
#include <functional>
#include <cstring>
#include "../third-party/rapidxml/rapidxml.hpp"
Include dependency graph for parser.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Ascii
 
struct  BarCodeSerial12Char
 
struct  Bool
 
struct  ChangeSetVersion
 
struct  command
 
struct  commands_xml
 
struct  custom_formatter
 
struct  data
 
struct  DecByte
 
struct  DoubleNumber
 
struct  HexByte
 
struct  HexNumber
 
struct  HexNumberReversed
 
struct  HwTypeNumber
 
struct  kvp
 
struct  LiguriaVersion
 
struct  MajorMinorVersion
 
struct  parameter
 
struct  section
 
struct  WideMajorMinorVersion
 

Macros

#define MAX_PARAMS   4
 

Typedefs

typedef struct command command_from_xml
 
typedef std::function< void(const uint8_t *, const section &, std::stringstream &)> xml_parser_function
 

Enumerations

enum  FormatSize { Byte = 2, Word = 4, Double = 8 }
 

Functions

void check_section_size (unsigned section_size, unsigned struct_size, const std::string &section_name, const std::string &struct_name)
 
void decode_string_from_raw_data (const command_from_xml &command, const std::map< std::string, custom_formatter > &custom_formatters, const uint8_t *raw_data_offset, size_t data_size, std::string &output, const std::map< std::string, xml_parser_function > &format_type_to_lambda)
 
void encode_raw_data_command (const command_from_xml &xml_cmd_info, const std::vector< parameter > &params, std::vector< uint8_t > &raw_data)
 
std::string hexify (unsigned char n)
 
bool parse_xml_from_file (const std::string &xml_full_file_path, commands_xml &cmd_xml)
 
void parse_xml_from_memory (const char *content, commands_xml &cmd_xml)
 
bool string_to_bool (const std::string &x)
 
unsigned int string_to_hex (std::string str)
 
std::string to_lower (std::string x)
 
void update_format_type_to_lambda (std::map< std::string, xml_parser_function > &format_type_to_lambda)
 
void update_sections_data (const uint8_t *data_offset, std::vector< section > &sections, const std::map< std::string, custom_formatter > &custom_formatters, const std::map< std::string, xml_parser_function > &format_type_to_lambda)
 

Variables

const uint16_t HW_MONITOR_BUFFER_SIZE = 1024
 

Macro Definition Documentation

#define MAX_PARAMS   4

Definition at line 18 of file parser.hpp.

Typedef Documentation

typedef struct command command_from_xml
typedef std::function<void(const uint8_t*, const section&, std::stringstream&)> xml_parser_function

Definition at line 20 of file parser.hpp.

Enumeration Type Documentation

enum FormatSize
Enumerator
Byte 
Word 
Double 

Definition at line 185 of file parser.hpp.

Function Documentation

void check_section_size ( unsigned  section_size,
unsigned  struct_size,
const std::string section_name,
const std::string struct_name 
)
inline

Definition at line 377 of file parser.hpp.

void decode_string_from_raw_data ( const command_from_xml command,
const std::map< std::string, custom_formatter > &  custom_formatters,
const uint8_t raw_data_offset,
size_t  data_size,
std::string output,
const std::map< std::string, xml_parser_function > &  format_type_to_lambda 
)
inline

Definition at line 541 of file parser.hpp.

void encode_raw_data_command ( const command_from_xml xml_cmd_info,
const std::vector< parameter > &  params,
std::vector< uint8_t > &  raw_data 
)
inline

Definition at line 678 of file parser.hpp.

std::string hexify ( unsigned char  n)
inline

Definition at line 197 of file parser.hpp.

bool parse_xml_from_file ( const std::string xml_full_file_path,
commands_xml cmd_xml 
)
inline

Definition at line 361 of file parser.hpp.

void parse_xml_from_memory ( const char *  content,
commands_xml cmd_xml 
)
inline

Definition at line 243 of file parser.hpp.

bool string_to_bool ( const std::string x)
inline

Definition at line 223 of file parser.hpp.

unsigned int string_to_hex ( std::string  str)
inline

Definition at line 228 of file parser.hpp.

std::string to_lower ( std::string  x)
inline

Definition at line 217 of file parser.hpp.

void update_format_type_to_lambda ( std::map< std::string, xml_parser_function > &  format_type_to_lambda)
inline

Definition at line 387 of file parser.hpp.

void update_sections_data ( const uint8_t data_offset,
std::vector< section > &  sections,
const std::map< std::string, custom_formatter > &  custom_formatters,
const std::map< std::string, xml_parser_function > &  format_type_to_lambda 
)
inline

Definition at line 499 of file parser.hpp.

Variable Documentation

const uint16_t HW_MONITOR_BUFFER_SIZE = 1024

Definition at line 23 of file parser.hpp.



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