00001
00002 #ifndef VELODYNE_MSGS_MESSAGE_VELODYNESCAN_H
00003 #define VELODYNE_MSGS_MESSAGE_VELODYNESCAN_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 #include "std_msgs/Header.h"
00014 #include "velodyne_msgs/VelodynePacket.h"
00015
00016 namespace velodyne_msgs
00017 {
00018 template <class ContainerAllocator>
00019 struct VelodyneScan_ : public ros::Message
00020 {
00021 typedef VelodyneScan_<ContainerAllocator> Type;
00022
00023 VelodyneScan_()
00024 : header()
00025 , packets()
00026 {
00027 }
00028
00029 VelodyneScan_(const ContainerAllocator& _alloc)
00030 : header(_alloc)
00031 , packets(_alloc)
00032 {
00033 }
00034
00035 typedef ::std_msgs::Header_<ContainerAllocator> _header_type;
00036 ::std_msgs::Header_<ContainerAllocator> header;
00037
00038 typedef std::vector< ::velodyne_msgs::VelodynePacket_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::velodyne_msgs::VelodynePacket_<ContainerAllocator> >::other > _packets_type;
00039 std::vector< ::velodyne_msgs::VelodynePacket_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::velodyne_msgs::VelodynePacket_<ContainerAllocator> >::other > packets;
00040
00041 enum { PACKETS_PER_REVOLUTION = 260 };
00042
00043 ROS_DEPRECATED uint32_t get_packets_size() const { return (uint32_t)packets.size(); }
00044 ROS_DEPRECATED void set_packets_size(uint32_t size) { packets.resize((size_t)size); }
00045 ROS_DEPRECATED void get_packets_vec(std::vector< ::velodyne_msgs::VelodynePacket_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::velodyne_msgs::VelodynePacket_<ContainerAllocator> >::other > & vec) const { vec = this->packets; }
00046 ROS_DEPRECATED void set_packets_vec(const std::vector< ::velodyne_msgs::VelodynePacket_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::velodyne_msgs::VelodynePacket_<ContainerAllocator> >::other > & vec) { this->packets = vec; }
00047 private:
00048 static const char* __s_getDataType_() { return "velodyne_msgs/VelodyneScan"; }
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 "9e3f252cfbc1351977f97c0549b33f49"; }
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 "# Velodyne LIDAR scan packets.\n\
00063 \n\
00064 uint32 PACKETS_PER_REVOLUTION = 260\n\
00065 \n\
00066 Header header # standard ROS message header\n\
00067 VelodynePacket[] packets # vector of raw packets\n\
00068 \n\
00069 ================================================================================\n\
00070 MSG: std_msgs/Header\n\
00071 # Standard metadata for higher-level stamped data types.\n\
00072 # This is generally used to communicate timestamped data \n\
00073 # in a particular coordinate frame.\n\
00074 # \n\
00075 # sequence ID: consecutively increasing ID \n\
00076 uint32 seq\n\
00077 #Two-integer timestamp that is expressed as:\n\
00078 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00079 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00080 # time-handling sugar is provided by the client library\n\
00081 time stamp\n\
00082 #Frame this data is associated with\n\
00083 # 0: no frame\n\
00084 # 1: global frame\n\
00085 string frame_id\n\
00086 \n\
00087 ================================================================================\n\
00088 MSG: velodyne_msgs/VelodynePacket\n\
00089 # Raw Velodyne LIDAR packet.\n\
00090 \n\
00091 time stamp # packet timestamp\n\
00092 uint8[1206] data # packet contents\n\
00093 \n\
00094 \n\
00095 "; }
00096 public:
00097 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00098
00099 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00100
00101 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00102 {
00103 ros::serialization::OStream stream(write_ptr, 1000000000);
00104 ros::serialization::serialize(stream, header);
00105 ros::serialization::serialize(stream, packets);
00106 return stream.getData();
00107 }
00108
00109 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00110 {
00111 ros::serialization::IStream stream(read_ptr, 1000000000);
00112 ros::serialization::deserialize(stream, header);
00113 ros::serialization::deserialize(stream, packets);
00114 return stream.getData();
00115 }
00116
00117 ROS_DEPRECATED virtual uint32_t serializationLength() const
00118 {
00119 uint32_t size = 0;
00120 size += ros::serialization::serializationLength(header);
00121 size += ros::serialization::serializationLength(packets);
00122 return size;
00123 }
00124
00125 typedef boost::shared_ptr< ::velodyne_msgs::VelodyneScan_<ContainerAllocator> > Ptr;
00126 typedef boost::shared_ptr< ::velodyne_msgs::VelodyneScan_<ContainerAllocator> const> ConstPtr;
00127 };
00128 typedef ::velodyne_msgs::VelodyneScan_<std::allocator<void> > VelodyneScan;
00129
00130 typedef boost::shared_ptr< ::velodyne_msgs::VelodyneScan> VelodyneScanPtr;
00131 typedef boost::shared_ptr< ::velodyne_msgs::VelodyneScan const> VelodyneScanConstPtr;
00132
00133
00134 template<typename ContainerAllocator>
00135 std::ostream& operator<<(std::ostream& s, const ::velodyne_msgs::VelodyneScan_<ContainerAllocator> & v)
00136 {
00137 ros::message_operations::Printer< ::velodyne_msgs::VelodyneScan_<ContainerAllocator> >::stream(s, "", v);
00138 return s;}
00139
00140 }
00141
00142 namespace ros
00143 {
00144 namespace message_traits
00145 {
00146 template<class ContainerAllocator>
00147 struct MD5Sum< ::velodyne_msgs::VelodyneScan_<ContainerAllocator> > {
00148 static const char* value()
00149 {
00150 return "9e3f252cfbc1351977f97c0549b33f49";
00151 }
00152
00153 static const char* value(const ::velodyne_msgs::VelodyneScan_<ContainerAllocator> &) { return value(); }
00154 static const uint64_t static_value1 = 0x9e3f252cfbc13519ULL;
00155 static const uint64_t static_value2 = 0x77f97c0549b33f49ULL;
00156 };
00157
00158 template<class ContainerAllocator>
00159 struct DataType< ::velodyne_msgs::VelodyneScan_<ContainerAllocator> > {
00160 static const char* value()
00161 {
00162 return "velodyne_msgs/VelodyneScan";
00163 }
00164
00165 static const char* value(const ::velodyne_msgs::VelodyneScan_<ContainerAllocator> &) { return value(); }
00166 };
00167
00168 template<class ContainerAllocator>
00169 struct Definition< ::velodyne_msgs::VelodyneScan_<ContainerAllocator> > {
00170 static const char* value()
00171 {
00172 return "# Velodyne LIDAR scan packets.\n\
00173 \n\
00174 uint32 PACKETS_PER_REVOLUTION = 260\n\
00175 \n\
00176 Header header # standard ROS message header\n\
00177 VelodynePacket[] packets # vector of raw packets\n\
00178 \n\
00179 ================================================================================\n\
00180 MSG: std_msgs/Header\n\
00181 # Standard metadata for higher-level stamped data types.\n\
00182 # This is generally used to communicate timestamped data \n\
00183 # in a particular coordinate frame.\n\
00184 # \n\
00185 # sequence ID: consecutively increasing ID \n\
00186 uint32 seq\n\
00187 #Two-integer timestamp that is expressed as:\n\
00188 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00189 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00190 # time-handling sugar is provided by the client library\n\
00191 time stamp\n\
00192 #Frame this data is associated with\n\
00193 # 0: no frame\n\
00194 # 1: global frame\n\
00195 string frame_id\n\
00196 \n\
00197 ================================================================================\n\
00198 MSG: velodyne_msgs/VelodynePacket\n\
00199 # Raw Velodyne LIDAR packet.\n\
00200 \n\
00201 time stamp # packet timestamp\n\
00202 uint8[1206] data # packet contents\n\
00203 \n\
00204 \n\
00205 ";
00206 }
00207
00208 static const char* value(const ::velodyne_msgs::VelodyneScan_<ContainerAllocator> &) { return value(); }
00209 };
00210
00211 template<class ContainerAllocator> struct HasHeader< ::velodyne_msgs::VelodyneScan_<ContainerAllocator> > : public TrueType {};
00212 template<class ContainerAllocator> struct HasHeader< const ::velodyne_msgs::VelodyneScan_<ContainerAllocator> > : public TrueType {};
00213 }
00214 }
00215
00216 namespace ros
00217 {
00218 namespace serialization
00219 {
00220
00221 template<class ContainerAllocator> struct Serializer< ::velodyne_msgs::VelodyneScan_<ContainerAllocator> >
00222 {
00223 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00224 {
00225 stream.next(m.header);
00226 stream.next(m.packets);
00227 }
00228
00229 ROS_DECLARE_ALLINONE_SERIALIZER;
00230 };
00231 }
00232 }
00233
00234 namespace ros
00235 {
00236 namespace message_operations
00237 {
00238
00239 template<class ContainerAllocator>
00240 struct Printer< ::velodyne_msgs::VelodyneScan_<ContainerAllocator> >
00241 {
00242 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::velodyne_msgs::VelodyneScan_<ContainerAllocator> & v)
00243 {
00244 s << indent << "header: ";
00245 s << std::endl;
00246 Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header);
00247 s << indent << "packets[]" << std::endl;
00248 for (size_t i = 0; i < v.packets.size(); ++i)
00249 {
00250 s << indent << " packets[" << i << "]: ";
00251 s << std::endl;
00252 s << indent;
00253 Printer< ::velodyne_msgs::VelodynePacket_<ContainerAllocator> >::stream(s, indent + " ", v.packets[i]);
00254 }
00255 }
00256 };
00257
00258
00259 }
00260 }
00261
00262 #endif // VELODYNE_MSGS_MESSAGE_VELODYNESCAN_H
00263