Go to the documentation of this file.00001
00002 #ifndef RIQ_MSGS_MESSAGE_RIQHANDCOMMAND_H
00003 #define RIQ_MSGS_MESSAGE_RIQHANDCOMMAND_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
00018 namespace riq_msgs
00019 {
00020 template <class ContainerAllocator>
00021 struct RIQHandCommand_ {
00022 typedef RIQHandCommand_<ContainerAllocator> Type;
00023
00024 RIQHandCommand_()
00025 : mode(0)
00026 , action(0)
00027 , velocity(0.0)
00028 , force(0.0)
00029 {
00030 }
00031
00032 RIQHandCommand_(const ContainerAllocator& _alloc)
00033 : mode(0)
00034 , action(0)
00035 , velocity(0.0)
00036 , force(0.0)
00037 {
00038 }
00039
00040 typedef int8_t _mode_type;
00041 int8_t mode;
00042
00043 typedef int8_t _action_type;
00044 int8_t action;
00045
00046 typedef double _velocity_type;
00047 double velocity;
00048
00049 typedef double _force_type;
00050 double force;
00051
00052 enum { CYLINDRICAL = 0 };
00053 enum { PINCH = 1 };
00054 enum { SPHERIOD = 2 };
00055 enum { SCISSORS = 3 };
00056 enum { STOP = 0 };
00057 enum { CLOSE = 1 };
00058 enum { OPEN = 2 };
00059
00060 typedef boost::shared_ptr< ::riq_msgs::RIQHandCommand_<ContainerAllocator> > Ptr;
00061 typedef boost::shared_ptr< ::riq_msgs::RIQHandCommand_<ContainerAllocator> const> ConstPtr;
00062 boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00063 };
00064 typedef ::riq_msgs::RIQHandCommand_<std::allocator<void> > RIQHandCommand;
00065
00066 typedef boost::shared_ptr< ::riq_msgs::RIQHandCommand> RIQHandCommandPtr;
00067 typedef boost::shared_ptr< ::riq_msgs::RIQHandCommand const> RIQHandCommandConstPtr;
00068
00069
00070 template<typename ContainerAllocator>
00071 std::ostream& operator<<(std::ostream& s, const ::riq_msgs::RIQHandCommand_<ContainerAllocator> & v)
00072 {
00073 ros::message_operations::Printer< ::riq_msgs::RIQHandCommand_<ContainerAllocator> >::stream(s, "", v);
00074 return s;}
00075
00076 }
00077
00078 namespace ros
00079 {
00080 namespace message_traits
00081 {
00082 template<class ContainerAllocator> struct IsMessage< ::riq_msgs::RIQHandCommand_<ContainerAllocator> > : public TrueType {};
00083 template<class ContainerAllocator> struct IsMessage< ::riq_msgs::RIQHandCommand_<ContainerAllocator> const> : public TrueType {};
00084 template<class ContainerAllocator>
00085 struct MD5Sum< ::riq_msgs::RIQHandCommand_<ContainerAllocator> > {
00086 static const char* value()
00087 {
00088 return "1ea172a0fa98ff8b257948fc31b156cd";
00089 }
00090
00091 static const char* value(const ::riq_msgs::RIQHandCommand_<ContainerAllocator> &) { return value(); }
00092 static const uint64_t static_value1 = 0x1ea172a0fa98ff8bULL;
00093 static const uint64_t static_value2 = 0x257948fc31b156cdULL;
00094 };
00095
00096 template<class ContainerAllocator>
00097 struct DataType< ::riq_msgs::RIQHandCommand_<ContainerAllocator> > {
00098 static const char* value()
00099 {
00100 return "riq_msgs/RIQHandCommand";
00101 }
00102
00103 static const char* value(const ::riq_msgs::RIQHandCommand_<ContainerAllocator> &) { return value(); }
00104 };
00105
00106 template<class ContainerAllocator>
00107 struct Definition< ::riq_msgs::RIQHandCommand_<ContainerAllocator> > {
00108 static const char* value()
00109 {
00110 return "# ROS command message from RobotIQ hand\n\
00111 \n\
00112 # mode constants\n\
00113 int8 CYLINDRICAL = 0\n\
00114 int8 PINCH = 1\n\
00115 int8 SPHERIOD = 2\n\
00116 int8 SCISSORS = 3\n\
00117 \n\
00118 # action constants\n\
00119 int8 STOP = 0\n\
00120 int8 CLOSE = 1\n\
00121 int8 OPEN = 2\n\
00122 \n\
00123 \n\
00124 int8 mode # PINCH, CYLINDRICAL, SPHERIOD, SCISSORS \n\
00125 int8 action # CLOSE, OPEN, STOP\n\
00126 float64 velocity # Speed value goes from 0.0 to 1.0\n\
00127 float64 force # Force value goes from 0.0 to 1.0 \n\
00128 ";
00129 }
00130
00131 static const char* value(const ::riq_msgs::RIQHandCommand_<ContainerAllocator> &) { return value(); }
00132 };
00133
00134 template<class ContainerAllocator> struct IsFixedSize< ::riq_msgs::RIQHandCommand_<ContainerAllocator> > : public TrueType {};
00135 }
00136 }
00137
00138 namespace ros
00139 {
00140 namespace serialization
00141 {
00142
00143 template<class ContainerAllocator> struct Serializer< ::riq_msgs::RIQHandCommand_<ContainerAllocator> >
00144 {
00145 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00146 {
00147 stream.next(m.mode);
00148 stream.next(m.action);
00149 stream.next(m.velocity);
00150 stream.next(m.force);
00151 }
00152
00153 ROS_DECLARE_ALLINONE_SERIALIZER;
00154 };
00155 }
00156 }
00157
00158 namespace ros
00159 {
00160 namespace message_operations
00161 {
00162
00163 template<class ContainerAllocator>
00164 struct Printer< ::riq_msgs::RIQHandCommand_<ContainerAllocator> >
00165 {
00166 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::riq_msgs::RIQHandCommand_<ContainerAllocator> & v)
00167 {
00168 s << indent << "mode: ";
00169 Printer<int8_t>::stream(s, indent + " ", v.mode);
00170 s << indent << "action: ";
00171 Printer<int8_t>::stream(s, indent + " ", v.action);
00172 s << indent << "velocity: ";
00173 Printer<double>::stream(s, indent + " ", v.velocity);
00174 s << indent << "force: ";
00175 Printer<double>::stream(s, indent + " ", v.force);
00176 }
00177 };
00178
00179
00180 }
00181 }
00182
00183 #endif // RIQ_MSGS_MESSAGE_RIQHANDCOMMAND_H
00184