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