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