00001
00002 #ifndef COB_SDH_MESSAGE_TACTILESENSOR_H
00003 #define COB_SDH_MESSAGE_TACTILESENSOR_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 "cob_sdh/TactileMatrix.h"
00015
00016 namespace cob_sdh
00017 {
00018 template <class ContainerAllocator>
00019 struct TactileSensor_ : public ros::Message
00020 {
00021 typedef TactileSensor_<ContainerAllocator> Type;
00022
00023 TactileSensor_()
00024 : header()
00025 , tactile_matrix()
00026 {
00027 }
00028
00029 TactileSensor_(const ContainerAllocator& _alloc)
00030 : header(_alloc)
00031 , tactile_matrix(_alloc)
00032 {
00033 }
00034
00035 typedef ::std_msgs::Header_<ContainerAllocator> _header_type;
00036 ::std_msgs::Header_<ContainerAllocator> header;
00037
00038 typedef std::vector< ::cob_sdh::TactileMatrix_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::cob_sdh::TactileMatrix_<ContainerAllocator> >::other > _tactile_matrix_type;
00039 std::vector< ::cob_sdh::TactileMatrix_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::cob_sdh::TactileMatrix_<ContainerAllocator> >::other > tactile_matrix;
00040
00041
00042 ROS_DEPRECATED uint32_t get_tactile_matrix_size() const { return (uint32_t)tactile_matrix.size(); }
00043 ROS_DEPRECATED void set_tactile_matrix_size(uint32_t size) { tactile_matrix.resize((size_t)size); }
00044 ROS_DEPRECATED void get_tactile_matrix_vec(std::vector< ::cob_sdh::TactileMatrix_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::cob_sdh::TactileMatrix_<ContainerAllocator> >::other > & vec) const { vec = this->tactile_matrix; }
00045 ROS_DEPRECATED void set_tactile_matrix_vec(const std::vector< ::cob_sdh::TactileMatrix_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::cob_sdh::TactileMatrix_<ContainerAllocator> >::other > & vec) { this->tactile_matrix = vec; }
00046 private:
00047 static const char* __s_getDataType_() { return "cob_sdh/TactileSensor"; }
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 "c6176a03c00cccf1b8efd3037de0d45d"; }
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 "#tactile sensor data in 2D grid\n\
00062 Header header\n\
00063 cob_sdh/TactileMatrix[] tactile_matrix\n\
00064 \n\
00065 ================================================================================\n\
00066 MSG: std_msgs/Header\n\
00067 # Standard metadata for higher-level stamped data types.\n\
00068 # This is generally used to communicate timestamped data \n\
00069 # in a particular coordinate frame.\n\
00070 # \n\
00071 # sequence ID: consecutively increasing ID \n\
00072 uint32 seq\n\
00073 #Two-integer timestamp that is expressed as:\n\
00074 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00075 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00076 # time-handling sugar is provided by the client library\n\
00077 time stamp\n\
00078 #Frame this data is associated with\n\
00079 # 0: no frame\n\
00080 # 1: global frame\n\
00081 string frame_id\n\
00082 \n\
00083 ================================================================================\n\
00084 MSG: cob_sdh/TactileMatrix\n\
00085 uint32 matrix_id\n\
00086 int16 cells_x\n\
00087 int16 cells_y\n\
00088 int16[] tactile_array\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, tactile_matrix);
00101 return stream.getData();
00102 }
00103
00104 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00105 {
00106 ros::serialization::IStream stream(read_ptr, 1000000000);
00107 ros::serialization::deserialize(stream, header);
00108 ros::serialization::deserialize(stream, tactile_matrix);
00109 return stream.getData();
00110 }
00111
00112 ROS_DEPRECATED virtual uint32_t serializationLength() const
00113 {
00114 uint32_t size = 0;
00115 size += ros::serialization::serializationLength(header);
00116 size += ros::serialization::serializationLength(tactile_matrix);
00117 return size;
00118 }
00119
00120 typedef boost::shared_ptr< ::cob_sdh::TactileSensor_<ContainerAllocator> > Ptr;
00121 typedef boost::shared_ptr< ::cob_sdh::TactileSensor_<ContainerAllocator> const> ConstPtr;
00122 };
00123 typedef ::cob_sdh::TactileSensor_<std::allocator<void> > TactileSensor;
00124
00125 typedef boost::shared_ptr< ::cob_sdh::TactileSensor> TactileSensorPtr;
00126 typedef boost::shared_ptr< ::cob_sdh::TactileSensor const> TactileSensorConstPtr;
00127
00128
00129 template<typename ContainerAllocator>
00130 std::ostream& operator<<(std::ostream& s, const ::cob_sdh::TactileSensor_<ContainerAllocator> & v)
00131 {
00132 ros::message_operations::Printer< ::cob_sdh::TactileSensor_<ContainerAllocator> >::stream(s, "", v);
00133 return s;}
00134
00135 }
00136
00137 namespace ros
00138 {
00139 namespace message_traits
00140 {
00141 template<class ContainerAllocator>
00142 struct MD5Sum< ::cob_sdh::TactileSensor_<ContainerAllocator> > {
00143 static const char* value()
00144 {
00145 return "c6176a03c00cccf1b8efd3037de0d45d";
00146 }
00147
00148 static const char* value(const ::cob_sdh::TactileSensor_<ContainerAllocator> &) { return value(); }
00149 static const uint64_t static_value1 = 0xc6176a03c00cccf1ULL;
00150 static const uint64_t static_value2 = 0xb8efd3037de0d45dULL;
00151 };
00152
00153 template<class ContainerAllocator>
00154 struct DataType< ::cob_sdh::TactileSensor_<ContainerAllocator> > {
00155 static const char* value()
00156 {
00157 return "cob_sdh/TactileSensor";
00158 }
00159
00160 static const char* value(const ::cob_sdh::TactileSensor_<ContainerAllocator> &) { return value(); }
00161 };
00162
00163 template<class ContainerAllocator>
00164 struct Definition< ::cob_sdh::TactileSensor_<ContainerAllocator> > {
00165 static const char* value()
00166 {
00167 return "#tactile sensor data in 2D grid\n\
00168 Header header\n\
00169 cob_sdh/TactileMatrix[] tactile_matrix\n\
00170 \n\
00171 ================================================================================\n\
00172 MSG: std_msgs/Header\n\
00173 # Standard metadata for higher-level stamped data types.\n\
00174 # This is generally used to communicate timestamped data \n\
00175 # in a particular coordinate frame.\n\
00176 # \n\
00177 # sequence ID: consecutively increasing ID \n\
00178 uint32 seq\n\
00179 #Two-integer timestamp that is expressed as:\n\
00180 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00181 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00182 # time-handling sugar is provided by the client library\n\
00183 time stamp\n\
00184 #Frame this data is associated with\n\
00185 # 0: no frame\n\
00186 # 1: global frame\n\
00187 string frame_id\n\
00188 \n\
00189 ================================================================================\n\
00190 MSG: cob_sdh/TactileMatrix\n\
00191 uint32 matrix_id\n\
00192 int16 cells_x\n\
00193 int16 cells_y\n\
00194 int16[] tactile_array\n\
00195 \n\
00196 ";
00197 }
00198
00199 static const char* value(const ::cob_sdh::TactileSensor_<ContainerAllocator> &) { return value(); }
00200 };
00201
00202 template<class ContainerAllocator> struct HasHeader< ::cob_sdh::TactileSensor_<ContainerAllocator> > : public TrueType {};
00203 template<class ContainerAllocator> struct HasHeader< const ::cob_sdh::TactileSensor_<ContainerAllocator> > : public TrueType {};
00204 }
00205 }
00206
00207 namespace ros
00208 {
00209 namespace serialization
00210 {
00211
00212 template<class ContainerAllocator> struct Serializer< ::cob_sdh::TactileSensor_<ContainerAllocator> >
00213 {
00214 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00215 {
00216 stream.next(m.header);
00217 stream.next(m.tactile_matrix);
00218 }
00219
00220 ROS_DECLARE_ALLINONE_SERIALIZER;
00221 };
00222 }
00223 }
00224
00225 namespace ros
00226 {
00227 namespace message_operations
00228 {
00229
00230 template<class ContainerAllocator>
00231 struct Printer< ::cob_sdh::TactileSensor_<ContainerAllocator> >
00232 {
00233 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::cob_sdh::TactileSensor_<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 << "tactile_matrix[]" << std::endl;
00239 for (size_t i = 0; i < v.tactile_matrix.size(); ++i)
00240 {
00241 s << indent << " tactile_matrix[" << i << "]: ";
00242 s << std::endl;
00243 s << indent;
00244 Printer< ::cob_sdh::TactileMatrix_<ContainerAllocator> >::stream(s, indent + " ", v.tactile_matrix[i]);
00245 }
00246 }
00247 };
00248
00249
00250 }
00251 }
00252
00253 #endif // COB_SDH_MESSAGE_TACTILESENSOR_H
00254