Go to the documentation of this file.00001
00002 #ifndef ROSSERIAL_MSGS_MESSAGE_TOPICINFO_H
00003 #define ROSSERIAL_MSGS_MESSAGE_TOPICINFO_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 rosserial_msgs
00019 {
00020 template <class ContainerAllocator>
00021 struct TopicInfo_ {
00022 typedef TopicInfo_<ContainerAllocator> Type;
00023
00024 TopicInfo_()
00025 : topic_id(0)
00026 , topic_name()
00027 , message_type()
00028 , md5sum()
00029 , buffer_size(0)
00030 {
00031 }
00032
00033 TopicInfo_(const ContainerAllocator& _alloc)
00034 : topic_id(0)
00035 , topic_name(_alloc)
00036 , message_type(_alloc)
00037 , md5sum(_alloc)
00038 , buffer_size(0)
00039 {
00040 }
00041
00042 typedef uint16_t _topic_id_type;
00043 uint16_t topic_id;
00044
00045 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _topic_name_type;
00046 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > topic_name;
00047
00048 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _message_type_type;
00049 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > message_type;
00050
00051 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _md5sum_type;
00052 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > md5sum;
00053
00054 typedef int32_t _buffer_size_type;
00055 int32_t buffer_size;
00056
00057 enum { ID_PUBLISHER = 0 };
00058 enum { ID_SUBSCRIBER = 1 };
00059 enum { ID_SERVICE_SERVER = 2 };
00060 enum { ID_SERVICE_CLIENT = 4 };
00061 enum { ID_PARAMETER_REQUEST = 6 };
00062 enum { ID_LOG = 7 };
00063 enum { ID_TIME = 10 };
00064
00065 typedef boost::shared_ptr< ::rosserial_msgs::TopicInfo_<ContainerAllocator> > Ptr;
00066 typedef boost::shared_ptr< ::rosserial_msgs::TopicInfo_<ContainerAllocator> const> ConstPtr;
00067 boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00068 };
00069 typedef ::rosserial_msgs::TopicInfo_<std::allocator<void> > TopicInfo;
00070
00071 typedef boost::shared_ptr< ::rosserial_msgs::TopicInfo> TopicInfoPtr;
00072 typedef boost::shared_ptr< ::rosserial_msgs::TopicInfo const> TopicInfoConstPtr;
00073
00074
00075 template<typename ContainerAllocator>
00076 std::ostream& operator<<(std::ostream& s, const ::rosserial_msgs::TopicInfo_<ContainerAllocator> & v)
00077 {
00078 ros::message_operations::Printer< ::rosserial_msgs::TopicInfo_<ContainerAllocator> >::stream(s, "", v);
00079 return s;}
00080
00081 }
00082
00083 namespace ros
00084 {
00085 namespace message_traits
00086 {
00087 template<class ContainerAllocator> struct IsMessage< ::rosserial_msgs::TopicInfo_<ContainerAllocator> > : public TrueType {};
00088 template<class ContainerAllocator> struct IsMessage< ::rosserial_msgs::TopicInfo_<ContainerAllocator> const> : public TrueType {};
00089 template<class ContainerAllocator>
00090 struct MD5Sum< ::rosserial_msgs::TopicInfo_<ContainerAllocator> > {
00091 static const char* value()
00092 {
00093 return "63aa5e8f1bdd6f35c69fe1a1b9d28e9f";
00094 }
00095
00096 static const char* value(const ::rosserial_msgs::TopicInfo_<ContainerAllocator> &) { return value(); }
00097 static const uint64_t static_value1 = 0x63aa5e8f1bdd6f35ULL;
00098 static const uint64_t static_value2 = 0xc69fe1a1b9d28e9fULL;
00099 };
00100
00101 template<class ContainerAllocator>
00102 struct DataType< ::rosserial_msgs::TopicInfo_<ContainerAllocator> > {
00103 static const char* value()
00104 {
00105 return "rosserial_msgs/TopicInfo";
00106 }
00107
00108 static const char* value(const ::rosserial_msgs::TopicInfo_<ContainerAllocator> &) { return value(); }
00109 };
00110
00111 template<class ContainerAllocator>
00112 struct Definition< ::rosserial_msgs::TopicInfo_<ContainerAllocator> > {
00113 static const char* value()
00114 {
00115 return "# special topic_ids\n\
00116 uint16 ID_PUBLISHER=0\n\
00117 uint16 ID_SUBSCRIBER=1\n\
00118 uint16 ID_SERVICE_SERVER=2\n\
00119 uint16 ID_SERVICE_CLIENT=4\n\
00120 uint16 ID_PARAMETER_REQUEST=6\n\
00121 uint16 ID_LOG=7\n\
00122 uint16 ID_TIME=10\n\
00123 \n\
00124 # The endpoint ID for this topic\n\
00125 uint16 topic_id\n\
00126 \n\
00127 string topic_name\n\
00128 string message_type\n\
00129 \n\
00130 # MD5 checksum for this message type\n\
00131 string md5sum\n\
00132 \n\
00133 # size of the buffer message must fit in\n\
00134 int32 buffer_size\n\
00135 \n\
00136 ";
00137 }
00138
00139 static const char* value(const ::rosserial_msgs::TopicInfo_<ContainerAllocator> &) { return value(); }
00140 };
00141
00142 }
00143 }
00144
00145 namespace ros
00146 {
00147 namespace serialization
00148 {
00149
00150 template<class ContainerAllocator> struct Serializer< ::rosserial_msgs::TopicInfo_<ContainerAllocator> >
00151 {
00152 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00153 {
00154 stream.next(m.topic_id);
00155 stream.next(m.topic_name);
00156 stream.next(m.message_type);
00157 stream.next(m.md5sum);
00158 stream.next(m.buffer_size);
00159 }
00160
00161 ROS_DECLARE_ALLINONE_SERIALIZER;
00162 };
00163 }
00164 }
00165
00166 namespace ros
00167 {
00168 namespace message_operations
00169 {
00170
00171 template<class ContainerAllocator>
00172 struct Printer< ::rosserial_msgs::TopicInfo_<ContainerAllocator> >
00173 {
00174 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::rosserial_msgs::TopicInfo_<ContainerAllocator> & v)
00175 {
00176 s << indent << "topic_id: ";
00177 Printer<uint16_t>::stream(s, indent + " ", v.topic_id);
00178 s << indent << "topic_name: ";
00179 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.topic_name);
00180 s << indent << "message_type: ";
00181 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.message_type);
00182 s << indent << "md5sum: ";
00183 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.md5sum);
00184 s << indent << "buffer_size: ";
00185 Printer<int32_t>::stream(s, indent + " ", v.buffer_size);
00186 }
00187 };
00188
00189
00190 }
00191 }
00192
00193 #endif // ROSSERIAL_MSGS_MESSAGE_TOPICINFO_H
00194