message.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  * Copyright (C) 2008, Morgan Quigley and Willow Garage, Inc.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  * * Redistributions of source code must retain the above copyright notice,
8  * this list of conditions and the following disclaimer.
9  * * Redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution.
12  * * Neither the names of Stanford University or Willow Garage, Inc. nor the names of its
13  * contributors may be used to endorse or promote products derived from
14  * this software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
20  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26  * POSSIBILITY OF SUCH DAMAGE.
27  */
28 
29 #ifndef ROSCPP_MESSAGE_H
30 #define ROSCPP_MESSAGE_H
31 
32 // #warning You should not be using this file
33 
34 #include "ros/macros.h"
35 #include "ros/assert.h"
36 #include <string>
37 #include <string.h>
38 #include <memory>
39 //#include <boost/array.hpp>
40 #include <stdint.h>
41 
42 
43 #define ROSCPP_MESSAGE_HAS_DEFINITION
44 
45 namespace roswrap
46 {
47 
48 typedef std::map<std::string, std::string> M_string;
49 
53 #if 0
54 class Message
55 {
56 public:
57  typedef std::shared_ptr<Message> Ptr;
58  typedef std::shared_ptr<Message const> ConstPtr;
59  Message()
60  {
61  }
62  virtual ~Message()
63  {
64  }
65  virtual const std::string __getDataType() const = 0;
66  virtual const std::string __getMD5Sum() const = 0;
67  virtual const std::string __getMessageDefinition() const = 0;
68  inline static std::string __s_getDataType() { ROS_BREAK(); return std::string(""); }
69  inline static std::string __s_getMD5Sum() { ROS_BREAK(); return std::string(""); }
70  inline static std::string __s_getMessageDefinition() { ROS_BREAK(); return std::string(""); }
71  virtual uint32_t serializationLength() const = 0;
72  virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const = 0;
73  virtual uint8_t *deserialize(uint8_t *read_ptr) = 0;
74  uint32_t __serialized_length;
75 };
76 
77 typedef std::shared_ptr<Message> MessagePtr;
78 typedef std::shared_ptr<Message const> MessageConstPtr;
79 #endif
80 
81 #define SROS_SERIALIZE_PRIMITIVE(ptr, data) { memcpy(ptr, &data, sizeof(data)); ptr += sizeof(data); }
82 #define SROS_SERIALIZE_BUFFER(ptr, data, data_size) { if (data_size > 0) { memcpy(ptr, data, data_size); ptr += data_size; } }
83 #define SROS_DESERIALIZE_PRIMITIVE(ptr, data) { memcpy(&data, ptr, sizeof(data)); ptr += sizeof(data); }
84 #define SROS_DESERIALIZE_BUFFER(ptr, data, data_size) { if (data_size > 0) { memcpy(data, ptr, data_size); ptr += data_size; } }
85 
86 }
87 
88 #endif
89 
ROS_BREAK
#define ROS_BREAK()
Aborts program execution.
Definition: assert.h:117
roswrap::serialization::serialize
void serialize(Stream &stream, const T &t)
Serialize an object. Stream here should normally be a ros::serialization::OStream.
Definition: serialization.h:153
roswrap::M_string
std::map< std::string, std::string > M_string
Definition: datatypes.h:46
roswrap::serialization::serializationLength
uint32_t serializationLength(const T &t)
Determine the serialized length of an object.
Definition: serialization.h:171
roswrap
Definition: param_modi.cpp:41
roswrap::serialization::deserialize
void deserialize(Stream &stream, T &t)
Deserialize an object. Stream here should normally be a ros::serialization::IStream.
Definition: serialization.h:162
sick_scan_base.h


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