00001
00002 #ifndef P2OS_DRIVER_MESSAGE_GRIPPERSTATE_H
00003 #define P2OS_DRIVER_MESSAGE_GRIPPERSTATE_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 "p2os_driver/GripState.h"
00014 #include "p2os_driver/LiftState.h"
00015
00016 namespace p2os_driver
00017 {
00018 template <class ContainerAllocator>
00019 struct GripperState_ : public ros::Message
00020 {
00021 typedef GripperState_<ContainerAllocator> Type;
00022
00023 GripperState_()
00024 : grip()
00025 , lift()
00026 {
00027 }
00028
00029 GripperState_(const ContainerAllocator& _alloc)
00030 : grip(_alloc)
00031 , lift(_alloc)
00032 {
00033 }
00034
00035 typedef ::p2os_driver::GripState_<ContainerAllocator> _grip_type;
00036 ::p2os_driver::GripState_<ContainerAllocator> grip;
00037
00038 typedef ::p2os_driver::LiftState_<ContainerAllocator> _lift_type;
00039 ::p2os_driver::LiftState_<ContainerAllocator> lift;
00040
00041
00042 private:
00043 static const char* __s_getDataType_() { return "p2os_driver/GripperState"; }
00044 public:
00045 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00046
00047 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00048
00049 private:
00050 static const char* __s_getMD5Sum_() { return "300b38b2a4173deb725df02fa70fc70b"; }
00051 public:
00052 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00053
00054 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00055
00056 private:
00057 static const char* __s_getMessageDefinition_() { return "GripState grip\n\
00058 LiftState lift\n\
00059 \n\
00060 ================================================================================\n\
00061 MSG: p2os_driver/GripState\n\
00062 # direction -1 is inward, +1 is outward, 0 is stationary\n\
00063 uint32 state\n\
00064 int32 dir\n\
00065 bool inner_beam\n\
00066 bool outer_beam\n\
00067 bool left_contact\n\
00068 bool right_contact\n\
00069 \n\
00070 ================================================================================\n\
00071 MSG: p2os_driver/LiftState\n\
00072 # direction -1 is downard, +1 is upward, 0 is stationary\n\
00073 int32 state\n\
00074 int32 dir\n\
00075 float32 position\n\
00076 \n\
00077 "; }
00078 public:
00079 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00080
00081 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00082
00083 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00084 {
00085 ros::serialization::OStream stream(write_ptr, 1000000000);
00086 ros::serialization::serialize(stream, grip);
00087 ros::serialization::serialize(stream, lift);
00088 return stream.getData();
00089 }
00090
00091 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00092 {
00093 ros::serialization::IStream stream(read_ptr, 1000000000);
00094 ros::serialization::deserialize(stream, grip);
00095 ros::serialization::deserialize(stream, lift);
00096 return stream.getData();
00097 }
00098
00099 ROS_DEPRECATED virtual uint32_t serializationLength() const
00100 {
00101 uint32_t size = 0;
00102 size += ros::serialization::serializationLength(grip);
00103 size += ros::serialization::serializationLength(lift);
00104 return size;
00105 }
00106
00107 typedef boost::shared_ptr< ::p2os_driver::GripperState_<ContainerAllocator> > Ptr;
00108 typedef boost::shared_ptr< ::p2os_driver::GripperState_<ContainerAllocator> const> ConstPtr;
00109 };
00110 typedef ::p2os_driver::GripperState_<std::allocator<void> > GripperState;
00111
00112 typedef boost::shared_ptr< ::p2os_driver::GripperState> GripperStatePtr;
00113 typedef boost::shared_ptr< ::p2os_driver::GripperState const> GripperStateConstPtr;
00114
00115
00116 template<typename ContainerAllocator>
00117 std::ostream& operator<<(std::ostream& s, const ::p2os_driver::GripperState_<ContainerAllocator> & v)
00118 {
00119 ros::message_operations::Printer< ::p2os_driver::GripperState_<ContainerAllocator> >::stream(s, "", v);
00120 return s;}
00121
00122 }
00123
00124 namespace ros
00125 {
00126 namespace message_traits
00127 {
00128 template<class ContainerAllocator>
00129 struct MD5Sum< ::p2os_driver::GripperState_<ContainerAllocator> > {
00130 static const char* value()
00131 {
00132 return "300b38b2a4173deb725df02fa70fc70b";
00133 }
00134
00135 static const char* value(const ::p2os_driver::GripperState_<ContainerAllocator> &) { return value(); }
00136 static const uint64_t static_value1 = 0x300b38b2a4173debULL;
00137 static const uint64_t static_value2 = 0x725df02fa70fc70bULL;
00138 };
00139
00140 template<class ContainerAllocator>
00141 struct DataType< ::p2os_driver::GripperState_<ContainerAllocator> > {
00142 static const char* value()
00143 {
00144 return "p2os_driver/GripperState";
00145 }
00146
00147 static const char* value(const ::p2os_driver::GripperState_<ContainerAllocator> &) { return value(); }
00148 };
00149
00150 template<class ContainerAllocator>
00151 struct Definition< ::p2os_driver::GripperState_<ContainerAllocator> > {
00152 static const char* value()
00153 {
00154 return "GripState grip\n\
00155 LiftState lift\n\
00156 \n\
00157 ================================================================================\n\
00158 MSG: p2os_driver/GripState\n\
00159 # direction -1 is inward, +1 is outward, 0 is stationary\n\
00160 uint32 state\n\
00161 int32 dir\n\
00162 bool inner_beam\n\
00163 bool outer_beam\n\
00164 bool left_contact\n\
00165 bool right_contact\n\
00166 \n\
00167 ================================================================================\n\
00168 MSG: p2os_driver/LiftState\n\
00169 # direction -1 is downard, +1 is upward, 0 is stationary\n\
00170 int32 state\n\
00171 int32 dir\n\
00172 float32 position\n\
00173 \n\
00174 ";
00175 }
00176
00177 static const char* value(const ::p2os_driver::GripperState_<ContainerAllocator> &) { return value(); }
00178 };
00179
00180 template<class ContainerAllocator> struct IsFixedSize< ::p2os_driver::GripperState_<ContainerAllocator> > : public TrueType {};
00181 }
00182 }
00183
00184 namespace ros
00185 {
00186 namespace serialization
00187 {
00188
00189 template<class ContainerAllocator> struct Serializer< ::p2os_driver::GripperState_<ContainerAllocator> >
00190 {
00191 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00192 {
00193 stream.next(m.grip);
00194 stream.next(m.lift);
00195 }
00196
00197 ROS_DECLARE_ALLINONE_SERIALIZER;
00198 };
00199 }
00200 }
00201
00202 namespace ros
00203 {
00204 namespace message_operations
00205 {
00206
00207 template<class ContainerAllocator>
00208 struct Printer< ::p2os_driver::GripperState_<ContainerAllocator> >
00209 {
00210 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::p2os_driver::GripperState_<ContainerAllocator> & v)
00211 {
00212 s << indent << "grip: ";
00213 s << std::endl;
00214 Printer< ::p2os_driver::GripState_<ContainerAllocator> >::stream(s, indent + " ", v.grip);
00215 s << indent << "lift: ";
00216 s << std::endl;
00217 Printer< ::p2os_driver::LiftState_<ContainerAllocator> >::stream(s, indent + " ", v.lift);
00218 }
00219 };
00220
00221
00222 }
00223 }
00224
00225 #endif // P2OS_DRIVER_MESSAGE_GRIPPERSTATE_H
00226