header.h
Go to the documentation of this file.
1 #include "sick_scan/sick_scan_base.h" /* Base definitions included in all header files, added by add_sick_scan_base_header.py. Do not edit this line. */
2 /*
3  * Software License Agreement (BSD License)
4  *
5  * Copyright (c) 2008, Willow Garage, Inc.
6  * Copyright (c) 2013, Open Source Robotics Foundation
7  * All rights reserved.
8  *
9  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted provided that the following conditions
11  * are met:
12  *
13  * * Redistributions of source code must retain the above copyright
14  * notice, this list of conditions and the following disclaimer.
15  * * Redistributions in binary form must reproduce the above
16  * copyright notice, this list of conditions and the following
17  * disclaimer in the documentation and/or other materials provided
18  * with the distribution.
19  * * Neither the name of Willow Garage, Inc. nor the names of its
20  * contributors may be used to endorse or promote products derived
21  * from this software without specific prior written permission.
22  *
23  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
26  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
27  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
28  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
29  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
31  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
33  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34  * POSSIBILITY OF SUCH DAMAGE.
35  */
36 
37 #ifndef CPP_CORE_HEADER_H
38 #define CPP_CORE_HEADER_H
39 
40 #include <stdint.h>
41 
42 //#include <boost/shared_array.hpp>
43 
44 #include "ros/datatypes.h"
45 #include "cpp_common_decl.h"
46 
47 namespace roswrap
48 {
49 
54 {
55 public:
56  Header();
57  ~Header();
58 
65  bool getValue(const std::string& key, std::string& value) const;
69  M_stringPtr getValues() { return read_map_; }
70 
74  bool parse(const boost::shared_array<uint8_t>& buffer, uint32_t size, std::string& error_msg);
75 
79  bool parse(uint8_t* buffer, uint32_t size, std::string& error_msg);
80 
81  static void write(const M_string& key_vals, boost::shared_array<uint8_t>& buffer, uint32_t& size);
82 
83 private:
84 
86 };
87 
88 }
89 
90 #endif // ROSCPP_HEADER_H
roswrap::M_stringPtr
std::shared_ptr< M_string > M_stringPtr
Definition: datatypes.h:49
roswrap::M_string
std::map< std::string, std::string > M_string
Definition: datatypes.h:46
cpp_common_decl.h
roswrap::Header::read_map_
M_stringPtr read_map_
Definition: header.h:85
boost::shared_array< uint8_t >
roswrap
Definition: param_modi.cpp:41
roswrap::Header
Provides functionality to parse a connection header and retrieve values from it.
Definition: header.h:53
sick_scan_base.h
CPP_COMMON_DECL
#define CPP_COMMON_DECL
Definition: cpp_common_decl.h:40
roswrap::Header::getValues
M_stringPtr getValues()
Returns a shared pointer to the internal map used.
Definition: header.h:69


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