00001
00002 #ifndef COB_SDH_MESSAGE_TACTILEMATRIX_H
00003 #define COB_SDH_MESSAGE_TACTILEMATRIX_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
00014 namespace cob_sdh
00015 {
00016 template <class ContainerAllocator>
00017 struct TactileMatrix_ : public ros::Message
00018 {
00019 typedef TactileMatrix_<ContainerAllocator> Type;
00020
00021 TactileMatrix_()
00022 : matrix_id(0)
00023 , cells_x(0)
00024 , cells_y(0)
00025 , tactile_array()
00026 {
00027 }
00028
00029 TactileMatrix_(const ContainerAllocator& _alloc)
00030 : matrix_id(0)
00031 , cells_x(0)
00032 , cells_y(0)
00033 , tactile_array(_alloc)
00034 {
00035 }
00036
00037 typedef uint32_t _matrix_id_type;
00038 uint32_t matrix_id;
00039
00040 typedef int16_t _cells_x_type;
00041 int16_t cells_x;
00042
00043 typedef int16_t _cells_y_type;
00044 int16_t cells_y;
00045
00046 typedef std::vector<int16_t, typename ContainerAllocator::template rebind<int16_t>::other > _tactile_array_type;
00047 std::vector<int16_t, typename ContainerAllocator::template rebind<int16_t>::other > tactile_array;
00048
00049
00050 ROS_DEPRECATED uint32_t get_tactile_array_size() const { return (uint32_t)tactile_array.size(); }
00051 ROS_DEPRECATED void set_tactile_array_size(uint32_t size) { tactile_array.resize((size_t)size); }
00052 ROS_DEPRECATED void get_tactile_array_vec(std::vector<int16_t, typename ContainerAllocator::template rebind<int16_t>::other > & vec) const { vec = this->tactile_array; }
00053 ROS_DEPRECATED void set_tactile_array_vec(const std::vector<int16_t, typename ContainerAllocator::template rebind<int16_t>::other > & vec) { this->tactile_array = vec; }
00054 private:
00055 static const char* __s_getDataType_() { return "cob_sdh/TactileMatrix"; }
00056 public:
00057 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00058
00059 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00060
00061 private:
00062 static const char* __s_getMD5Sum_() { return "ab718b6c1d4d719110707994d2e325e4"; }
00063 public:
00064 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00065
00066 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00067
00068 private:
00069 static const char* __s_getMessageDefinition_() { return "uint32 matrix_id\n\
00070 int16 cells_x\n\
00071 int16 cells_y\n\
00072 int16[] tactile_array\n\
00073 \n\
00074 "; }
00075 public:
00076 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00077
00078 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00079
00080 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00081 {
00082 ros::serialization::OStream stream(write_ptr, 1000000000);
00083 ros::serialization::serialize(stream, matrix_id);
00084 ros::serialization::serialize(stream, cells_x);
00085 ros::serialization::serialize(stream, cells_y);
00086 ros::serialization::serialize(stream, tactile_array);
00087 return stream.getData();
00088 }
00089
00090 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00091 {
00092 ros::serialization::IStream stream(read_ptr, 1000000000);
00093 ros::serialization::deserialize(stream, matrix_id);
00094 ros::serialization::deserialize(stream, cells_x);
00095 ros::serialization::deserialize(stream, cells_y);
00096 ros::serialization::deserialize(stream, tactile_array);
00097 return stream.getData();
00098 }
00099
00100 ROS_DEPRECATED virtual uint32_t serializationLength() const
00101 {
00102 uint32_t size = 0;
00103 size += ros::serialization::serializationLength(matrix_id);
00104 size += ros::serialization::serializationLength(cells_x);
00105 size += ros::serialization::serializationLength(cells_y);
00106 size += ros::serialization::serializationLength(tactile_array);
00107 return size;
00108 }
00109
00110 typedef boost::shared_ptr< ::cob_sdh::TactileMatrix_<ContainerAllocator> > Ptr;
00111 typedef boost::shared_ptr< ::cob_sdh::TactileMatrix_<ContainerAllocator> const> ConstPtr;
00112 };
00113 typedef ::cob_sdh::TactileMatrix_<std::allocator<void> > TactileMatrix;
00114
00115 typedef boost::shared_ptr< ::cob_sdh::TactileMatrix> TactileMatrixPtr;
00116 typedef boost::shared_ptr< ::cob_sdh::TactileMatrix const> TactileMatrixConstPtr;
00117
00118
00119 template<typename ContainerAllocator>
00120 std::ostream& operator<<(std::ostream& s, const ::cob_sdh::TactileMatrix_<ContainerAllocator> & v)
00121 {
00122 ros::message_operations::Printer< ::cob_sdh::TactileMatrix_<ContainerAllocator> >::stream(s, "", v);
00123 return s;}
00124
00125 }
00126
00127 namespace ros
00128 {
00129 namespace message_traits
00130 {
00131 template<class ContainerAllocator>
00132 struct MD5Sum< ::cob_sdh::TactileMatrix_<ContainerAllocator> > {
00133 static const char* value()
00134 {
00135 return "ab718b6c1d4d719110707994d2e325e4";
00136 }
00137
00138 static const char* value(const ::cob_sdh::TactileMatrix_<ContainerAllocator> &) { return value(); }
00139 static const uint64_t static_value1 = 0xab718b6c1d4d7191ULL;
00140 static const uint64_t static_value2 = 0x10707994d2e325e4ULL;
00141 };
00142
00143 template<class ContainerAllocator>
00144 struct DataType< ::cob_sdh::TactileMatrix_<ContainerAllocator> > {
00145 static const char* value()
00146 {
00147 return "cob_sdh/TactileMatrix";
00148 }
00149
00150 static const char* value(const ::cob_sdh::TactileMatrix_<ContainerAllocator> &) { return value(); }
00151 };
00152
00153 template<class ContainerAllocator>
00154 struct Definition< ::cob_sdh::TactileMatrix_<ContainerAllocator> > {
00155 static const char* value()
00156 {
00157 return "uint32 matrix_id\n\
00158 int16 cells_x\n\
00159 int16 cells_y\n\
00160 int16[] tactile_array\n\
00161 \n\
00162 ";
00163 }
00164
00165 static const char* value(const ::cob_sdh::TactileMatrix_<ContainerAllocator> &) { return value(); }
00166 };
00167
00168 }
00169 }
00170
00171 namespace ros
00172 {
00173 namespace serialization
00174 {
00175
00176 template<class ContainerAllocator> struct Serializer< ::cob_sdh::TactileMatrix_<ContainerAllocator> >
00177 {
00178 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00179 {
00180 stream.next(m.matrix_id);
00181 stream.next(m.cells_x);
00182 stream.next(m.cells_y);
00183 stream.next(m.tactile_array);
00184 }
00185
00186 ROS_DECLARE_ALLINONE_SERIALIZER;
00187 };
00188 }
00189 }
00190
00191 namespace ros
00192 {
00193 namespace message_operations
00194 {
00195
00196 template<class ContainerAllocator>
00197 struct Printer< ::cob_sdh::TactileMatrix_<ContainerAllocator> >
00198 {
00199 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::cob_sdh::TactileMatrix_<ContainerAllocator> & v)
00200 {
00201 s << indent << "matrix_id: ";
00202 Printer<uint32_t>::stream(s, indent + " ", v.matrix_id);
00203 s << indent << "cells_x: ";
00204 Printer<int16_t>::stream(s, indent + " ", v.cells_x);
00205 s << indent << "cells_y: ";
00206 Printer<int16_t>::stream(s, indent + " ", v.cells_y);
00207 s << indent << "tactile_array[]" << std::endl;
00208 for (size_t i = 0; i < v.tactile_array.size(); ++i)
00209 {
00210 s << indent << " tactile_array[" << i << "]: ";
00211 Printer<int16_t>::stream(s, indent + " ", v.tactile_array[i]);
00212 }
00213 }
00214 };
00215
00216
00217 }
00218 }
00219
00220 #endif // COB_SDH_MESSAGE_TACTILEMATRIX_H
00221