00001
00002 #ifndef SOUND_PLAY_MESSAGE_SOUNDREQUEST_H
00003 #define SOUND_PLAY_MESSAGE_SOUNDREQUEST_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 sound_play
00015 {
00016 template <class ContainerAllocator>
00017 struct SoundRequest_ : public ros::Message
00018 {
00019 typedef SoundRequest_<ContainerAllocator> Type;
00020
00021 SoundRequest_()
00022 : sound(0)
00023 , command(0)
00024 , arg()
00025 {
00026 }
00027
00028 SoundRequest_(const ContainerAllocator& _alloc)
00029 : sound(0)
00030 , command(0)
00031 , arg(_alloc)
00032 {
00033 }
00034
00035 typedef int8_t _sound_type;
00036 int8_t sound;
00037
00038 typedef int8_t _command_type;
00039 int8_t command;
00040
00041 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _arg_type;
00042 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > arg;
00043
00044 enum { BACKINGUP = 1 };
00045 enum { NEEDS_UNPLUGGING = 2 };
00046 enum { NEEDS_PLUGGING = 3 };
00047 enum { NEEDS_UNPLUGGING_BADLY = 4 };
00048 enum { NEEDS_PLUGGING_BADLY = 5 };
00049 enum { ALL = -1 };
00050 enum { PLAY_FILE = -2 };
00051 enum { SAY = -3 };
00052 enum { PLAY_STOP = 0 };
00053 enum { PLAY_ONCE = 1 };
00054 enum { PLAY_START = 2 };
00055
00056 private:
00057 static const char* __s_getDataType_() { return "sound_play/SoundRequest"; }
00058 public:
00059 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00060
00061 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00062
00063 private:
00064 static const char* __s_getMD5Sum_() { return "9cfd61778f9f82824e2604bc63ee8104"; }
00065 public:
00066 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00067
00068 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00069
00070 private:
00071 static const char* __s_getMessageDefinition_() { return "# IMPORTANT: You should never have to generate this message yourself.\n\
00072 # Use the sound_play::SoundClient C++ helper or the\n\
00073 # sound_play.libsoundplay.SoundClient Python helper.\n\
00074 \n\
00075 # Sounds\n\
00076 int8 BACKINGUP = 1\n\
00077 int8 NEEDS_UNPLUGGING = 2\n\
00078 int8 NEEDS_PLUGGING = 3\n\
00079 int8 NEEDS_UNPLUGGING_BADLY = 4\n\
00080 int8 NEEDS_PLUGGING_BADLY = 5\n\
00081 \n\
00082 # Sound identifiers that have special meaning\n\
00083 int8 ALL = -1 # Only legal with PLAY_STOP\n\
00084 int8 PLAY_FILE = -2\n\
00085 int8 SAY = -3\n\
00086 \n\
00087 int8 sound # Selects which sound to play (see above)\n\
00088 \n\
00089 # Commands\n\
00090 int8 PLAY_STOP = 0 # Stop this sound from playing\n\
00091 int8 PLAY_ONCE = 1 # Play the sound once\n\
00092 int8 PLAY_START = 2 # Play the sound in a loop until a stop request occurs\n\
00093 \n\
00094 int8 command # Indicates what to do with the sound\n\
00095 \n\
00096 string arg # file name or text to say\n\
00097 \n\
00098 "; }
00099 public:
00100 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00101
00102 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00103
00104 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00105 {
00106 ros::serialization::OStream stream(write_ptr, 1000000000);
00107 ros::serialization::serialize(stream, sound);
00108 ros::serialization::serialize(stream, command);
00109 ros::serialization::serialize(stream, arg);
00110 return stream.getData();
00111 }
00112
00113 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00114 {
00115 ros::serialization::IStream stream(read_ptr, 1000000000);
00116 ros::serialization::deserialize(stream, sound);
00117 ros::serialization::deserialize(stream, command);
00118 ros::serialization::deserialize(stream, arg);
00119 return stream.getData();
00120 }
00121
00122 ROS_DEPRECATED virtual uint32_t serializationLength() const
00123 {
00124 uint32_t size = 0;
00125 size += ros::serialization::serializationLength(sound);
00126 size += ros::serialization::serializationLength(command);
00127 size += ros::serialization::serializationLength(arg);
00128 return size;
00129 }
00130
00131 typedef boost::shared_ptr< ::sound_play::SoundRequest_<ContainerAllocator> > Ptr;
00132 typedef boost::shared_ptr< ::sound_play::SoundRequest_<ContainerAllocator> const> ConstPtr;
00133 };
00134 typedef ::sound_play::SoundRequest_<std::allocator<void> > SoundRequest;
00135
00136 typedef boost::shared_ptr< ::sound_play::SoundRequest> SoundRequestPtr;
00137 typedef boost::shared_ptr< ::sound_play::SoundRequest const> SoundRequestConstPtr;
00138
00139
00140 template<typename ContainerAllocator>
00141 std::ostream& operator<<(std::ostream& s, const ::sound_play::SoundRequest_<ContainerAllocator> & v)
00142 {
00143 ros::message_operations::Printer< ::sound_play::SoundRequest_<ContainerAllocator> >::stream(s, "", v);
00144 return s;}
00145
00146 }
00147
00148 namespace ros
00149 {
00150 namespace message_traits
00151 {
00152 template<class ContainerAllocator>
00153 struct MD5Sum< ::sound_play::SoundRequest_<ContainerAllocator> > {
00154 static const char* value()
00155 {
00156 return "9cfd61778f9f82824e2604bc63ee8104";
00157 }
00158
00159 static const char* value(const ::sound_play::SoundRequest_<ContainerAllocator> &) { return value(); }
00160 static const uint64_t static_value1 = 0x9cfd61778f9f8282ULL;
00161 static const uint64_t static_value2 = 0x4e2604bc63ee8104ULL;
00162 };
00163
00164 template<class ContainerAllocator>
00165 struct DataType< ::sound_play::SoundRequest_<ContainerAllocator> > {
00166 static const char* value()
00167 {
00168 return "sound_play/SoundRequest";
00169 }
00170
00171 static const char* value(const ::sound_play::SoundRequest_<ContainerAllocator> &) { return value(); }
00172 };
00173
00174 template<class ContainerAllocator>
00175 struct Definition< ::sound_play::SoundRequest_<ContainerAllocator> > {
00176 static const char* value()
00177 {
00178 return "# IMPORTANT: You should never have to generate this message yourself.\n\
00179 # Use the sound_play::SoundClient C++ helper or the\n\
00180 # sound_play.libsoundplay.SoundClient Python helper.\n\
00181 \n\
00182 # Sounds\n\
00183 int8 BACKINGUP = 1\n\
00184 int8 NEEDS_UNPLUGGING = 2\n\
00185 int8 NEEDS_PLUGGING = 3\n\
00186 int8 NEEDS_UNPLUGGING_BADLY = 4\n\
00187 int8 NEEDS_PLUGGING_BADLY = 5\n\
00188 \n\
00189 # Sound identifiers that have special meaning\n\
00190 int8 ALL = -1 # Only legal with PLAY_STOP\n\
00191 int8 PLAY_FILE = -2\n\
00192 int8 SAY = -3\n\
00193 \n\
00194 int8 sound # Selects which sound to play (see above)\n\
00195 \n\
00196 # Commands\n\
00197 int8 PLAY_STOP = 0 # Stop this sound from playing\n\
00198 int8 PLAY_ONCE = 1 # Play the sound once\n\
00199 int8 PLAY_START = 2 # Play the sound in a loop until a stop request occurs\n\
00200 \n\
00201 int8 command # Indicates what to do with the sound\n\
00202 \n\
00203 string arg # file name or text to say\n\
00204 \n\
00205 ";
00206 }
00207
00208 static const char* value(const ::sound_play::SoundRequest_<ContainerAllocator> &) { return value(); }
00209 };
00210
00211 }
00212 }
00213
00214 namespace ros
00215 {
00216 namespace serialization
00217 {
00218
00219 template<class ContainerAllocator> struct Serializer< ::sound_play::SoundRequest_<ContainerAllocator> >
00220 {
00221 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00222 {
00223 stream.next(m.sound);
00224 stream.next(m.command);
00225 stream.next(m.arg);
00226 }
00227
00228 ROS_DECLARE_ALLINONE_SERIALIZER;
00229 };
00230 }
00231 }
00232
00233 namespace ros
00234 {
00235 namespace message_operations
00236 {
00237
00238 template<class ContainerAllocator>
00239 struct Printer< ::sound_play::SoundRequest_<ContainerAllocator> >
00240 {
00241 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::sound_play::SoundRequest_<ContainerAllocator> & v)
00242 {
00243 s << indent << "sound: ";
00244 Printer<int8_t>::stream(s, indent + " ", v.sound);
00245 s << indent << "command: ";
00246 Printer<int8_t>::stream(s, indent + " ", v.command);
00247 s << indent << "arg: ";
00248 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.arg);
00249 }
00250 };
00251
00252
00253 }
00254 }
00255
00256 #endif // SOUND_PLAY_MESSAGE_SOUNDREQUEST_H
00257