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