00001
00002 #ifndef SENSOR_MSGS_MESSAGE_JOYFEEDBACK_H
00003 #define SENSOR_MSGS_MESSAGE_JOYFEEDBACK_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 sensor_msgs
00019 {
00020 template <class ContainerAllocator>
00021 struct JoyFeedback_ {
00022 typedef JoyFeedback_<ContainerAllocator> Type;
00023
00024 JoyFeedback_()
00025 : type(0)
00026 , id(0)
00027 , intensity(0.0)
00028 {
00029 }
00030
00031 JoyFeedback_(const ContainerAllocator& _alloc)
00032 : type(0)
00033 , id(0)
00034 , intensity(0.0)
00035 {
00036 }
00037
00038 typedef uint8_t _type_type;
00039 uint8_t type;
00040
00041 typedef uint8_t _id_type;
00042 uint8_t id;
00043
00044 typedef float _intensity_type;
00045 float intensity;
00046
00047 enum { TYPE_LED = 0 };
00048 enum { TYPE_RUMBLE = 1 };
00049 enum { TYPE_BUZZER = 2 };
00050
00051 private:
00052 static const char* __s_getDataType_() { return "sensor_msgs/JoyFeedback"; }
00053 public:
00054 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00055
00056 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00057
00058 private:
00059 static const char* __s_getMD5Sum_() { return "f4dcd73460360d98f36e55ee7f2e46f1"; }
00060 public:
00061 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00062
00063 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00064
00065 private:
00066 static const char* __s_getMessageDefinition_() { return "# Declare of the type of feedback\n\
00067 uint8 TYPE_LED = 0\n\
00068 uint8 TYPE_RUMBLE = 1\n\
00069 uint8 TYPE_BUZZER = 2\n\
00070 \n\
00071 uint8 type\n\
00072 \n\
00073 # This will hold an id number for each type of each feedback.\n\
00074 # Example, the first led would be id=0, the second would be id=1\n\
00075 uint8 id\n\
00076 \n\
00077 # Intensity of the feedback, from 0.0 to 1.0, inclusive. If device is\n\
00078 # actually binary, driver should treat 0<=x<0.5 as off, 0.5<=x<=1 as on.\n\
00079 float32 intensity\n\
00080 \n\
00081 \n\
00082 "; }
00083 public:
00084 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00085
00086 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00087
00088 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00089 {
00090 ros::serialization::OStream stream(write_ptr, 1000000000);
00091 ros::serialization::serialize(stream, type);
00092 ros::serialization::serialize(stream, id);
00093 ros::serialization::serialize(stream, intensity);
00094 return stream.getData();
00095 }
00096
00097 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00098 {
00099 ros::serialization::IStream stream(read_ptr, 1000000000);
00100 ros::serialization::deserialize(stream, type);
00101 ros::serialization::deserialize(stream, id);
00102 ros::serialization::deserialize(stream, intensity);
00103 return stream.getData();
00104 }
00105
00106 ROS_DEPRECATED virtual uint32_t serializationLength() const
00107 {
00108 uint32_t size = 0;
00109 size += ros::serialization::serializationLength(type);
00110 size += ros::serialization::serializationLength(id);
00111 size += ros::serialization::serializationLength(intensity);
00112 return size;
00113 }
00114
00115 typedef boost::shared_ptr< ::sensor_msgs::JoyFeedback_<ContainerAllocator> > Ptr;
00116 typedef boost::shared_ptr< ::sensor_msgs::JoyFeedback_<ContainerAllocator> const> ConstPtr;
00117 boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00118 };
00119 typedef ::sensor_msgs::JoyFeedback_<std::allocator<void> > JoyFeedback;
00120
00121 typedef boost::shared_ptr< ::sensor_msgs::JoyFeedback> JoyFeedbackPtr;
00122 typedef boost::shared_ptr< ::sensor_msgs::JoyFeedback const> JoyFeedbackConstPtr;
00123
00124
00125 template<typename ContainerAllocator>
00126 std::ostream& operator<<(std::ostream& s, const ::sensor_msgs::JoyFeedback_<ContainerAllocator> & v)
00127 {
00128 ros::message_operations::Printer< ::sensor_msgs::JoyFeedback_<ContainerAllocator> >::stream(s, "", v);
00129 return s;}
00130
00131 }
00132
00133 namespace ros
00134 {
00135 namespace message_traits
00136 {
00137 template<class ContainerAllocator> struct IsMessage< ::sensor_msgs::JoyFeedback_<ContainerAllocator> > : public TrueType {};
00138 template<class ContainerAllocator> struct IsMessage< ::sensor_msgs::JoyFeedback_<ContainerAllocator> const> : public TrueType {};
00139 template<class ContainerAllocator>
00140 struct MD5Sum< ::sensor_msgs::JoyFeedback_<ContainerAllocator> > {
00141 static const char* value()
00142 {
00143 return "f4dcd73460360d98f36e55ee7f2e46f1";
00144 }
00145
00146 static const char* value(const ::sensor_msgs::JoyFeedback_<ContainerAllocator> &) { return value(); }
00147 static const uint64_t static_value1 = 0xf4dcd73460360d98ULL;
00148 static const uint64_t static_value2 = 0xf36e55ee7f2e46f1ULL;
00149 };
00150
00151 template<class ContainerAllocator>
00152 struct DataType< ::sensor_msgs::JoyFeedback_<ContainerAllocator> > {
00153 static const char* value()
00154 {
00155 return "sensor_msgs/JoyFeedback";
00156 }
00157
00158 static const char* value(const ::sensor_msgs::JoyFeedback_<ContainerAllocator> &) { return value(); }
00159 };
00160
00161 template<class ContainerAllocator>
00162 struct Definition< ::sensor_msgs::JoyFeedback_<ContainerAllocator> > {
00163 static const char* value()
00164 {
00165 return "# Declare of the type of feedback\n\
00166 uint8 TYPE_LED = 0\n\
00167 uint8 TYPE_RUMBLE = 1\n\
00168 uint8 TYPE_BUZZER = 2\n\
00169 \n\
00170 uint8 type\n\
00171 \n\
00172 # This will hold an id number for each type of each feedback.\n\
00173 # Example, the first led would be id=0, the second would be id=1\n\
00174 uint8 id\n\
00175 \n\
00176 # Intensity of the feedback, from 0.0 to 1.0, inclusive. If device is\n\
00177 # actually binary, driver should treat 0<=x<0.5 as off, 0.5<=x<=1 as on.\n\
00178 float32 intensity\n\
00179 \n\
00180 \n\
00181 ";
00182 }
00183
00184 static const char* value(const ::sensor_msgs::JoyFeedback_<ContainerAllocator> &) { return value(); }
00185 };
00186
00187 template<class ContainerAllocator> struct IsFixedSize< ::sensor_msgs::JoyFeedback_<ContainerAllocator> > : public TrueType {};
00188 }
00189 }
00190
00191 namespace ros
00192 {
00193 namespace serialization
00194 {
00195
00196 template<class ContainerAllocator> struct Serializer< ::sensor_msgs::JoyFeedback_<ContainerAllocator> >
00197 {
00198 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00199 {
00200 stream.next(m.type);
00201 stream.next(m.id);
00202 stream.next(m.intensity);
00203 }
00204
00205 ROS_DECLARE_ALLINONE_SERIALIZER;
00206 };
00207 }
00208 }
00209
00210 namespace ros
00211 {
00212 namespace message_operations
00213 {
00214
00215 template<class ContainerAllocator>
00216 struct Printer< ::sensor_msgs::JoyFeedback_<ContainerAllocator> >
00217 {
00218 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::sensor_msgs::JoyFeedback_<ContainerAllocator> & v)
00219 {
00220 s << indent << "type: ";
00221 Printer<uint8_t>::stream(s, indent + " ", v.type);
00222 s << indent << "id: ";
00223 Printer<uint8_t>::stream(s, indent + " ", v.id);
00224 s << indent << "intensity: ";
00225 Printer<float>::stream(s, indent + " ", v.intensity);
00226 }
00227 };
00228
00229
00230 }
00231 }
00232
00233 #endif // SENSOR_MSGS_MESSAGE_JOYFEEDBACK_H
00234