00001
00002 #ifndef RIQ_MSGS_MESSAGE_RIQHANDCOMMAND_H
00003 #define RIQ_MSGS_MESSAGE_RIQHANDCOMMAND_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 riq_msgs
00015 {
00016 template <class ContainerAllocator>
00017 struct RIQHandCommand_ : public ros::Message
00018 {
00019 typedef RIQHandCommand_<ContainerAllocator> Type;
00020
00021 RIQHandCommand_()
00022 : mode(0)
00023 , action(0)
00024 , velocity(0.0)
00025 , force(0.0)
00026 {
00027 }
00028
00029 RIQHandCommand_(const ContainerAllocator& _alloc)
00030 : mode(0)
00031 , action(0)
00032 , velocity(0.0)
00033 , force(0.0)
00034 {
00035 }
00036
00037 typedef int8_t _mode_type;
00038 int8_t mode;
00039
00040 typedef int8_t _action_type;
00041 int8_t action;
00042
00043 typedef double _velocity_type;
00044 double velocity;
00045
00046 typedef double _force_type;
00047 double force;
00048
00049 enum { CYLINDRICAL = 0 };
00050 enum { PINCH = 1 };
00051 enum { SPHERIOD = 2 };
00052 enum { SCISSORS = 3 };
00053 enum { STOP = 0 };
00054 enum { CLOSE = 1 };
00055 enum { OPEN = 2 };
00056
00057 private:
00058 static const char* __s_getDataType_() { return "riq_msgs/RIQHandCommand"; }
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 "1ea172a0fa98ff8b257948fc31b156cd"; }
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 "# ROS command message from RobotIQ hand\n\
00073 \n\
00074 # mode constants\n\
00075 int8 CYLINDRICAL = 0\n\
00076 int8 PINCH = 1\n\
00077 int8 SPHERIOD = 2\n\
00078 int8 SCISSORS = 3\n\
00079 \n\
00080 # action constants\n\
00081 int8 STOP = 0\n\
00082 int8 CLOSE = 1\n\
00083 int8 OPEN = 2\n\
00084 \n\
00085 \n\
00086 int8 mode # PINCH, CYLINDRICAL, SPHERIOD, SCISSORS \n\
00087 int8 action # CLOSE, OPEN, STOP\n\
00088 float64 velocity # Speed value goes from 0.0 to 1.0\n\
00089 float64 force # Force value goes from 0.0 to 1.0 \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, mode);
00100 ros::serialization::serialize(stream, action);
00101 ros::serialization::serialize(stream, velocity);
00102 ros::serialization::serialize(stream, force);
00103 return stream.getData();
00104 }
00105
00106 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00107 {
00108 ros::serialization::IStream stream(read_ptr, 1000000000);
00109 ros::serialization::deserialize(stream, mode);
00110 ros::serialization::deserialize(stream, action);
00111 ros::serialization::deserialize(stream, velocity);
00112 ros::serialization::deserialize(stream, force);
00113 return stream.getData();
00114 }
00115
00116 ROS_DEPRECATED virtual uint32_t serializationLength() const
00117 {
00118 uint32_t size = 0;
00119 size += ros::serialization::serializationLength(mode);
00120 size += ros::serialization::serializationLength(action);
00121 size += ros::serialization::serializationLength(velocity);
00122 size += ros::serialization::serializationLength(force);
00123 return size;
00124 }
00125
00126 typedef boost::shared_ptr< ::riq_msgs::RIQHandCommand_<ContainerAllocator> > Ptr;
00127 typedef boost::shared_ptr< ::riq_msgs::RIQHandCommand_<ContainerAllocator> const> ConstPtr;
00128 };
00129 typedef ::riq_msgs::RIQHandCommand_<std::allocator<void> > RIQHandCommand;
00130
00131 typedef boost::shared_ptr< ::riq_msgs::RIQHandCommand> RIQHandCommandPtr;
00132 typedef boost::shared_ptr< ::riq_msgs::RIQHandCommand const> RIQHandCommandConstPtr;
00133
00134
00135 template<typename ContainerAllocator>
00136 std::ostream& operator<<(std::ostream& s, const ::riq_msgs::RIQHandCommand_<ContainerAllocator> & v)
00137 {
00138 ros::message_operations::Printer< ::riq_msgs::RIQHandCommand_<ContainerAllocator> >::stream(s, "", v);
00139 return s;}
00140
00141 }
00142
00143 namespace ros
00144 {
00145 namespace message_traits
00146 {
00147 template<class ContainerAllocator>
00148 struct MD5Sum< ::riq_msgs::RIQHandCommand_<ContainerAllocator> > {
00149 static const char* value()
00150 {
00151 return "1ea172a0fa98ff8b257948fc31b156cd";
00152 }
00153
00154 static const char* value(const ::riq_msgs::RIQHandCommand_<ContainerAllocator> &) { return value(); }
00155 static const uint64_t static_value1 = 0x1ea172a0fa98ff8bULL;
00156 static const uint64_t static_value2 = 0x257948fc31b156cdULL;
00157 };
00158
00159 template<class ContainerAllocator>
00160 struct DataType< ::riq_msgs::RIQHandCommand_<ContainerAllocator> > {
00161 static const char* value()
00162 {
00163 return "riq_msgs/RIQHandCommand";
00164 }
00165
00166 static const char* value(const ::riq_msgs::RIQHandCommand_<ContainerAllocator> &) { return value(); }
00167 };
00168
00169 template<class ContainerAllocator>
00170 struct Definition< ::riq_msgs::RIQHandCommand_<ContainerAllocator> > {
00171 static const char* value()
00172 {
00173 return "# ROS command message from RobotIQ hand\n\
00174 \n\
00175 # mode constants\n\
00176 int8 CYLINDRICAL = 0\n\
00177 int8 PINCH = 1\n\
00178 int8 SPHERIOD = 2\n\
00179 int8 SCISSORS = 3\n\
00180 \n\
00181 # action constants\n\
00182 int8 STOP = 0\n\
00183 int8 CLOSE = 1\n\
00184 int8 OPEN = 2\n\
00185 \n\
00186 \n\
00187 int8 mode # PINCH, CYLINDRICAL, SPHERIOD, SCISSORS \n\
00188 int8 action # CLOSE, OPEN, STOP\n\
00189 float64 velocity # Speed value goes from 0.0 to 1.0\n\
00190 float64 force # Force value goes from 0.0 to 1.0 \n\
00191 ";
00192 }
00193
00194 static const char* value(const ::riq_msgs::RIQHandCommand_<ContainerAllocator> &) { return value(); }
00195 };
00196
00197 template<class ContainerAllocator> struct IsFixedSize< ::riq_msgs::RIQHandCommand_<ContainerAllocator> > : public TrueType {};
00198 }
00199 }
00200
00201 namespace ros
00202 {
00203 namespace serialization
00204 {
00205
00206 template<class ContainerAllocator> struct Serializer< ::riq_msgs::RIQHandCommand_<ContainerAllocator> >
00207 {
00208 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00209 {
00210 stream.next(m.mode);
00211 stream.next(m.action);
00212 stream.next(m.velocity);
00213 stream.next(m.force);
00214 }
00215
00216 ROS_DECLARE_ALLINONE_SERIALIZER;
00217 };
00218 }
00219 }
00220
00221 namespace ros
00222 {
00223 namespace message_operations
00224 {
00225
00226 template<class ContainerAllocator>
00227 struct Printer< ::riq_msgs::RIQHandCommand_<ContainerAllocator> >
00228 {
00229 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::riq_msgs::RIQHandCommand_<ContainerAllocator> & v)
00230 {
00231 s << indent << "mode: ";
00232 Printer<int8_t>::stream(s, indent + " ", v.mode);
00233 s << indent << "action: ";
00234 Printer<int8_t>::stream(s, indent + " ", v.action);
00235 s << indent << "velocity: ";
00236 Printer<double>::stream(s, indent + " ", v.velocity);
00237 s << indent << "force: ";
00238 Printer<double>::stream(s, indent + " ", v.force);
00239 }
00240 };
00241
00242
00243 }
00244 }
00245
00246 #endif // RIQ_MSGS_MESSAGE_RIQHANDCOMMAND_H
00247