00001
00002 #ifndef PR2_MSGS_MESSAGE_PRESSURESTATE_H
00003 #define PR2_MSGS_MESSAGE_PRESSURESTATE_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
00015 namespace pr2_msgs
00016 {
00017 template <class ContainerAllocator>
00018 struct PressureState_ : public ros::Message
00019 {
00020 typedef PressureState_<ContainerAllocator> Type;
00021
00022 PressureState_()
00023 : header()
00024 , l_finger_tip()
00025 , r_finger_tip()
00026 {
00027 }
00028
00029 PressureState_(const ContainerAllocator& _alloc)
00030 : header(_alloc)
00031 , l_finger_tip(_alloc)
00032 , r_finger_tip(_alloc)
00033 {
00034 }
00035
00036 typedef ::std_msgs::Header_<ContainerAllocator> _header_type;
00037 ::std_msgs::Header_<ContainerAllocator> header;
00038
00039 typedef std::vector<int16_t, typename ContainerAllocator::template rebind<int16_t>::other > _l_finger_tip_type;
00040 std::vector<int16_t, typename ContainerAllocator::template rebind<int16_t>::other > l_finger_tip;
00041
00042 typedef std::vector<int16_t, typename ContainerAllocator::template rebind<int16_t>::other > _r_finger_tip_type;
00043 std::vector<int16_t, typename ContainerAllocator::template rebind<int16_t>::other > r_finger_tip;
00044
00045
00046 ROS_DEPRECATED uint32_t get_l_finger_tip_size() const { return (uint32_t)l_finger_tip.size(); }
00047 ROS_DEPRECATED void set_l_finger_tip_size(uint32_t size) { l_finger_tip.resize((size_t)size); }
00048 ROS_DEPRECATED void get_l_finger_tip_vec(std::vector<int16_t, typename ContainerAllocator::template rebind<int16_t>::other > & vec) const { vec = this->l_finger_tip; }
00049 ROS_DEPRECATED void set_l_finger_tip_vec(const std::vector<int16_t, typename ContainerAllocator::template rebind<int16_t>::other > & vec) { this->l_finger_tip = vec; }
00050 ROS_DEPRECATED uint32_t get_r_finger_tip_size() const { return (uint32_t)r_finger_tip.size(); }
00051 ROS_DEPRECATED void set_r_finger_tip_size(uint32_t size) { r_finger_tip.resize((size_t)size); }
00052 ROS_DEPRECATED void get_r_finger_tip_vec(std::vector<int16_t, typename ContainerAllocator::template rebind<int16_t>::other > & vec) const { vec = this->r_finger_tip; }
00053 ROS_DEPRECATED void set_r_finger_tip_vec(const std::vector<int16_t, typename ContainerAllocator::template rebind<int16_t>::other > & vec) { this->r_finger_tip = vec; }
00054 private:
00055 static const char* __s_getDataType_() { return "pr2_msgs/PressureState"; }
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 "756fb3b75fa8884524fd0789a78eb04b"; }
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 "#Output from finger-tip pressure sensors on PR2\n\
00070 #Higher number correspond to more pressure, but there is no explicit unit and you will have to calibrate for offset\n\
00071 #The numbers reported are the raw values from the I2C hardware\n\
00072 \n\
00073 Header header\n\
00074 int16[] l_finger_tip\n\
00075 int16[] r_finger_tip\n\
00076 \n\
00077 ================================================================================\n\
00078 MSG: std_msgs/Header\n\
00079 # Standard metadata for higher-level stamped data types.\n\
00080 # This is generally used to communicate timestamped data \n\
00081 # in a particular coordinate frame.\n\
00082 # \n\
00083 # sequence ID: consecutively increasing ID \n\
00084 uint32 seq\n\
00085 #Two-integer timestamp that is expressed as:\n\
00086 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00087 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00088 # time-handling sugar is provided by the client library\n\
00089 time stamp\n\
00090 #Frame this data is associated with\n\
00091 # 0: no frame\n\
00092 # 1: global frame\n\
00093 string frame_id\n\
00094 \n\
00095 "; }
00096 public:
00097 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00098
00099 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00100
00101 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00102 {
00103 ros::serialization::OStream stream(write_ptr, 1000000000);
00104 ros::serialization::serialize(stream, header);
00105 ros::serialization::serialize(stream, l_finger_tip);
00106 ros::serialization::serialize(stream, r_finger_tip);
00107 return stream.getData();
00108 }
00109
00110 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00111 {
00112 ros::serialization::IStream stream(read_ptr, 1000000000);
00113 ros::serialization::deserialize(stream, header);
00114 ros::serialization::deserialize(stream, l_finger_tip);
00115 ros::serialization::deserialize(stream, r_finger_tip);
00116 return stream.getData();
00117 }
00118
00119 ROS_DEPRECATED virtual uint32_t serializationLength() const
00120 {
00121 uint32_t size = 0;
00122 size += ros::serialization::serializationLength(header);
00123 size += ros::serialization::serializationLength(l_finger_tip);
00124 size += ros::serialization::serializationLength(r_finger_tip);
00125 return size;
00126 }
00127
00128 typedef boost::shared_ptr< ::pr2_msgs::PressureState_<ContainerAllocator> > Ptr;
00129 typedef boost::shared_ptr< ::pr2_msgs::PressureState_<ContainerAllocator> const> ConstPtr;
00130 };
00131 typedef ::pr2_msgs::PressureState_<std::allocator<void> > PressureState;
00132
00133 typedef boost::shared_ptr< ::pr2_msgs::PressureState> PressureStatePtr;
00134 typedef boost::shared_ptr< ::pr2_msgs::PressureState const> PressureStateConstPtr;
00135
00136
00137 template<typename ContainerAllocator>
00138 std::ostream& operator<<(std::ostream& s, const ::pr2_msgs::PressureState_<ContainerAllocator> & v)
00139 {
00140 ros::message_operations::Printer< ::pr2_msgs::PressureState_<ContainerAllocator> >::stream(s, "", v);
00141 return s;}
00142
00143 }
00144
00145 namespace ros
00146 {
00147 namespace message_traits
00148 {
00149 template<class ContainerAllocator>
00150 struct MD5Sum< ::pr2_msgs::PressureState_<ContainerAllocator> > {
00151 static const char* value()
00152 {
00153 return "756fb3b75fa8884524fd0789a78eb04b";
00154 }
00155
00156 static const char* value(const ::pr2_msgs::PressureState_<ContainerAllocator> &) { return value(); }
00157 static const uint64_t static_value1 = 0x756fb3b75fa88845ULL;
00158 static const uint64_t static_value2 = 0x24fd0789a78eb04bULL;
00159 };
00160
00161 template<class ContainerAllocator>
00162 struct DataType< ::pr2_msgs::PressureState_<ContainerAllocator> > {
00163 static const char* value()
00164 {
00165 return "pr2_msgs/PressureState";
00166 }
00167
00168 static const char* value(const ::pr2_msgs::PressureState_<ContainerAllocator> &) { return value(); }
00169 };
00170
00171 template<class ContainerAllocator>
00172 struct Definition< ::pr2_msgs::PressureState_<ContainerAllocator> > {
00173 static const char* value()
00174 {
00175 return "#Output from finger-tip pressure sensors on PR2\n\
00176 #Higher number correspond to more pressure, but there is no explicit unit and you will have to calibrate for offset\n\
00177 #The numbers reported are the raw values from the I2C hardware\n\
00178 \n\
00179 Header header\n\
00180 int16[] l_finger_tip\n\
00181 int16[] r_finger_tip\n\
00182 \n\
00183 ================================================================================\n\
00184 MSG: std_msgs/Header\n\
00185 # Standard metadata for higher-level stamped data types.\n\
00186 # This is generally used to communicate timestamped data \n\
00187 # in a particular coordinate frame.\n\
00188 # \n\
00189 # sequence ID: consecutively increasing ID \n\
00190 uint32 seq\n\
00191 #Two-integer timestamp that is expressed as:\n\
00192 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00193 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00194 # time-handling sugar is provided by the client library\n\
00195 time stamp\n\
00196 #Frame this data is associated with\n\
00197 # 0: no frame\n\
00198 # 1: global frame\n\
00199 string frame_id\n\
00200 \n\
00201 ";
00202 }
00203
00204 static const char* value(const ::pr2_msgs::PressureState_<ContainerAllocator> &) { return value(); }
00205 };
00206
00207 template<class ContainerAllocator> struct HasHeader< ::pr2_msgs::PressureState_<ContainerAllocator> > : public TrueType {};
00208 template<class ContainerAllocator> struct HasHeader< const ::pr2_msgs::PressureState_<ContainerAllocator> > : public TrueType {};
00209 }
00210 }
00211
00212 namespace ros
00213 {
00214 namespace serialization
00215 {
00216
00217 template<class ContainerAllocator> struct Serializer< ::pr2_msgs::PressureState_<ContainerAllocator> >
00218 {
00219 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00220 {
00221 stream.next(m.header);
00222 stream.next(m.l_finger_tip);
00223 stream.next(m.r_finger_tip);
00224 }
00225
00226 ROS_DECLARE_ALLINONE_SERIALIZER;
00227 };
00228 }
00229 }
00230
00231 namespace ros
00232 {
00233 namespace message_operations
00234 {
00235
00236 template<class ContainerAllocator>
00237 struct Printer< ::pr2_msgs::PressureState_<ContainerAllocator> >
00238 {
00239 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::pr2_msgs::PressureState_<ContainerAllocator> & v)
00240 {
00241 s << indent << "header: ";
00242 s << std::endl;
00243 Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header);
00244 s << indent << "l_finger_tip[]" << std::endl;
00245 for (size_t i = 0; i < v.l_finger_tip.size(); ++i)
00246 {
00247 s << indent << " l_finger_tip[" << i << "]: ";
00248 Printer<int16_t>::stream(s, indent + " ", v.l_finger_tip[i]);
00249 }
00250 s << indent << "r_finger_tip[]" << std::endl;
00251 for (size_t i = 0; i < v.r_finger_tip.size(); ++i)
00252 {
00253 s << indent << " r_finger_tip[" << i << "]: ";
00254 Printer<int16_t>::stream(s, indent + " ", v.r_finger_tip[i]);
00255 }
00256 }
00257 };
00258
00259
00260 }
00261 }
00262
00263 #endif // PR2_MSGS_MESSAGE_PRESSURESTATE_H
00264