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