$search
00001 /* Auto-generated by genmsg_cpp for file /home/rosbuild/hudson/workspace/doc-electric-common_msgs/doc_stacks/2013-03-01_14-58-52.505545/common_msgs/sensor_msgs/msg/CompressedImage.msg */ 00002 #ifndef SENSOR_MSGS_MESSAGE_COMPRESSEDIMAGE_H 00003 #define SENSOR_MSGS_MESSAGE_COMPRESSEDIMAGE_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 sensor_msgs 00020 { 00021 template <class ContainerAllocator> 00022 struct CompressedImage_ { 00023 typedef CompressedImage_<ContainerAllocator> Type; 00024 00025 CompressedImage_() 00026 : header() 00027 , format() 00028 , data() 00029 { 00030 } 00031 00032 CompressedImage_(const ContainerAllocator& _alloc) 00033 : header(_alloc) 00034 , format(_alloc) 00035 , data(_alloc) 00036 { 00037 } 00038 00039 typedef ::std_msgs::Header_<ContainerAllocator> _header_type; 00040 ::std_msgs::Header_<ContainerAllocator> header; 00041 00042 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _format_type; 00043 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > format; 00044 00045 typedef std::vector<uint8_t, typename ContainerAllocator::template rebind<uint8_t>::other > _data_type; 00046 std::vector<uint8_t, typename ContainerAllocator::template rebind<uint8_t>::other > data; 00047 00048 00049 ROS_DEPRECATED uint32_t get_data_size() const { return (uint32_t)data.size(); } 00050 ROS_DEPRECATED void set_data_size(uint32_t size) { data.resize((size_t)size); } 00051 ROS_DEPRECATED void get_data_vec(std::vector<uint8_t, typename ContainerAllocator::template rebind<uint8_t>::other > & vec) const { vec = this->data; } 00052 ROS_DEPRECATED void set_data_vec(const std::vector<uint8_t, typename ContainerAllocator::template rebind<uint8_t>::other > & vec) { this->data = vec; } 00053 private: 00054 static const char* __s_getDataType_() { return "sensor_msgs/CompressedImage"; } 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 "8f7a12909da2c9d3332d540a0977563f"; } 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 "# This message contains a compressed image\n\ 00069 \n\ 00070 Header header # Header timestamp should be acquisition time of image\n\ 00071 # Header frame_id should be optical frame of camera\n\ 00072 # origin of frame should be optical center of cameara\n\ 00073 # +x should point to the right in the image\n\ 00074 # +y should point down in the image\n\ 00075 # +z should point into to plane of the image\n\ 00076 \n\ 00077 string format # Specifies the format of the data\n\ 00078 # Acceptable values:\n\ 00079 # jpeg, png\n\ 00080 uint8[] data # Compressed image buffer\n\ 00081 \n\ 00082 ================================================================================\n\ 00083 MSG: std_msgs/Header\n\ 00084 # Standard metadata for higher-level stamped data types.\n\ 00085 # This is generally used to communicate timestamped data \n\ 00086 # in a particular coordinate frame.\n\ 00087 # \n\ 00088 # sequence ID: consecutively increasing ID \n\ 00089 uint32 seq\n\ 00090 #Two-integer timestamp that is expressed as:\n\ 00091 # * stamp.secs: seconds (stamp_secs) since epoch\n\ 00092 # * stamp.nsecs: nanoseconds since stamp_secs\n\ 00093 # time-handling sugar is provided by the client library\n\ 00094 time stamp\n\ 00095 #Frame this data is associated with\n\ 00096 # 0: no frame\n\ 00097 # 1: global frame\n\ 00098 string frame_id\n\ 00099 \n\ 00100 "; } 00101 public: 00102 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); } 00103 00104 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); } 00105 00106 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const 00107 { 00108 ros::serialization::OStream stream(write_ptr, 1000000000); 00109 ros::serialization::serialize(stream, header); 00110 ros::serialization::serialize(stream, format); 00111 ros::serialization::serialize(stream, data); 00112 return stream.getData(); 00113 } 00114 00115 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr) 00116 { 00117 ros::serialization::IStream stream(read_ptr, 1000000000); 00118 ros::serialization::deserialize(stream, header); 00119 ros::serialization::deserialize(stream, format); 00120 ros::serialization::deserialize(stream, data); 00121 return stream.getData(); 00122 } 00123 00124 ROS_DEPRECATED virtual uint32_t serializationLength() const 00125 { 00126 uint32_t size = 0; 00127 size += ros::serialization::serializationLength(header); 00128 size += ros::serialization::serializationLength(format); 00129 size += ros::serialization::serializationLength(data); 00130 return size; 00131 } 00132 00133 typedef boost::shared_ptr< ::sensor_msgs::CompressedImage_<ContainerAllocator> > Ptr; 00134 typedef boost::shared_ptr< ::sensor_msgs::CompressedImage_<ContainerAllocator> const> ConstPtr; 00135 boost::shared_ptr<std::map<std::string, std::string> > __connection_header; 00136 }; // struct CompressedImage 00137 typedef ::sensor_msgs::CompressedImage_<std::allocator<void> > CompressedImage; 00138 00139 typedef boost::shared_ptr< ::sensor_msgs::CompressedImage> CompressedImagePtr; 00140 typedef boost::shared_ptr< ::sensor_msgs::CompressedImage const> CompressedImageConstPtr; 00141 00142 00143 template<typename ContainerAllocator> 00144 std::ostream& operator<<(std::ostream& s, const ::sensor_msgs::CompressedImage_<ContainerAllocator> & v) 00145 { 00146 ros::message_operations::Printer< ::sensor_msgs::CompressedImage_<ContainerAllocator> >::stream(s, "", v); 00147 return s;} 00148 00149 } // namespace sensor_msgs 00150 00151 namespace ros 00152 { 00153 namespace message_traits 00154 { 00155 template<class ContainerAllocator> struct IsMessage< ::sensor_msgs::CompressedImage_<ContainerAllocator> > : public TrueType {}; 00156 template<class ContainerAllocator> struct IsMessage< ::sensor_msgs::CompressedImage_<ContainerAllocator> const> : public TrueType {}; 00157 template<class ContainerAllocator> 00158 struct MD5Sum< ::sensor_msgs::CompressedImage_<ContainerAllocator> > { 00159 static const char* value() 00160 { 00161 return "8f7a12909da2c9d3332d540a0977563f"; 00162 } 00163 00164 static const char* value(const ::sensor_msgs::CompressedImage_<ContainerAllocator> &) { return value(); } 00165 static const uint64_t static_value1 = 0x8f7a12909da2c9d3ULL; 00166 static const uint64_t static_value2 = 0x332d540a0977563fULL; 00167 }; 00168 00169 template<class ContainerAllocator> 00170 struct DataType< ::sensor_msgs::CompressedImage_<ContainerAllocator> > { 00171 static const char* value() 00172 { 00173 return "sensor_msgs/CompressedImage"; 00174 } 00175 00176 static const char* value(const ::sensor_msgs::CompressedImage_<ContainerAllocator> &) { return value(); } 00177 }; 00178 00179 template<class ContainerAllocator> 00180 struct Definition< ::sensor_msgs::CompressedImage_<ContainerAllocator> > { 00181 static const char* value() 00182 { 00183 return "# This message contains a compressed image\n\ 00184 \n\ 00185 Header header # Header timestamp should be acquisition time of image\n\ 00186 # Header frame_id should be optical frame of camera\n\ 00187 # origin of frame should be optical center of cameara\n\ 00188 # +x should point to the right in the image\n\ 00189 # +y should point down in the image\n\ 00190 # +z should point into to plane of the image\n\ 00191 \n\ 00192 string format # Specifies the format of the data\n\ 00193 # Acceptable values:\n\ 00194 # jpeg, png\n\ 00195 uint8[] data # Compressed image buffer\n\ 00196 \n\ 00197 ================================================================================\n\ 00198 MSG: std_msgs/Header\n\ 00199 # Standard metadata for higher-level stamped data types.\n\ 00200 # This is generally used to communicate timestamped data \n\ 00201 # in a particular coordinate frame.\n\ 00202 # \n\ 00203 # sequence ID: consecutively increasing ID \n\ 00204 uint32 seq\n\ 00205 #Two-integer timestamp that is expressed as:\n\ 00206 # * stamp.secs: seconds (stamp_secs) since epoch\n\ 00207 # * stamp.nsecs: nanoseconds since stamp_secs\n\ 00208 # time-handling sugar is provided by the client library\n\ 00209 time stamp\n\ 00210 #Frame this data is associated with\n\ 00211 # 0: no frame\n\ 00212 # 1: global frame\n\ 00213 string frame_id\n\ 00214 \n\ 00215 "; 00216 } 00217 00218 static const char* value(const ::sensor_msgs::CompressedImage_<ContainerAllocator> &) { return value(); } 00219 }; 00220 00221 template<class ContainerAllocator> struct HasHeader< ::sensor_msgs::CompressedImage_<ContainerAllocator> > : public TrueType {}; 00222 template<class ContainerAllocator> struct HasHeader< const ::sensor_msgs::CompressedImage_<ContainerAllocator> > : public TrueType {}; 00223 } // namespace message_traits 00224 } // namespace ros 00225 00226 namespace ros 00227 { 00228 namespace serialization 00229 { 00230 00231 template<class ContainerAllocator> struct Serializer< ::sensor_msgs::CompressedImage_<ContainerAllocator> > 00232 { 00233 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m) 00234 { 00235 stream.next(m.header); 00236 stream.next(m.format); 00237 stream.next(m.data); 00238 } 00239 00240 ROS_DECLARE_ALLINONE_SERIALIZER; 00241 }; // struct CompressedImage_ 00242 } // namespace serialization 00243 } // namespace ros 00244 00245 namespace ros 00246 { 00247 namespace message_operations 00248 { 00249 00250 template<class ContainerAllocator> 00251 struct Printer< ::sensor_msgs::CompressedImage_<ContainerAllocator> > 00252 { 00253 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::sensor_msgs::CompressedImage_<ContainerAllocator> & v) 00254 { 00255 s << indent << "header: "; 00256 s << std::endl; 00257 Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header); 00258 s << indent << "format: "; 00259 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.format); 00260 s << indent << "data[]" << std::endl; 00261 for (size_t i = 0; i < v.data.size(); ++i) 00262 { 00263 s << indent << " data[" << i << "]: "; 00264 Printer<uint8_t>::stream(s, indent + " ", v.data[i]); 00265 } 00266 } 00267 }; 00268 00269 00270 } // namespace message_operations 00271 } // namespace ros 00272 00273 #endif // SENSOR_MSGS_MESSAGE_COMPRESSEDIMAGE_H 00274