00001
00002 #ifndef ROSSERIAL_MSGS_MESSAGE_TOPICINFO_H
00003 #define ROSSERIAL_MSGS_MESSAGE_TOPICINFO_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 rosserial_msgs
00015 {
00016 template <class ContainerAllocator>
00017 struct TopicInfo_ : public ros::Message
00018 {
00019 typedef TopicInfo_<ContainerAllocator> Type;
00020
00021 TopicInfo_()
00022 : topic_id(0)
00023 , topic_name()
00024 , message_type()
00025 , md5sum()
00026 , buffer_size(0)
00027 {
00028 }
00029
00030 TopicInfo_(const ContainerAllocator& _alloc)
00031 : topic_id(0)
00032 , topic_name(_alloc)
00033 , message_type(_alloc)
00034 , md5sum(_alloc)
00035 , buffer_size(0)
00036 {
00037 }
00038
00039 typedef uint16_t _topic_id_type;
00040 uint16_t topic_id;
00041
00042 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _topic_name_type;
00043 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > topic_name;
00044
00045 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _message_type_type;
00046 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > message_type;
00047
00048 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _md5sum_type;
00049 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > md5sum;
00050
00051 typedef int32_t _buffer_size_type;
00052 int32_t buffer_size;
00053
00054 enum { ID_PUBLISHER = 0 };
00055 enum { ID_SUBSCRIBER = 1 };
00056 enum { ID_SERVICE_SERVER = 2 };
00057 enum { ID_SERVICE_CLIENT = 4 };
00058 enum { ID_PARAMETER_REQUEST = 6 };
00059 enum { ID_LOG = 7 };
00060 enum { ID_TIME = 10 };
00061
00062 private:
00063 static const char* __s_getDataType_() { return "rosserial_msgs/TopicInfo"; }
00064 public:
00065 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00066
00067 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00068
00069 private:
00070 static const char* __s_getMD5Sum_() { return "63aa5e8f1bdd6f35c69fe1a1b9d28e9f"; }
00071 public:
00072 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00073
00074 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00075
00076 private:
00077 static const char* __s_getMessageDefinition_() { return "# special topic_ids\n\
00078 uint16 ID_PUBLISHER=0\n\
00079 uint16 ID_SUBSCRIBER=1\n\
00080 uint16 ID_SERVICE_SERVER=2\n\
00081 uint16 ID_SERVICE_CLIENT=4\n\
00082 uint16 ID_PARAMETER_REQUEST=6\n\
00083 uint16 ID_LOG=7\n\
00084 uint16 ID_TIME=10\n\
00085 \n\
00086 # The endpoint ID for this topic\n\
00087 uint16 topic_id\n\
00088 \n\
00089 string topic_name\n\
00090 string message_type\n\
00091 \n\
00092 # MD5 checksum for this message type\n\
00093 string md5sum\n\
00094 \n\
00095 # size of the buffer message must fit in\n\
00096 int32 buffer_size\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, topic_id);
00108 ros::serialization::serialize(stream, topic_name);
00109 ros::serialization::serialize(stream, message_type);
00110 ros::serialization::serialize(stream, md5sum);
00111 ros::serialization::serialize(stream, buffer_size);
00112 return stream.getData();
00113 }
00114
00115 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00116 {
00117 ros::serialization::IStream stream(read_ptr, 1000000000);
00118 ros::serialization::deserialize(stream, topic_id);
00119 ros::serialization::deserialize(stream, topic_name);
00120 ros::serialization::deserialize(stream, message_type);
00121 ros::serialization::deserialize(stream, md5sum);
00122 ros::serialization::deserialize(stream, buffer_size);
00123 return stream.getData();
00124 }
00125
00126 ROS_DEPRECATED virtual uint32_t serializationLength() const
00127 {
00128 uint32_t size = 0;
00129 size += ros::serialization::serializationLength(topic_id);
00130 size += ros::serialization::serializationLength(topic_name);
00131 size += ros::serialization::serializationLength(message_type);
00132 size += ros::serialization::serializationLength(md5sum);
00133 size += ros::serialization::serializationLength(buffer_size);
00134 return size;
00135 }
00136
00137 typedef boost::shared_ptr< ::rosserial_msgs::TopicInfo_<ContainerAllocator> > Ptr;
00138 typedef boost::shared_ptr< ::rosserial_msgs::TopicInfo_<ContainerAllocator> const> ConstPtr;
00139 };
00140 typedef ::rosserial_msgs::TopicInfo_<std::allocator<void> > TopicInfo;
00141
00142 typedef boost::shared_ptr< ::rosserial_msgs::TopicInfo> TopicInfoPtr;
00143 typedef boost::shared_ptr< ::rosserial_msgs::TopicInfo const> TopicInfoConstPtr;
00144
00145
00146 template<typename ContainerAllocator>
00147 std::ostream& operator<<(std::ostream& s, const ::rosserial_msgs::TopicInfo_<ContainerAllocator> & v)
00148 {
00149 ros::message_operations::Printer< ::rosserial_msgs::TopicInfo_<ContainerAllocator> >::stream(s, "", v);
00150 return s;}
00151
00152 }
00153
00154 namespace ros
00155 {
00156 namespace message_traits
00157 {
00158 template<class ContainerAllocator>
00159 struct MD5Sum< ::rosserial_msgs::TopicInfo_<ContainerAllocator> > {
00160 static const char* value()
00161 {
00162 return "63aa5e8f1bdd6f35c69fe1a1b9d28e9f";
00163 }
00164
00165 static const char* value(const ::rosserial_msgs::TopicInfo_<ContainerAllocator> &) { return value(); }
00166 static const uint64_t static_value1 = 0x63aa5e8f1bdd6f35ULL;
00167 static const uint64_t static_value2 = 0xc69fe1a1b9d28e9fULL;
00168 };
00169
00170 template<class ContainerAllocator>
00171 struct DataType< ::rosserial_msgs::TopicInfo_<ContainerAllocator> > {
00172 static const char* value()
00173 {
00174 return "rosserial_msgs/TopicInfo";
00175 }
00176
00177 static const char* value(const ::rosserial_msgs::TopicInfo_<ContainerAllocator> &) { return value(); }
00178 };
00179
00180 template<class ContainerAllocator>
00181 struct Definition< ::rosserial_msgs::TopicInfo_<ContainerAllocator> > {
00182 static const char* value()
00183 {
00184 return "# special topic_ids\n\
00185 uint16 ID_PUBLISHER=0\n\
00186 uint16 ID_SUBSCRIBER=1\n\
00187 uint16 ID_SERVICE_SERVER=2\n\
00188 uint16 ID_SERVICE_CLIENT=4\n\
00189 uint16 ID_PARAMETER_REQUEST=6\n\
00190 uint16 ID_LOG=7\n\
00191 uint16 ID_TIME=10\n\
00192 \n\
00193 # The endpoint ID for this topic\n\
00194 uint16 topic_id\n\
00195 \n\
00196 string topic_name\n\
00197 string message_type\n\
00198 \n\
00199 # MD5 checksum for this message type\n\
00200 string md5sum\n\
00201 \n\
00202 # size of the buffer message must fit in\n\
00203 int32 buffer_size\n\
00204 \n\
00205 ";
00206 }
00207
00208 static const char* value(const ::rosserial_msgs::TopicInfo_<ContainerAllocator> &) { return value(); }
00209 };
00210
00211 }
00212 }
00213
00214 namespace ros
00215 {
00216 namespace serialization
00217 {
00218
00219 template<class ContainerAllocator> struct Serializer< ::rosserial_msgs::TopicInfo_<ContainerAllocator> >
00220 {
00221 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00222 {
00223 stream.next(m.topic_id);
00224 stream.next(m.topic_name);
00225 stream.next(m.message_type);
00226 stream.next(m.md5sum);
00227 stream.next(m.buffer_size);
00228 }
00229
00230 ROS_DECLARE_ALLINONE_SERIALIZER;
00231 };
00232 }
00233 }
00234
00235 namespace ros
00236 {
00237 namespace message_operations
00238 {
00239
00240 template<class ContainerAllocator>
00241 struct Printer< ::rosserial_msgs::TopicInfo_<ContainerAllocator> >
00242 {
00243 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::rosserial_msgs::TopicInfo_<ContainerAllocator> & v)
00244 {
00245 s << indent << "topic_id: ";
00246 Printer<uint16_t>::stream(s, indent + " ", v.topic_id);
00247 s << indent << "topic_name: ";
00248 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.topic_name);
00249 s << indent << "message_type: ";
00250 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.message_type);
00251 s << indent << "md5sum: ";
00252 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.md5sum);
00253 s << indent << "buffer_size: ";
00254 Printer<int32_t>::stream(s, indent + " ", v.buffer_size);
00255 }
00256 };
00257
00258
00259 }
00260 }
00261
00262 #endif // ROSSERIAL_MSGS_MESSAGE_TOPICINFO_H
00263