00001
00002 #ifndef STD_MSGS_MESSAGE_UINT8MULTIARRAY_H
00003 #define STD_MSGS_MESSAGE_UINT8MULTIARRAY_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/MultiArrayLayout.h"
00014
00015 namespace std_msgs
00016 {
00017 template <class ContainerAllocator>
00018 struct UInt8MultiArray_ : public ros::Message
00019 {
00020 typedef UInt8MultiArray_<ContainerAllocator> Type;
00021
00022 UInt8MultiArray_()
00023 : layout()
00024 , data()
00025 {
00026 }
00027
00028 UInt8MultiArray_(const ContainerAllocator& _alloc)
00029 : layout(_alloc)
00030 , data(_alloc)
00031 {
00032 }
00033
00034 typedef ::std_msgs::MultiArrayLayout_<ContainerAllocator> _layout_type;
00035 ::std_msgs::MultiArrayLayout_<ContainerAllocator> layout;
00036
00037 typedef std::vector<uint8_t, typename ContainerAllocator::template rebind<uint8_t>::other > _data_type;
00038 std::vector<uint8_t, typename ContainerAllocator::template rebind<uint8_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<uint8_t, typename ContainerAllocator::template rebind<uint8_t>::other > & vec) const { vec = this->data; }
00044 ROS_DEPRECATED void set_data_vec(const std::vector<uint8_t, typename ContainerAllocator::template rebind<uint8_t>::other > & vec) { this->data = vec; }
00045 private:
00046 static const char* __s_getDataType_() { return "std_msgs/UInt8MultiArray"; }
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 "82373f1612381bb6ee473b5cd6f5d89c"; }
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 "# Please look at the MultiArrayLayout message definition for\n\
00061 # documentation on all multiarrays.\n\
00062 \n\
00063 MultiArrayLayout layout # specification of data layout\n\
00064 uint8[] data # array of data\n\
00065 \n\
00066 \n\
00067 ================================================================================\n\
00068 MSG: std_msgs/MultiArrayLayout\n\
00069 # The multiarray declares a generic multi-dimensional array of a\n\
00070 # particular data type. Dimensions are ordered from outer most\n\
00071 # to inner most.\n\
00072 \n\
00073 MultiArrayDimension[] dim # Array of dimension properties\n\
00074 uint32 data_offset # padding bytes at front of data\n\
00075 \n\
00076 # Accessors should ALWAYS be written in terms of dimension stride\n\
00077 # and specified outer-most dimension first.\n\
00078 # \n\
00079 # multiarray(i,j,k) = data[data_offset + dim_stride[1]*i + dim_stride[2]*j + k]\n\
00080 #\n\
00081 # A standard, 3-channel 640x480 image with interleaved color channels\n\
00082 # would be specified as:\n\
00083 #\n\
00084 # dim[0].label = \"height\"\n\
00085 # dim[0].size = 480\n\
00086 # dim[0].stride = 3*640*480 = 921600 (note dim[0] stride is just size of image)\n\
00087 # dim[1].label = \"width\"\n\
00088 # dim[1].size = 640\n\
00089 # dim[1].stride = 3*640 = 1920\n\
00090 # dim[2].label = \"channel\"\n\
00091 # dim[2].size = 3\n\
00092 # dim[2].stride = 3\n\
00093 #\n\
00094 # multiarray(i,j,k) refers to the ith row, jth column, and kth channel.\n\
00095 ================================================================================\n\
00096 MSG: std_msgs/MultiArrayDimension\n\
00097 string label # label of given dimension\n\
00098 uint32 size # size of given dimension (in type units)\n\
00099 uint32 stride # stride of given dimension\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, layout);
00110 ros::serialization::serialize(stream, data);
00111 return stream.getData();
00112 }
00113
00114 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00115 {
00116 ros::serialization::IStream stream(read_ptr, 1000000000);
00117 ros::serialization::deserialize(stream, layout);
00118 ros::serialization::deserialize(stream, data);
00119 return stream.getData();
00120 }
00121
00122 ROS_DEPRECATED virtual uint32_t serializationLength() const
00123 {
00124 uint32_t size = 0;
00125 size += ros::serialization::serializationLength(layout);
00126 size += ros::serialization::serializationLength(data);
00127 return size;
00128 }
00129
00130 typedef boost::shared_ptr< ::std_msgs::UInt8MultiArray_<ContainerAllocator> > Ptr;
00131 typedef boost::shared_ptr< ::std_msgs::UInt8MultiArray_<ContainerAllocator> const> ConstPtr;
00132 };
00133 typedef ::std_msgs::UInt8MultiArray_<std::allocator<void> > UInt8MultiArray;
00134
00135 typedef boost::shared_ptr< ::std_msgs::UInt8MultiArray> UInt8MultiArrayPtr;
00136 typedef boost::shared_ptr< ::std_msgs::UInt8MultiArray const> UInt8MultiArrayConstPtr;
00137
00138
00139 template<typename ContainerAllocator>
00140 std::ostream& operator<<(std::ostream& s, const ::std_msgs::UInt8MultiArray_<ContainerAllocator> & v)
00141 {
00142 ros::message_operations::Printer< ::std_msgs::UInt8MultiArray_<ContainerAllocator> >::stream(s, "", v);
00143 return s;}
00144
00145 }
00146
00147 namespace ros
00148 {
00149 namespace message_traits
00150 {
00151 template<class ContainerAllocator>
00152 struct MD5Sum< ::std_msgs::UInt8MultiArray_<ContainerAllocator> > {
00153 static const char* value()
00154 {
00155 return "82373f1612381bb6ee473b5cd6f5d89c";
00156 }
00157
00158 static const char* value(const ::std_msgs::UInt8MultiArray_<ContainerAllocator> &) { return value(); }
00159 static const uint64_t static_value1 = 0x82373f1612381bb6ULL;
00160 static const uint64_t static_value2 = 0xee473b5cd6f5d89cULL;
00161 };
00162
00163 template<class ContainerAllocator>
00164 struct DataType< ::std_msgs::UInt8MultiArray_<ContainerAllocator> > {
00165 static const char* value()
00166 {
00167 return "std_msgs/UInt8MultiArray";
00168 }
00169
00170 static const char* value(const ::std_msgs::UInt8MultiArray_<ContainerAllocator> &) { return value(); }
00171 };
00172
00173 template<class ContainerAllocator>
00174 struct Definition< ::std_msgs::UInt8MultiArray_<ContainerAllocator> > {
00175 static const char* value()
00176 {
00177 return "# Please look at the MultiArrayLayout message definition for\n\
00178 # documentation on all multiarrays.\n\
00179 \n\
00180 MultiArrayLayout layout # specification of data layout\n\
00181 uint8[] data # array of data\n\
00182 \n\
00183 \n\
00184 ================================================================================\n\
00185 MSG: std_msgs/MultiArrayLayout\n\
00186 # The multiarray declares a generic multi-dimensional array of a\n\
00187 # particular data type. Dimensions are ordered from outer most\n\
00188 # to inner most.\n\
00189 \n\
00190 MultiArrayDimension[] dim # Array of dimension properties\n\
00191 uint32 data_offset # padding bytes at front of data\n\
00192 \n\
00193 # Accessors should ALWAYS be written in terms of dimension stride\n\
00194 # and specified outer-most dimension first.\n\
00195 # \n\
00196 # multiarray(i,j,k) = data[data_offset + dim_stride[1]*i + dim_stride[2]*j + k]\n\
00197 #\n\
00198 # A standard, 3-channel 640x480 image with interleaved color channels\n\
00199 # would be specified as:\n\
00200 #\n\
00201 # dim[0].label = \"height\"\n\
00202 # dim[0].size = 480\n\
00203 # dim[0].stride = 3*640*480 = 921600 (note dim[0] stride is just size of image)\n\
00204 # dim[1].label = \"width\"\n\
00205 # dim[1].size = 640\n\
00206 # dim[1].stride = 3*640 = 1920\n\
00207 # dim[2].label = \"channel\"\n\
00208 # dim[2].size = 3\n\
00209 # dim[2].stride = 3\n\
00210 #\n\
00211 # multiarray(i,j,k) refers to the ith row, jth column, and kth channel.\n\
00212 ================================================================================\n\
00213 MSG: std_msgs/MultiArrayDimension\n\
00214 string label # label of given dimension\n\
00215 uint32 size # size of given dimension (in type units)\n\
00216 uint32 stride # stride of given dimension\n\
00217 ";
00218 }
00219
00220 static const char* value(const ::std_msgs::UInt8MultiArray_<ContainerAllocator> &) { return value(); }
00221 };
00222
00223 }
00224 }
00225
00226 namespace ros
00227 {
00228 namespace serialization
00229 {
00230
00231 template<class ContainerAllocator> struct Serializer< ::std_msgs::UInt8MultiArray_<ContainerAllocator> >
00232 {
00233 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00234 {
00235 stream.next(m.layout);
00236 stream.next(m.data);
00237 }
00238
00239 ROS_DECLARE_ALLINONE_SERIALIZER;
00240 };
00241 }
00242 }
00243
00244 namespace ros
00245 {
00246 namespace message_operations
00247 {
00248
00249 template<class ContainerAllocator>
00250 struct Printer< ::std_msgs::UInt8MultiArray_<ContainerAllocator> >
00251 {
00252 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::std_msgs::UInt8MultiArray_<ContainerAllocator> & v)
00253 {
00254 s << indent << "layout: ";
00255 s << std::endl;
00256 Printer< ::std_msgs::MultiArrayLayout_<ContainerAllocator> >::stream(s, indent + " ", v.layout);
00257 s << indent << "data[]" << std::endl;
00258 for (size_t i = 0; i < v.data.size(); ++i)
00259 {
00260 s << indent << " data[" << i << "]: ";
00261 Printer<uint8_t>::stream(s, indent + " ", v.data[i]);
00262 }
00263 }
00264 };
00265
00266
00267 }
00268 }
00269
00270 #endif // STD_MSGS_MESSAGE_UINT8MULTIARRAY_H
00271