Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
roswrap::Header Class Reference

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 boost::shared_array< uint8_t > &buffer, uint32_t size, std::string &error_msg)
 Parse a header out of a buffer of data. More...
 
bool parse (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, boost::shared_array< uint8_t > &buffer, uint32_t &size)
 

Private Attributes

M_stringPtr read_map_
 

Detailed Description

Provides functionality to parse a connection header and retrieve values from it.

Definition at line 53 of file header.h.

Constructor & Destructor Documentation

◆ Header()

roswrap::Header::Header ( )

◆ ~Header()

roswrap::Header::~Header ( )

Member Function Documentation

◆ getValue()

bool roswrap::Header::getValue ( const std::string &  key,
std::string &  value 
) const

Get a value from a parsed header.

Parameters
keyKey value
valueOUT – value corresponding to the key if there is one
Returns
Returns true if the header had the specified key in it

◆ getValues()

M_stringPtr roswrap::Header::getValues ( )
inline

Returns a shared pointer to the internal map used.

Definition at line 69 of file header.h.

◆ parse() [1/2]

bool roswrap::Header::parse ( const boost::shared_array< uint8_t > &  buffer,
uint32_t  size,
std::string &  error_msg 
)

Parse a header out of a buffer of data.

◆ parse() [2/2]

bool roswrap::Header::parse ( uint8_t *  buffer,
uint32_t  size,
std::string &  error_msg 
)

Parse a header out of a buffer of data.

◆ write()

static void roswrap::Header::write ( const M_string key_vals,
boost::shared_array< uint8_t > &  buffer,
uint32_t &  size 
)
static

Member Data Documentation

◆ read_map_

M_stringPtr roswrap::Header::read_map_
private

Definition at line 85 of file header.h.


The documentation for this class was generated from the following file:


sick_scan_xd
Author(s): Michael Lehning , Jochen Sprickerhof , Martin Günther
autogenerated on Fri Oct 25 2024 02:47:15