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