00001
00002 #ifndef PR2_MECHANISM_CONTROLLERS_MESSAGE_DEBUGINFO_H
00003 #define PR2_MECHANISM_CONTROLLERS_MESSAGE_DEBUGINFO_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 pr2_mechanism_controllers
00015 {
00016 template <class ContainerAllocator>
00017 struct DebugInfo_ : public ros::Message
00018 {
00019 typedef DebugInfo_<ContainerAllocator> Type;
00020
00021 DebugInfo_()
00022 : timing()
00023 , sequence(0)
00024 , input_valid(false)
00025 , residual(0.0)
00026 {
00027 }
00028
00029 DebugInfo_(const ContainerAllocator& _alloc)
00030 : timing(_alloc)
00031 , sequence(0)
00032 , input_valid(false)
00033 , residual(0.0)
00034 {
00035 }
00036
00037 typedef std::vector<double, typename ContainerAllocator::template rebind<double>::other > _timing_type;
00038 std::vector<double, typename ContainerAllocator::template rebind<double>::other > timing;
00039
00040 typedef int32_t _sequence_type;
00041 int32_t sequence;
00042
00043 typedef uint8_t _input_valid_type;
00044 uint8_t input_valid;
00045
00046 typedef double _residual_type;
00047 double residual;
00048
00049
00050 ROS_DEPRECATED uint32_t get_timing_size() const { return (uint32_t)timing.size(); }
00051 ROS_DEPRECATED void set_timing_size(uint32_t size) { timing.resize((size_t)size); }
00052 ROS_DEPRECATED void get_timing_vec(std::vector<double, typename ContainerAllocator::template rebind<double>::other > & vec) const { vec = this->timing; }
00053 ROS_DEPRECATED void set_timing_vec(const std::vector<double, typename ContainerAllocator::template rebind<double>::other > & vec) { this->timing = vec; }
00054 private:
00055 static const char* __s_getDataType_() { return "pr2_mechanism_controllers/DebugInfo"; }
00056 public:
00057 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00058
00059 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00060
00061 private:
00062 static const char* __s_getMD5Sum_() { return "6281356ce897e33da024b8eb319460f2"; }
00063 public:
00064 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00065
00066 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00067
00068 private:
00069 static const char* __s_getMessageDefinition_() { return "float64[] timing\n\
00070 int32 sequence\n\
00071 bool input_valid\n\
00072 float64 residual\n\
00073 "; }
00074 public:
00075 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00076
00077 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00078
00079 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00080 {
00081 ros::serialization::OStream stream(write_ptr, 1000000000);
00082 ros::serialization::serialize(stream, timing);
00083 ros::serialization::serialize(stream, sequence);
00084 ros::serialization::serialize(stream, input_valid);
00085 ros::serialization::serialize(stream, residual);
00086 return stream.getData();
00087 }
00088
00089 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00090 {
00091 ros::serialization::IStream stream(read_ptr, 1000000000);
00092 ros::serialization::deserialize(stream, timing);
00093 ros::serialization::deserialize(stream, sequence);
00094 ros::serialization::deserialize(stream, input_valid);
00095 ros::serialization::deserialize(stream, residual);
00096 return stream.getData();
00097 }
00098
00099 ROS_DEPRECATED virtual uint32_t serializationLength() const
00100 {
00101 uint32_t size = 0;
00102 size += ros::serialization::serializationLength(timing);
00103 size += ros::serialization::serializationLength(sequence);
00104 size += ros::serialization::serializationLength(input_valid);
00105 size += ros::serialization::serializationLength(residual);
00106 return size;
00107 }
00108
00109 typedef boost::shared_ptr< ::pr2_mechanism_controllers::DebugInfo_<ContainerAllocator> > Ptr;
00110 typedef boost::shared_ptr< ::pr2_mechanism_controllers::DebugInfo_<ContainerAllocator> const> ConstPtr;
00111 };
00112 typedef ::pr2_mechanism_controllers::DebugInfo_<std::allocator<void> > DebugInfo;
00113
00114 typedef boost::shared_ptr< ::pr2_mechanism_controllers::DebugInfo> DebugInfoPtr;
00115 typedef boost::shared_ptr< ::pr2_mechanism_controllers::DebugInfo const> DebugInfoConstPtr;
00116
00117
00118 template<typename ContainerAllocator>
00119 std::ostream& operator<<(std::ostream& s, const ::pr2_mechanism_controllers::DebugInfo_<ContainerAllocator> & v)
00120 {
00121 ros::message_operations::Printer< ::pr2_mechanism_controllers::DebugInfo_<ContainerAllocator> >::stream(s, "", v);
00122 return s;}
00123
00124 }
00125
00126 namespace ros
00127 {
00128 namespace message_traits
00129 {
00130 template<class ContainerAllocator>
00131 struct MD5Sum< ::pr2_mechanism_controllers::DebugInfo_<ContainerAllocator> > {
00132 static const char* value()
00133 {
00134 return "6281356ce897e33da024b8eb319460f2";
00135 }
00136
00137 static const char* value(const ::pr2_mechanism_controllers::DebugInfo_<ContainerAllocator> &) { return value(); }
00138 static const uint64_t static_value1 = 0x6281356ce897e33dULL;
00139 static const uint64_t static_value2 = 0xa024b8eb319460f2ULL;
00140 };
00141
00142 template<class ContainerAllocator>
00143 struct DataType< ::pr2_mechanism_controllers::DebugInfo_<ContainerAllocator> > {
00144 static const char* value()
00145 {
00146 return "pr2_mechanism_controllers/DebugInfo";
00147 }
00148
00149 static const char* value(const ::pr2_mechanism_controllers::DebugInfo_<ContainerAllocator> &) { return value(); }
00150 };
00151
00152 template<class ContainerAllocator>
00153 struct Definition< ::pr2_mechanism_controllers::DebugInfo_<ContainerAllocator> > {
00154 static const char* value()
00155 {
00156 return "float64[] timing\n\
00157 int32 sequence\n\
00158 bool input_valid\n\
00159 float64 residual\n\
00160 ";
00161 }
00162
00163 static const char* value(const ::pr2_mechanism_controllers::DebugInfo_<ContainerAllocator> &) { return value(); }
00164 };
00165
00166 }
00167 }
00168
00169 namespace ros
00170 {
00171 namespace serialization
00172 {
00173
00174 template<class ContainerAllocator> struct Serializer< ::pr2_mechanism_controllers::DebugInfo_<ContainerAllocator> >
00175 {
00176 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00177 {
00178 stream.next(m.timing);
00179 stream.next(m.sequence);
00180 stream.next(m.input_valid);
00181 stream.next(m.residual);
00182 }
00183
00184 ROS_DECLARE_ALLINONE_SERIALIZER;
00185 };
00186 }
00187 }
00188
00189 namespace ros
00190 {
00191 namespace message_operations
00192 {
00193
00194 template<class ContainerAllocator>
00195 struct Printer< ::pr2_mechanism_controllers::DebugInfo_<ContainerAllocator> >
00196 {
00197 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::pr2_mechanism_controllers::DebugInfo_<ContainerAllocator> & v)
00198 {
00199 s << indent << "timing[]" << std::endl;
00200 for (size_t i = 0; i < v.timing.size(); ++i)
00201 {
00202 s << indent << " timing[" << i << "]: ";
00203 Printer<double>::stream(s, indent + " ", v.timing[i]);
00204 }
00205 s << indent << "sequence: ";
00206 Printer<int32_t>::stream(s, indent + " ", v.sequence);
00207 s << indent << "input_valid: ";
00208 Printer<uint8_t>::stream(s, indent + " ", v.input_valid);
00209 s << indent << "residual: ";
00210 Printer<double>::stream(s, indent + " ", v.residual);
00211 }
00212 };
00213
00214
00215 }
00216 }
00217
00218 #endif // PR2_MECHANISM_CONTROLLERS_MESSAGE_DEBUGINFO_H
00219