$search
00001 /* Auto-generated by genmsg_cpp for file /home/rosbuild/hudson/workspace/doc-electric-alufr-humanoid_stacks/doc_stacks/2013-03-05_11-28-06.315559/nao_robot/nao_msgs/msg/WordRecognized.msg */ 00002 #ifndef NAO_MSGS_MESSAGE_WORDRECOGNIZED_H 00003 #define NAO_MSGS_MESSAGE_WORDRECOGNIZED_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 nao_msgs 00019 { 00020 template <class ContainerAllocator> 00021 struct WordRecognized_ { 00022 typedef WordRecognized_<ContainerAllocator> Type; 00023 00024 WordRecognized_() 00025 : words() 00026 , confidence_values() 00027 { 00028 } 00029 00030 WordRecognized_(const ContainerAllocator& _alloc) 00031 : words(_alloc) 00032 , confidence_values(_alloc) 00033 { 00034 } 00035 00036 typedef std::vector<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > , typename ContainerAllocator::template rebind<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::other > _words_type; 00037 std::vector<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > , typename ContainerAllocator::template rebind<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::other > words; 00038 00039 typedef std::vector<float, typename ContainerAllocator::template rebind<float>::other > _confidence_values_type; 00040 std::vector<float, typename ContainerAllocator::template rebind<float>::other > confidence_values; 00041 00042 00043 ROS_DEPRECATED uint32_t get_words_size() const { return (uint32_t)words.size(); } 00044 ROS_DEPRECATED void set_words_size(uint32_t size) { words.resize((size_t)size); } 00045 ROS_DEPRECATED void get_words_vec(std::vector<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > , typename ContainerAllocator::template rebind<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::other > & vec) const { vec = this->words; } 00046 ROS_DEPRECATED void set_words_vec(const std::vector<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > , typename ContainerAllocator::template rebind<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::other > & vec) { this->words = vec; } 00047 ROS_DEPRECATED uint32_t get_confidence_values_size() const { return (uint32_t)confidence_values.size(); } 00048 ROS_DEPRECATED void set_confidence_values_size(uint32_t size) { confidence_values.resize((size_t)size); } 00049 ROS_DEPRECATED void get_confidence_values_vec(std::vector<float, typename ContainerAllocator::template rebind<float>::other > & vec) const { vec = this->confidence_values; } 00050 ROS_DEPRECATED void set_confidence_values_vec(const std::vector<float, typename ContainerAllocator::template rebind<float>::other > & vec) { this->confidence_values = vec; } 00051 private: 00052 static const char* __s_getDataType_() { return "nao_msgs/WordRecognized"; } 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 "29134437cd61021f75f35f21b72b7eab"; } 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 "# Message emitted by Nao speech recognition.\n\ 00067 # It contains the list of words recognized and confidence values\n\ 00068 # Both arrays are of the same length\n\ 00069 string[] words\n\ 00070 float32[] confidence_values\n\ 00071 \n\ 00072 "; } 00073 public: 00074 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); } 00075 00076 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); } 00077 00078 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const 00079 { 00080 ros::serialization::OStream stream(write_ptr, 1000000000); 00081 ros::serialization::serialize(stream, words); 00082 ros::serialization::serialize(stream, confidence_values); 00083 return stream.getData(); 00084 } 00085 00086 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr) 00087 { 00088 ros::serialization::IStream stream(read_ptr, 1000000000); 00089 ros::serialization::deserialize(stream, words); 00090 ros::serialization::deserialize(stream, confidence_values); 00091 return stream.getData(); 00092 } 00093 00094 ROS_DEPRECATED virtual uint32_t serializationLength() const 00095 { 00096 uint32_t size = 0; 00097 size += ros::serialization::serializationLength(words); 00098 size += ros::serialization::serializationLength(confidence_values); 00099 return size; 00100 } 00101 00102 typedef boost::shared_ptr< ::nao_msgs::WordRecognized_<ContainerAllocator> > Ptr; 00103 typedef boost::shared_ptr< ::nao_msgs::WordRecognized_<ContainerAllocator> const> ConstPtr; 00104 boost::shared_ptr<std::map<std::string, std::string> > __connection_header; 00105 }; // struct WordRecognized 00106 typedef ::nao_msgs::WordRecognized_<std::allocator<void> > WordRecognized; 00107 00108 typedef boost::shared_ptr< ::nao_msgs::WordRecognized> WordRecognizedPtr; 00109 typedef boost::shared_ptr< ::nao_msgs::WordRecognized const> WordRecognizedConstPtr; 00110 00111 00112 template<typename ContainerAllocator> 00113 std::ostream& operator<<(std::ostream& s, const ::nao_msgs::WordRecognized_<ContainerAllocator> & v) 00114 { 00115 ros::message_operations::Printer< ::nao_msgs::WordRecognized_<ContainerAllocator> >::stream(s, "", v); 00116 return s;} 00117 00118 } // namespace nao_msgs 00119 00120 namespace ros 00121 { 00122 namespace message_traits 00123 { 00124 template<class ContainerAllocator> struct IsMessage< ::nao_msgs::WordRecognized_<ContainerAllocator> > : public TrueType {}; 00125 template<class ContainerAllocator> struct IsMessage< ::nao_msgs::WordRecognized_<ContainerAllocator> const> : public TrueType {}; 00126 template<class ContainerAllocator> 00127 struct MD5Sum< ::nao_msgs::WordRecognized_<ContainerAllocator> > { 00128 static const char* value() 00129 { 00130 return "29134437cd61021f75f35f21b72b7eab"; 00131 } 00132 00133 static const char* value(const ::nao_msgs::WordRecognized_<ContainerAllocator> &) { return value(); } 00134 static const uint64_t static_value1 = 0x29134437cd61021fULL; 00135 static const uint64_t static_value2 = 0x75f35f21b72b7eabULL; 00136 }; 00137 00138 template<class ContainerAllocator> 00139 struct DataType< ::nao_msgs::WordRecognized_<ContainerAllocator> > { 00140 static const char* value() 00141 { 00142 return "nao_msgs/WordRecognized"; 00143 } 00144 00145 static const char* value(const ::nao_msgs::WordRecognized_<ContainerAllocator> &) { return value(); } 00146 }; 00147 00148 template<class ContainerAllocator> 00149 struct Definition< ::nao_msgs::WordRecognized_<ContainerAllocator> > { 00150 static const char* value() 00151 { 00152 return "# Message emitted by Nao speech recognition.\n\ 00153 # It contains the list of words recognized and confidence values\n\ 00154 # Both arrays are of the same length\n\ 00155 string[] words\n\ 00156 float32[] confidence_values\n\ 00157 \n\ 00158 "; 00159 } 00160 00161 static const char* value(const ::nao_msgs::WordRecognized_<ContainerAllocator> &) { return value(); } 00162 }; 00163 00164 } // namespace message_traits 00165 } // namespace ros 00166 00167 namespace ros 00168 { 00169 namespace serialization 00170 { 00171 00172 template<class ContainerAllocator> struct Serializer< ::nao_msgs::WordRecognized_<ContainerAllocator> > 00173 { 00174 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m) 00175 { 00176 stream.next(m.words); 00177 stream.next(m.confidence_values); 00178 } 00179 00180 ROS_DECLARE_ALLINONE_SERIALIZER; 00181 }; // struct WordRecognized_ 00182 } // namespace serialization 00183 } // namespace ros 00184 00185 namespace ros 00186 { 00187 namespace message_operations 00188 { 00189 00190 template<class ContainerAllocator> 00191 struct Printer< ::nao_msgs::WordRecognized_<ContainerAllocator> > 00192 { 00193 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::nao_msgs::WordRecognized_<ContainerAllocator> & v) 00194 { 00195 s << indent << "words[]" << std::endl; 00196 for (size_t i = 0; i < v.words.size(); ++i) 00197 { 00198 s << indent << " words[" << i << "]: "; 00199 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.words[i]); 00200 } 00201 s << indent << "confidence_values[]" << std::endl; 00202 for (size_t i = 0; i < v.confidence_values.size(); ++i) 00203 { 00204 s << indent << " confidence_values[" << i << "]: "; 00205 Printer<float>::stream(s, indent + " ", v.confidence_values[i]); 00206 } 00207 } 00208 }; 00209 00210 00211 } // namespace message_operations 00212 } // namespace ros 00213 00214 #endif // NAO_MSGS_MESSAGE_WORDRECOGNIZED_H 00215