Provides functionality to parse a connection header and retrieve values from it. More...
#include <header.h>
Public Member Functions | |
| bool | getValue (const std::string &key, std::string &value) const |
| Get a value from a parsed header. More... | |
| M_stringPtr | getValues () |
| Returns a shared pointer to the internal map used. More... | |
| Header () | |
| bool | parse (const std::vector< uint8_t > &buffer, uint32_t size, std::string &error_msg) |
| Parse a header out of a buffer of data. More... | |
| bool | parse (const uint8_t *buffer, uint32_t size, std::string &error_msg) |
| Parse a header out of a buffer of data. More... | |
| ~Header () | |
Static Public Member Functions | |
| static void | write (const M_string &key_vals, std::vector< uint8_t > &buffer, uint32_t &size) |
Private Attributes | |
| M_stringPtr | read_map_ |
Provides functionality to parse a connection header and retrieve values from it.
| rs2rosinternal::Header::Header | ( | ) |
Definition at line 58 of file header.cpp.
| rs2rosinternal::Header::~Header | ( | ) |
Definition at line 64 of file header.cpp.
| bool rs2rosinternal::Header::getValue | ( | const std::string & | key, |
| std::string & | value | ||
| ) | const |
Get a value from a parsed header.
| key | Key value |
| value | OUT – value corresponding to the key if there is one |
Definition at line 112 of file header.cpp.
|
inline |
| bool rs2rosinternal::Header::parse | ( | const std::vector< uint8_t > & | buffer, |
| uint32_t | size, | ||
| std::string & | error_msg | ||
| ) |
Parse a header out of a buffer of data.
Definition at line 69 of file header.cpp.
| bool rs2rosinternal::Header::parse | ( | const uint8_t * | buffer, |
| uint32_t | size, | ||
| std::string & | error_msg | ||
| ) |
Parse a header out of a buffer of data.
Definition at line 74 of file header.cpp.
|
static |
Definition at line 125 of file header.cpp.
|
private |