00001
00002 #ifndef THEORA_IMAGEM_TRANSPORT_MESSAGE_PACKET_H
00003 #define THEORA_IMAGEM_TRANSPORT_MESSAGE_PACKET_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 theora_imagem_transport
00015 {
00016 template <class ContainerAllocator>
00017 struct packet_ : public ros::Message
00018 {
00019 typedef packet_<ContainerAllocator> Type;
00020
00021 packet_()
00022 : blob()
00023 , bytes(0)
00024 , b_o_s(0)
00025 , e_o_s(0)
00026 , granulepos(0)
00027 , packetno(0)
00028 {
00029 }
00030
00031 packet_(const ContainerAllocator& _alloc)
00032 : blob(_alloc)
00033 , bytes(0)
00034 , b_o_s(0)
00035 , e_o_s(0)
00036 , granulepos(0)
00037 , packetno(0)
00038 {
00039 }
00040
00041 typedef std::vector<uint8_t, typename ContainerAllocator::template rebind<uint8_t>::other > _blob_type;
00042 std::vector<uint8_t, typename ContainerAllocator::template rebind<uint8_t>::other > blob;
00043
00044 typedef int32_t _bytes_type;
00045 int32_t bytes;
00046
00047 typedef int32_t _b_o_s_type;
00048 int32_t b_o_s;
00049
00050 typedef int32_t _e_o_s_type;
00051 int32_t e_o_s;
00052
00053 typedef int64_t _granulepos_type;
00054 int64_t granulepos;
00055
00056 typedef int64_t _packetno_type;
00057 int64_t packetno;
00058
00059
00060 ROS_DEPRECATED uint32_t get_blob_size() const { return (uint32_t)blob.size(); }
00061 ROS_DEPRECATED void set_blob_size(uint32_t size) { blob.resize((size_t)size); }
00062 ROS_DEPRECATED void get_blob_vec(std::vector<uint8_t, typename ContainerAllocator::template rebind<uint8_t>::other > & vec) const { vec = this->blob; }
00063 ROS_DEPRECATED void set_blob_vec(const std::vector<uint8_t, typename ContainerAllocator::template rebind<uint8_t>::other > & vec) { this->blob = vec; }
00064 private:
00065 static const char* __s_getDataType_() { return "theora_imagem_transport/packet"; }
00066 public:
00067 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00068
00069 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00070
00071 private:
00072 static const char* __s_getMD5Sum_() { return "d804434eb295ca184dd6d2e32479185c"; }
00073 public:
00074 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00075
00076 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00077
00078 private:
00079 static const char* __s_getMessageDefinition_() { return "uint8[] blob\n\
00080 int32 bytes\n\
00081 int32 b_o_s\n\
00082 int32 e_o_s\n\
00083 \n\
00084 int64 granulepos \n\
00085 int64 packetno\n\
00086 "; }
00087 public:
00088 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00089
00090 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00091
00092 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00093 {
00094 ros::serialization::OStream stream(write_ptr, 1000000000);
00095 ros::serialization::serialize(stream, blob);
00096 ros::serialization::serialize(stream, bytes);
00097 ros::serialization::serialize(stream, b_o_s);
00098 ros::serialization::serialize(stream, e_o_s);
00099 ros::serialization::serialize(stream, granulepos);
00100 ros::serialization::serialize(stream, packetno);
00101 return stream.getData();
00102 }
00103
00104 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00105 {
00106 ros::serialization::IStream stream(read_ptr, 1000000000);
00107 ros::serialization::deserialize(stream, blob);
00108 ros::serialization::deserialize(stream, bytes);
00109 ros::serialization::deserialize(stream, b_o_s);
00110 ros::serialization::deserialize(stream, e_o_s);
00111 ros::serialization::deserialize(stream, granulepos);
00112 ros::serialization::deserialize(stream, packetno);
00113 return stream.getData();
00114 }
00115
00116 ROS_DEPRECATED virtual uint32_t serializationLength() const
00117 {
00118 uint32_t size = 0;
00119 size += ros::serialization::serializationLength(blob);
00120 size += ros::serialization::serializationLength(bytes);
00121 size += ros::serialization::serializationLength(b_o_s);
00122 size += ros::serialization::serializationLength(e_o_s);
00123 size += ros::serialization::serializationLength(granulepos);
00124 size += ros::serialization::serializationLength(packetno);
00125 return size;
00126 }
00127
00128 typedef boost::shared_ptr< ::theora_imagem_transport::packet_<ContainerAllocator> > Ptr;
00129 typedef boost::shared_ptr< ::theora_imagem_transport::packet_<ContainerAllocator> const> ConstPtr;
00130 };
00131 typedef ::theora_imagem_transport::packet_<std::allocator<void> > packet;
00132
00133 typedef boost::shared_ptr< ::theora_imagem_transport::packet> packetPtr;
00134 typedef boost::shared_ptr< ::theora_imagem_transport::packet const> packetConstPtr;
00135
00136
00137 template<typename ContainerAllocator>
00138 std::ostream& operator<<(std::ostream& s, const ::theora_imagem_transport::packet_<ContainerAllocator> & v)
00139 {
00140 ros::message_operations::Printer< ::theora_imagem_transport::packet_<ContainerAllocator> >::stream(s, "", v);
00141 return s;}
00142
00143 }
00144
00145 namespace ros
00146 {
00147 namespace message_traits
00148 {
00149 template<class ContainerAllocator>
00150 struct MD5Sum< ::theora_imagem_transport::packet_<ContainerAllocator> > {
00151 static const char* value()
00152 {
00153 return "d804434eb295ca184dd6d2e32479185c";
00154 }
00155
00156 static const char* value(const ::theora_imagem_transport::packet_<ContainerAllocator> &) { return value(); }
00157 static const uint64_t static_value1 = 0xd804434eb295ca18ULL;
00158 static const uint64_t static_value2 = 0x4dd6d2e32479185cULL;
00159 };
00160
00161 template<class ContainerAllocator>
00162 struct DataType< ::theora_imagem_transport::packet_<ContainerAllocator> > {
00163 static const char* value()
00164 {
00165 return "theora_imagem_transport/packet";
00166 }
00167
00168 static const char* value(const ::theora_imagem_transport::packet_<ContainerAllocator> &) { return value(); }
00169 };
00170
00171 template<class ContainerAllocator>
00172 struct Definition< ::theora_imagem_transport::packet_<ContainerAllocator> > {
00173 static const char* value()
00174 {
00175 return "uint8[] blob\n\
00176 int32 bytes\n\
00177 int32 b_o_s\n\
00178 int32 e_o_s\n\
00179 \n\
00180 int64 granulepos \n\
00181 int64 packetno\n\
00182 ";
00183 }
00184
00185 static const char* value(const ::theora_imagem_transport::packet_<ContainerAllocator> &) { return value(); }
00186 };
00187
00188 }
00189 }
00190
00191 namespace ros
00192 {
00193 namespace serialization
00194 {
00195
00196 template<class ContainerAllocator> struct Serializer< ::theora_imagem_transport::packet_<ContainerAllocator> >
00197 {
00198 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00199 {
00200 stream.next(m.blob);
00201 stream.next(m.bytes);
00202 stream.next(m.b_o_s);
00203 stream.next(m.e_o_s);
00204 stream.next(m.granulepos);
00205 stream.next(m.packetno);
00206 }
00207
00208 ROS_DECLARE_ALLINONE_SERIALIZER;
00209 };
00210 }
00211 }
00212
00213 namespace ros
00214 {
00215 namespace message_operations
00216 {
00217
00218 template<class ContainerAllocator>
00219 struct Printer< ::theora_imagem_transport::packet_<ContainerAllocator> >
00220 {
00221 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::theora_imagem_transport::packet_<ContainerAllocator> & v)
00222 {
00223 s << indent << "blob[]" << std::endl;
00224 for (size_t i = 0; i < v.blob.size(); ++i)
00225 {
00226 s << indent << " blob[" << i << "]: ";
00227 Printer<uint8_t>::stream(s, indent + " ", v.blob[i]);
00228 }
00229 s << indent << "bytes: ";
00230 Printer<int32_t>::stream(s, indent + " ", v.bytes);
00231 s << indent << "b_o_s: ";
00232 Printer<int32_t>::stream(s, indent + " ", v.b_o_s);
00233 s << indent << "e_o_s: ";
00234 Printer<int32_t>::stream(s, indent + " ", v.e_o_s);
00235 s << indent << "granulepos: ";
00236 Printer<int64_t>::stream(s, indent + " ", v.granulepos);
00237 s << indent << "packetno: ";
00238 Printer<int64_t>::stream(s, indent + " ", v.packetno);
00239 }
00240 };
00241
00242
00243 }
00244 }
00245
00246 #endif // THEORA_IMAGEM_TRANSPORT_MESSAGE_PACKET_H
00247