$search
00001 /* Auto-generated by genmsg_cpp for file /home/rosbuild/hudson/workspace/doc-electric-ethzasl_message_transport/doc_stacks/2013-03-02_12-29-27.912819/ethzasl_message_transport/bz2_transport/msg/BZ2Packet.msg */ 00002 #ifndef BZ2_TRANSPORT_MESSAGE_BZ2PACKET_H 00003 #define BZ2_TRANSPORT_MESSAGE_BZ2PACKET_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 bz2_transport 00019 { 00020 template <class ContainerAllocator> 00021 struct BZ2Packet_ { 00022 typedef BZ2Packet_<ContainerAllocator> Type; 00023 00024 BZ2Packet_() 00025 : original_length(0) 00026 , buffer() 00027 { 00028 } 00029 00030 BZ2Packet_(const ContainerAllocator& _alloc) 00031 : original_length(0) 00032 , buffer(_alloc) 00033 { 00034 } 00035 00036 typedef uint32_t _original_length_type; 00037 uint32_t original_length; 00038 00039 typedef std::vector<uint8_t, typename ContainerAllocator::template rebind<uint8_t>::other > _buffer_type; 00040 std::vector<uint8_t, typename ContainerAllocator::template rebind<uint8_t>::other > buffer; 00041 00042 00043 ROS_DEPRECATED uint32_t get_buffer_size() const { return (uint32_t)buffer.size(); } 00044 ROS_DEPRECATED void set_buffer_size(uint32_t size) { buffer.resize((size_t)size); } 00045 ROS_DEPRECATED void get_buffer_vec(std::vector<uint8_t, typename ContainerAllocator::template rebind<uint8_t>::other > & vec) const { vec = this->buffer; } 00046 ROS_DEPRECATED void set_buffer_vec(const std::vector<uint8_t, typename ContainerAllocator::template rebind<uint8_t>::other > & vec) { this->buffer = vec; } 00047 private: 00048 static const char* __s_getDataType_() { return "bz2_transport/BZ2Packet"; } 00049 public: 00050 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); } 00051 00052 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); } 00053 00054 private: 00055 static const char* __s_getMD5Sum_() { return "37a209db6e0c11cc6c12601cdd2e4aef"; } 00056 public: 00057 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); } 00058 00059 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); } 00060 00061 private: 00062 static const char* __s_getMessageDefinition_() { return "uint32 original_length\n\ 00063 uint8[] buffer\n\ 00064 \n\ 00065 "; } 00066 public: 00067 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); } 00068 00069 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); } 00070 00071 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const 00072 { 00073 ros::serialization::OStream stream(write_ptr, 1000000000); 00074 ros::serialization::serialize(stream, original_length); 00075 ros::serialization::serialize(stream, buffer); 00076 return stream.getData(); 00077 } 00078 00079 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr) 00080 { 00081 ros::serialization::IStream stream(read_ptr, 1000000000); 00082 ros::serialization::deserialize(stream, original_length); 00083 ros::serialization::deserialize(stream, buffer); 00084 return stream.getData(); 00085 } 00086 00087 ROS_DEPRECATED virtual uint32_t serializationLength() const 00088 { 00089 uint32_t size = 0; 00090 size += ros::serialization::serializationLength(original_length); 00091 size += ros::serialization::serializationLength(buffer); 00092 return size; 00093 } 00094 00095 typedef boost::shared_ptr< ::bz2_transport::BZ2Packet_<ContainerAllocator> > Ptr; 00096 typedef boost::shared_ptr< ::bz2_transport::BZ2Packet_<ContainerAllocator> const> ConstPtr; 00097 boost::shared_ptr<std::map<std::string, std::string> > __connection_header; 00098 }; // struct BZ2Packet 00099 typedef ::bz2_transport::BZ2Packet_<std::allocator<void> > BZ2Packet; 00100 00101 typedef boost::shared_ptr< ::bz2_transport::BZ2Packet> BZ2PacketPtr; 00102 typedef boost::shared_ptr< ::bz2_transport::BZ2Packet const> BZ2PacketConstPtr; 00103 00104 00105 template<typename ContainerAllocator> 00106 std::ostream& operator<<(std::ostream& s, const ::bz2_transport::BZ2Packet_<ContainerAllocator> & v) 00107 { 00108 ros::message_operations::Printer< ::bz2_transport::BZ2Packet_<ContainerAllocator> >::stream(s, "", v); 00109 return s;} 00110 00111 } // namespace bz2_transport 00112 00113 namespace ros 00114 { 00115 namespace message_traits 00116 { 00117 template<class ContainerAllocator> struct IsMessage< ::bz2_transport::BZ2Packet_<ContainerAllocator> > : public TrueType {}; 00118 template<class ContainerAllocator> struct IsMessage< ::bz2_transport::BZ2Packet_<ContainerAllocator> const> : public TrueType {}; 00119 template<class ContainerAllocator> 00120 struct MD5Sum< ::bz2_transport::BZ2Packet_<ContainerAllocator> > { 00121 static const char* value() 00122 { 00123 return "37a209db6e0c11cc6c12601cdd2e4aef"; 00124 } 00125 00126 static const char* value(const ::bz2_transport::BZ2Packet_<ContainerAllocator> &) { return value(); } 00127 static const uint64_t static_value1 = 0x37a209db6e0c11ccULL; 00128 static const uint64_t static_value2 = 0x6c12601cdd2e4aefULL; 00129 }; 00130 00131 template<class ContainerAllocator> 00132 struct DataType< ::bz2_transport::BZ2Packet_<ContainerAllocator> > { 00133 static const char* value() 00134 { 00135 return "bz2_transport/BZ2Packet"; 00136 } 00137 00138 static const char* value(const ::bz2_transport::BZ2Packet_<ContainerAllocator> &) { return value(); } 00139 }; 00140 00141 template<class ContainerAllocator> 00142 struct Definition< ::bz2_transport::BZ2Packet_<ContainerAllocator> > { 00143 static const char* value() 00144 { 00145 return "uint32 original_length\n\ 00146 uint8[] buffer\n\ 00147 \n\ 00148 "; 00149 } 00150 00151 static const char* value(const ::bz2_transport::BZ2Packet_<ContainerAllocator> &) { return value(); } 00152 }; 00153 00154 } // namespace message_traits 00155 } // namespace ros 00156 00157 namespace ros 00158 { 00159 namespace serialization 00160 { 00161 00162 template<class ContainerAllocator> struct Serializer< ::bz2_transport::BZ2Packet_<ContainerAllocator> > 00163 { 00164 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m) 00165 { 00166 stream.next(m.original_length); 00167 stream.next(m.buffer); 00168 } 00169 00170 ROS_DECLARE_ALLINONE_SERIALIZER; 00171 }; // struct BZ2Packet_ 00172 } // namespace serialization 00173 } // namespace ros 00174 00175 namespace ros 00176 { 00177 namespace message_operations 00178 { 00179 00180 template<class ContainerAllocator> 00181 struct Printer< ::bz2_transport::BZ2Packet_<ContainerAllocator> > 00182 { 00183 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::bz2_transport::BZ2Packet_<ContainerAllocator> & v) 00184 { 00185 s << indent << "original_length: "; 00186 Printer<uint32_t>::stream(s, indent + " ", v.original_length); 00187 s << indent << "buffer[]" << std::endl; 00188 for (size_t i = 0; i < v.buffer.size(); ++i) 00189 { 00190 s << indent << " buffer[" << i << "]: "; 00191 Printer<uint8_t>::stream(s, indent + " ", v.buffer[i]); 00192 } 00193 } 00194 }; 00195 00196 00197 } // namespace message_operations 00198 } // namespace ros 00199 00200 #endif // BZ2_TRANSPORT_MESSAGE_BZ2PACKET_H 00201