00001
00002 #ifndef PR2_MECHANISM_MSGS_MESSAGE_CONTROLLERSTATISTICS_H
00003 #define PR2_MECHANISM_MSGS_MESSAGE_CONTROLLERSTATISTICS_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_msgs
00015 {
00016 template <class ContainerAllocator>
00017 struct ControllerStatistics_ : public ros::Message
00018 {
00019 typedef ControllerStatistics_<ContainerAllocator> Type;
00020
00021 ControllerStatistics_()
00022 : name()
00023 , timestamp()
00024 , running(false)
00025 , max_time()
00026 , mean_time()
00027 , variance_time()
00028 , num_control_loop_overruns(0)
00029 , time_last_control_loop_overrun()
00030 {
00031 }
00032
00033 ControllerStatistics_(const ContainerAllocator& _alloc)
00034 : name(_alloc)
00035 , timestamp()
00036 , running(false)
00037 , max_time()
00038 , mean_time()
00039 , variance_time()
00040 , num_control_loop_overruns(0)
00041 , time_last_control_loop_overrun()
00042 {
00043 }
00044
00045 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _name_type;
00046 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > name;
00047
00048 typedef ros::Time _timestamp_type;
00049 ros::Time timestamp;
00050
00051 typedef uint8_t _running_type;
00052 uint8_t running;
00053
00054 typedef ros::Duration _max_time_type;
00055 ros::Duration max_time;
00056
00057 typedef ros::Duration _mean_time_type;
00058 ros::Duration mean_time;
00059
00060 typedef ros::Duration _variance_time_type;
00061 ros::Duration variance_time;
00062
00063 typedef int32_t _num_control_loop_overruns_type;
00064 int32_t num_control_loop_overruns;
00065
00066 typedef ros::Time _time_last_control_loop_overrun_type;
00067 ros::Time time_last_control_loop_overrun;
00068
00069
00070 private:
00071 static const char* __s_getDataType_() { return "pr2_mechanism_msgs/ControllerStatistics"; }
00072 public:
00073 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00074
00075 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00076
00077 private:
00078 static const char* __s_getMD5Sum_() { return "6d15d137eea402018e3c7c8dbecd4b95"; }
00079 public:
00080 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00081
00082 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00083
00084 private:
00085 static const char* __s_getMessageDefinition_() { return "# This message contains the state of one realtime controller\n\
00086 # that was spawned in pr2_mechanism_control\n\
00087 \n\
00088 # the name of the controller\n\
00089 string name\n\
00090 \n\
00091 # the time at which these controller statistics were measured\n\
00092 time timestamp\n\
00093 \n\
00094 # bool that indicates if the controller is currently\n\
00095 # in a running or a stopped state\n\
00096 bool running\n\
00097 \n\
00098 # the maximum time the update loop of the controller ever needed to complete\n\
00099 duration max_time\n\
00100 \n\
00101 # the average time the update loop of the controller needs to complete. \n\
00102 # the average is computed in a sliding time window.\n\
00103 duration mean_time\n\
00104 \n\
00105 # the variance on the time the update loop of the controller needs to complete.\n\
00106 # the variance applies to a sliding time window.\n\
00107 duration variance_time\n\
00108 \n\
00109 # the number of times this controller broke the realtime loop\n\
00110 int32 num_control_loop_overruns\n\
00111 \n\
00112 # the timestamp of the last time this controller broke the realtime loop\n\
00113 time time_last_control_loop_overrun\n\
00114 "; }
00115 public:
00116 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00117
00118 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00119
00120 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00121 {
00122 ros::serialization::OStream stream(write_ptr, 1000000000);
00123 ros::serialization::serialize(stream, name);
00124 ros::serialization::serialize(stream, timestamp);
00125 ros::serialization::serialize(stream, running);
00126 ros::serialization::serialize(stream, max_time);
00127 ros::serialization::serialize(stream, mean_time);
00128 ros::serialization::serialize(stream, variance_time);
00129 ros::serialization::serialize(stream, num_control_loop_overruns);
00130 ros::serialization::serialize(stream, time_last_control_loop_overrun);
00131 return stream.getData();
00132 }
00133
00134 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00135 {
00136 ros::serialization::IStream stream(read_ptr, 1000000000);
00137 ros::serialization::deserialize(stream, name);
00138 ros::serialization::deserialize(stream, timestamp);
00139 ros::serialization::deserialize(stream, running);
00140 ros::serialization::deserialize(stream, max_time);
00141 ros::serialization::deserialize(stream, mean_time);
00142 ros::serialization::deserialize(stream, variance_time);
00143 ros::serialization::deserialize(stream, num_control_loop_overruns);
00144 ros::serialization::deserialize(stream, time_last_control_loop_overrun);
00145 return stream.getData();
00146 }
00147
00148 ROS_DEPRECATED virtual uint32_t serializationLength() const
00149 {
00150 uint32_t size = 0;
00151 size += ros::serialization::serializationLength(name);
00152 size += ros::serialization::serializationLength(timestamp);
00153 size += ros::serialization::serializationLength(running);
00154 size += ros::serialization::serializationLength(max_time);
00155 size += ros::serialization::serializationLength(mean_time);
00156 size += ros::serialization::serializationLength(variance_time);
00157 size += ros::serialization::serializationLength(num_control_loop_overruns);
00158 size += ros::serialization::serializationLength(time_last_control_loop_overrun);
00159 return size;
00160 }
00161
00162 typedef boost::shared_ptr< ::pr2_mechanism_msgs::ControllerStatistics_<ContainerAllocator> > Ptr;
00163 typedef boost::shared_ptr< ::pr2_mechanism_msgs::ControllerStatistics_<ContainerAllocator> const> ConstPtr;
00164 };
00165 typedef ::pr2_mechanism_msgs::ControllerStatistics_<std::allocator<void> > ControllerStatistics;
00166
00167 typedef boost::shared_ptr< ::pr2_mechanism_msgs::ControllerStatistics> ControllerStatisticsPtr;
00168 typedef boost::shared_ptr< ::pr2_mechanism_msgs::ControllerStatistics const> ControllerStatisticsConstPtr;
00169
00170
00171 template<typename ContainerAllocator>
00172 std::ostream& operator<<(std::ostream& s, const ::pr2_mechanism_msgs::ControllerStatistics_<ContainerAllocator> & v)
00173 {
00174 ros::message_operations::Printer< ::pr2_mechanism_msgs::ControllerStatistics_<ContainerAllocator> >::stream(s, "", v);
00175 return s;}
00176
00177 }
00178
00179 namespace ros
00180 {
00181 namespace message_traits
00182 {
00183 template<class ContainerAllocator>
00184 struct MD5Sum< ::pr2_mechanism_msgs::ControllerStatistics_<ContainerAllocator> > {
00185 static const char* value()
00186 {
00187 return "6d15d137eea402018e3c7c8dbecd4b95";
00188 }
00189
00190 static const char* value(const ::pr2_mechanism_msgs::ControllerStatistics_<ContainerAllocator> &) { return value(); }
00191 static const uint64_t static_value1 = 0x6d15d137eea40201ULL;
00192 static const uint64_t static_value2 = 0x8e3c7c8dbecd4b95ULL;
00193 };
00194
00195 template<class ContainerAllocator>
00196 struct DataType< ::pr2_mechanism_msgs::ControllerStatistics_<ContainerAllocator> > {
00197 static const char* value()
00198 {
00199 return "pr2_mechanism_msgs/ControllerStatistics";
00200 }
00201
00202 static const char* value(const ::pr2_mechanism_msgs::ControllerStatistics_<ContainerAllocator> &) { return value(); }
00203 };
00204
00205 template<class ContainerAllocator>
00206 struct Definition< ::pr2_mechanism_msgs::ControllerStatistics_<ContainerAllocator> > {
00207 static const char* value()
00208 {
00209 return "# This message contains the state of one realtime controller\n\
00210 # that was spawned in pr2_mechanism_control\n\
00211 \n\
00212 # the name of the controller\n\
00213 string name\n\
00214 \n\
00215 # the time at which these controller statistics were measured\n\
00216 time timestamp\n\
00217 \n\
00218 # bool that indicates if the controller is currently\n\
00219 # in a running or a stopped state\n\
00220 bool running\n\
00221 \n\
00222 # the maximum time the update loop of the controller ever needed to complete\n\
00223 duration max_time\n\
00224 \n\
00225 # the average time the update loop of the controller needs to complete. \n\
00226 # the average is computed in a sliding time window.\n\
00227 duration mean_time\n\
00228 \n\
00229 # the variance on the time the update loop of the controller needs to complete.\n\
00230 # the variance applies to a sliding time window.\n\
00231 duration variance_time\n\
00232 \n\
00233 # the number of times this controller broke the realtime loop\n\
00234 int32 num_control_loop_overruns\n\
00235 \n\
00236 # the timestamp of the last time this controller broke the realtime loop\n\
00237 time time_last_control_loop_overrun\n\
00238 ";
00239 }
00240
00241 static const char* value(const ::pr2_mechanism_msgs::ControllerStatistics_<ContainerAllocator> &) { return value(); }
00242 };
00243
00244 }
00245 }
00246
00247 namespace ros
00248 {
00249 namespace serialization
00250 {
00251
00252 template<class ContainerAllocator> struct Serializer< ::pr2_mechanism_msgs::ControllerStatistics_<ContainerAllocator> >
00253 {
00254 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00255 {
00256 stream.next(m.name);
00257 stream.next(m.timestamp);
00258 stream.next(m.running);
00259 stream.next(m.max_time);
00260 stream.next(m.mean_time);
00261 stream.next(m.variance_time);
00262 stream.next(m.num_control_loop_overruns);
00263 stream.next(m.time_last_control_loop_overrun);
00264 }
00265
00266 ROS_DECLARE_ALLINONE_SERIALIZER;
00267 };
00268 }
00269 }
00270
00271 namespace ros
00272 {
00273 namespace message_operations
00274 {
00275
00276 template<class ContainerAllocator>
00277 struct Printer< ::pr2_mechanism_msgs::ControllerStatistics_<ContainerAllocator> >
00278 {
00279 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::pr2_mechanism_msgs::ControllerStatistics_<ContainerAllocator> & v)
00280 {
00281 s << indent << "name: ";
00282 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.name);
00283 s << indent << "timestamp: ";
00284 Printer<ros::Time>::stream(s, indent + " ", v.timestamp);
00285 s << indent << "running: ";
00286 Printer<uint8_t>::stream(s, indent + " ", v.running);
00287 s << indent << "max_time: ";
00288 Printer<ros::Duration>::stream(s, indent + " ", v.max_time);
00289 s << indent << "mean_time: ";
00290 Printer<ros::Duration>::stream(s, indent + " ", v.mean_time);
00291 s << indent << "variance_time: ";
00292 Printer<ros::Duration>::stream(s, indent + " ", v.variance_time);
00293 s << indent << "num_control_loop_overruns: ";
00294 Printer<int32_t>::stream(s, indent + " ", v.num_control_loop_overruns);
00295 s << indent << "time_last_control_loop_overrun: ";
00296 Printer<ros::Time>::stream(s, indent + " ", v.time_last_control_loop_overrun);
00297 }
00298 };
00299
00300
00301 }
00302 }
00303
00304 #endif // PR2_MECHANISM_MSGS_MESSAGE_CONTROLLERSTATISTICS_H
00305