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