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