00001
00002 #ifndef OCTOMAP_ROS_MESSAGE_OCTOMAPBINARY_H
00003 #define OCTOMAP_ROS_MESSAGE_OCTOMAPBINARY_H
00004 #include <string>
00005 #include <vector>
00006 #include <ostream>
00007 #include "ros/serialization.h"
00008 #include "ros/builtin_message_traits.h"
00009 #include "ros/message_operations.h"
00010 #include "ros/message.h"
00011 #include "ros/time.h"
00012
00013 #include "std_msgs/Header.h"
00014
00015 namespace octomap_ros
00016 {
00017 template <class ContainerAllocator>
00018 struct OctomapBinary_ : public ros::Message
00019 {
00020 typedef OctomapBinary_<ContainerAllocator> Type;
00021
00022 OctomapBinary_()
00023 : header()
00024 , data()
00025 {
00026 }
00027
00028 OctomapBinary_(const ContainerAllocator& _alloc)
00029 : header(_alloc)
00030 , data(_alloc)
00031 {
00032 }
00033
00034 typedef ::std_msgs::Header_<ContainerAllocator> _header_type;
00035 ::std_msgs::Header_<ContainerAllocator> header;
00036
00037 typedef std::vector<int8_t, typename ContainerAllocator::template rebind<int8_t>::other > _data_type;
00038 std::vector<int8_t, typename ContainerAllocator::template rebind<int8_t>::other > data;
00039
00040
00041 ROS_DEPRECATED uint32_t get_data_size() const { return (uint32_t)data.size(); }
00042 ROS_DEPRECATED void set_data_size(uint32_t size) { data.resize((size_t)size); }
00043 ROS_DEPRECATED void get_data_vec(std::vector<int8_t, typename ContainerAllocator::template rebind<int8_t>::other > & vec) const { vec = this->data; }
00044 ROS_DEPRECATED void set_data_vec(const std::vector<int8_t, typename ContainerAllocator::template rebind<int8_t>::other > & vec) { this->data = vec; }
00045 private:
00046 static const char* __s_getDataType_() { return "octomap_ros/OctomapBinary"; }
00047 public:
00048 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00049
00050 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00051
00052 private:
00053 static const char* __s_getMD5Sum_() { return "76e8caca558be0db7a08d3479289f362"; }
00054 public:
00055 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00056
00057 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00058
00059 private:
00060 static const char* __s_getMessageDefinition_() { return "# A 3D map in binary format, as Octree\n\
00061 Header header\n\
00062 int8[] data\n\
00063 ================================================================================\n\
00064 MSG: std_msgs/Header\n\
00065 # Standard metadata for higher-level stamped data types.\n\
00066 # This is generally used to communicate timestamped data \n\
00067 # in a particular coordinate frame.\n\
00068 # \n\
00069 # sequence ID: consecutively increasing ID \n\
00070 uint32 seq\n\
00071 #Two-integer timestamp that is expressed as:\n\
00072 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00073 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00074 # time-handling sugar is provided by the client library\n\
00075 time stamp\n\
00076 #Frame this data is associated with\n\
00077 # 0: no frame\n\
00078 # 1: global frame\n\
00079 string frame_id\n\
00080 \n\
00081 "; }
00082 public:
00083 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00084
00085 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00086
00087 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00088 {
00089 ros::serialization::OStream stream(write_ptr, 1000000000);
00090 ros::serialization::serialize(stream, header);
00091 ros::serialization::serialize(stream, data);
00092 return stream.getData();
00093 }
00094
00095 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00096 {
00097 ros::serialization::IStream stream(read_ptr, 1000000000);
00098 ros::serialization::deserialize(stream, header);
00099 ros::serialization::deserialize(stream, data);
00100 return stream.getData();
00101 }
00102
00103 ROS_DEPRECATED virtual uint32_t serializationLength() const
00104 {
00105 uint32_t size = 0;
00106 size += ros::serialization::serializationLength(header);
00107 size += ros::serialization::serializationLength(data);
00108 return size;
00109 }
00110
00111 typedef boost::shared_ptr< ::octomap_ros::OctomapBinary_<ContainerAllocator> > Ptr;
00112 typedef boost::shared_ptr< ::octomap_ros::OctomapBinary_<ContainerAllocator> const> ConstPtr;
00113 };
00114 typedef ::octomap_ros::OctomapBinary_<std::allocator<void> > OctomapBinary;
00115
00116 typedef boost::shared_ptr< ::octomap_ros::OctomapBinary> OctomapBinaryPtr;
00117 typedef boost::shared_ptr< ::octomap_ros::OctomapBinary const> OctomapBinaryConstPtr;
00118
00119
00120 template<typename ContainerAllocator>
00121 std::ostream& operator<<(std::ostream& s, const ::octomap_ros::OctomapBinary_<ContainerAllocator> & v)
00122 {
00123 ros::message_operations::Printer< ::octomap_ros::OctomapBinary_<ContainerAllocator> >::stream(s, "", v);
00124 return s;}
00125
00126 }
00127
00128 namespace ros
00129 {
00130 namespace message_traits
00131 {
00132 template<class ContainerAllocator>
00133 struct MD5Sum< ::octomap_ros::OctomapBinary_<ContainerAllocator> > {
00134 static const char* value()
00135 {
00136 return "76e8caca558be0db7a08d3479289f362";
00137 }
00138
00139 static const char* value(const ::octomap_ros::OctomapBinary_<ContainerAllocator> &) { return value(); }
00140 static const uint64_t static_value1 = 0x76e8caca558be0dbULL;
00141 static const uint64_t static_value2 = 0x7a08d3479289f362ULL;
00142 };
00143
00144 template<class ContainerAllocator>
00145 struct DataType< ::octomap_ros::OctomapBinary_<ContainerAllocator> > {
00146 static const char* value()
00147 {
00148 return "octomap_ros/OctomapBinary";
00149 }
00150
00151 static const char* value(const ::octomap_ros::OctomapBinary_<ContainerAllocator> &) { return value(); }
00152 };
00153
00154 template<class ContainerAllocator>
00155 struct Definition< ::octomap_ros::OctomapBinary_<ContainerAllocator> > {
00156 static const char* value()
00157 {
00158 return "# A 3D map in binary format, as Octree\n\
00159 Header header\n\
00160 int8[] data\n\
00161 ================================================================================\n\
00162 MSG: std_msgs/Header\n\
00163 # Standard metadata for higher-level stamped data types.\n\
00164 # This is generally used to communicate timestamped data \n\
00165 # in a particular coordinate frame.\n\
00166 # \n\
00167 # sequence ID: consecutively increasing ID \n\
00168 uint32 seq\n\
00169 #Two-integer timestamp that is expressed as:\n\
00170 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00171 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00172 # time-handling sugar is provided by the client library\n\
00173 time stamp\n\
00174 #Frame this data is associated with\n\
00175 # 0: no frame\n\
00176 # 1: global frame\n\
00177 string frame_id\n\
00178 \n\
00179 ";
00180 }
00181
00182 static const char* value(const ::octomap_ros::OctomapBinary_<ContainerAllocator> &) { return value(); }
00183 };
00184
00185 template<class ContainerAllocator> struct HasHeader< ::octomap_ros::OctomapBinary_<ContainerAllocator> > : public TrueType {};
00186 template<class ContainerAllocator> struct HasHeader< const ::octomap_ros::OctomapBinary_<ContainerAllocator> > : public TrueType {};
00187 }
00188 }
00189
00190 namespace ros
00191 {
00192 namespace serialization
00193 {
00194
00195 template<class ContainerAllocator> struct Serializer< ::octomap_ros::OctomapBinary_<ContainerAllocator> >
00196 {
00197 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00198 {
00199 stream.next(m.header);
00200 stream.next(m.data);
00201 }
00202
00203 ROS_DECLARE_ALLINONE_SERIALIZER;
00204 };
00205 }
00206 }
00207
00208 namespace ros
00209 {
00210 namespace message_operations
00211 {
00212
00213 template<class ContainerAllocator>
00214 struct Printer< ::octomap_ros::OctomapBinary_<ContainerAllocator> >
00215 {
00216 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::octomap_ros::OctomapBinary_<ContainerAllocator> & v)
00217 {
00218 s << indent << "header: ";
00219 s << std::endl;
00220 Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header);
00221 s << indent << "data[]" << std::endl;
00222 for (size_t i = 0; i < v.data.size(); ++i)
00223 {
00224 s << indent << " data[" << i << "]: ";
00225 Printer<int8_t>::stream(s, indent + " ", v.data[i]);
00226 }
00227 }
00228 };
00229
00230
00231 }
00232 }
00233
00234 #endif // OCTOMAP_ROS_MESSAGE_OCTOMAPBINARY_H
00235