00001
00002 #ifndef VELODYNE_MSGS_MESSAGE_VELODYNEPACKET_H
00003 #define VELODYNE_MSGS_MESSAGE_VELODYNEPACKET_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 velodyne_msgs
00015 {
00016 template <class ContainerAllocator>
00017 struct VelodynePacket_ : public ros::Message
00018 {
00019 typedef VelodynePacket_<ContainerAllocator> Type;
00020
00021 VelodynePacket_()
00022 : stamp()
00023 , data()
00024 {
00025 data.assign(0);
00026 }
00027
00028 VelodynePacket_(const ContainerAllocator& _alloc)
00029 : stamp()
00030 , data()
00031 {
00032 data.assign(0);
00033 }
00034
00035 typedef ros::Time _stamp_type;
00036 ros::Time stamp;
00037
00038 typedef boost::array<uint8_t, 1206> _data_type;
00039 boost::array<uint8_t, 1206> data;
00040
00041
00042 ROS_DEPRECATED uint32_t get_data_size() const { return (uint32_t)data.size(); }
00043 private:
00044 static const char* __s_getDataType_() { return "velodyne_msgs/VelodynePacket"; }
00045 public:
00046 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00047
00048 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00049
00050 private:
00051 static const char* __s_getMD5Sum_() { return "ae4f90a23256f44e82baa08dd45c3456"; }
00052 public:
00053 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00054
00055 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00056
00057 private:
00058 static const char* __s_getMessageDefinition_() { return "# Raw Velodyne LIDAR packet.\n\
00059 \n\
00060 time stamp # packet timestamp\n\
00061 uint8[1206] data # packet contents\n\
00062 \n\
00063 \n\
00064 "; }
00065 public:
00066 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00067
00068 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00069
00070 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00071 {
00072 ros::serialization::OStream stream(write_ptr, 1000000000);
00073 ros::serialization::serialize(stream, stamp);
00074 ros::serialization::serialize(stream, data);
00075 return stream.getData();
00076 }
00077
00078 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00079 {
00080 ros::serialization::IStream stream(read_ptr, 1000000000);
00081 ros::serialization::deserialize(stream, stamp);
00082 ros::serialization::deserialize(stream, data);
00083 return stream.getData();
00084 }
00085
00086 ROS_DEPRECATED virtual uint32_t serializationLength() const
00087 {
00088 uint32_t size = 0;
00089 size += ros::serialization::serializationLength(stamp);
00090 size += ros::serialization::serializationLength(data);
00091 return size;
00092 }
00093
00094 typedef boost::shared_ptr< ::velodyne_msgs::VelodynePacket_<ContainerAllocator> > Ptr;
00095 typedef boost::shared_ptr< ::velodyne_msgs::VelodynePacket_<ContainerAllocator> const> ConstPtr;
00096 };
00097 typedef ::velodyne_msgs::VelodynePacket_<std::allocator<void> > VelodynePacket;
00098
00099 typedef boost::shared_ptr< ::velodyne_msgs::VelodynePacket> VelodynePacketPtr;
00100 typedef boost::shared_ptr< ::velodyne_msgs::VelodynePacket const> VelodynePacketConstPtr;
00101
00102
00103 template<typename ContainerAllocator>
00104 std::ostream& operator<<(std::ostream& s, const ::velodyne_msgs::VelodynePacket_<ContainerAllocator> & v)
00105 {
00106 ros::message_operations::Printer< ::velodyne_msgs::VelodynePacket_<ContainerAllocator> >::stream(s, "", v);
00107 return s;}
00108
00109 }
00110
00111 namespace ros
00112 {
00113 namespace message_traits
00114 {
00115 template<class ContainerAllocator>
00116 struct MD5Sum< ::velodyne_msgs::VelodynePacket_<ContainerAllocator> > {
00117 static const char* value()
00118 {
00119 return "ae4f90a23256f44e82baa08dd45c3456";
00120 }
00121
00122 static const char* value(const ::velodyne_msgs::VelodynePacket_<ContainerAllocator> &) { return value(); }
00123 static const uint64_t static_value1 = 0xae4f90a23256f44eULL;
00124 static const uint64_t static_value2 = 0x82baa08dd45c3456ULL;
00125 };
00126
00127 template<class ContainerAllocator>
00128 struct DataType< ::velodyne_msgs::VelodynePacket_<ContainerAllocator> > {
00129 static const char* value()
00130 {
00131 return "velodyne_msgs/VelodynePacket";
00132 }
00133
00134 static const char* value(const ::velodyne_msgs::VelodynePacket_<ContainerAllocator> &) { return value(); }
00135 };
00136
00137 template<class ContainerAllocator>
00138 struct Definition< ::velodyne_msgs::VelodynePacket_<ContainerAllocator> > {
00139 static const char* value()
00140 {
00141 return "# Raw Velodyne LIDAR packet.\n\
00142 \n\
00143 time stamp # packet timestamp\n\
00144 uint8[1206] data # packet contents\n\
00145 \n\
00146 \n\
00147 ";
00148 }
00149
00150 static const char* value(const ::velodyne_msgs::VelodynePacket_<ContainerAllocator> &) { return value(); }
00151 };
00152
00153 template<class ContainerAllocator> struct IsFixedSize< ::velodyne_msgs::VelodynePacket_<ContainerAllocator> > : public TrueType {};
00154 }
00155 }
00156
00157 namespace ros
00158 {
00159 namespace serialization
00160 {
00161
00162 template<class ContainerAllocator> struct Serializer< ::velodyne_msgs::VelodynePacket_<ContainerAllocator> >
00163 {
00164 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00165 {
00166 stream.next(m.stamp);
00167 stream.next(m.data);
00168 }
00169
00170 ROS_DECLARE_ALLINONE_SERIALIZER;
00171 };
00172 }
00173 }
00174
00175 namespace ros
00176 {
00177 namespace message_operations
00178 {
00179
00180 template<class ContainerAllocator>
00181 struct Printer< ::velodyne_msgs::VelodynePacket_<ContainerAllocator> >
00182 {
00183 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::velodyne_msgs::VelodynePacket_<ContainerAllocator> & v)
00184 {
00185 s << indent << "stamp: ";
00186 Printer<ros::Time>::stream(s, indent + " ", v.stamp);
00187 s << indent << "data[]" << std::endl;
00188 for (size_t i = 0; i < v.data.size(); ++i)
00189 {
00190 s << indent << " data[" << i << "]: ";
00191 Printer<uint8_t>::stream(s, indent + " ", v.data[i]);
00192 }
00193 }
00194 };
00195
00196
00197 }
00198 }
00199
00200 #endif // VELODYNE_MSGS_MESSAGE_VELODYNEPACKET_H
00201