00001
00002 #ifndef PR2_MSGS_MESSAGE_GPUSTATUS_H
00003 #define PR2_MSGS_MESSAGE_GPUSTATUS_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
00015 namespace pr2_msgs
00016 {
00017 template <class ContainerAllocator>
00018 struct GPUStatus_ : public ros::Message
00019 {
00020 typedef GPUStatus_<ContainerAllocator> Type;
00021
00022 GPUStatus_()
00023 : header()
00024 , product_name()
00025 , pci_device_id()
00026 , pci_location()
00027 , display()
00028 , driver_version()
00029 , temperature(0.0)
00030 , fan_speed(0.0)
00031 , gpu_usage(0.0)
00032 , memory_usage(0.0)
00033 {
00034 }
00035
00036 GPUStatus_(const ContainerAllocator& _alloc)
00037 : header(_alloc)
00038 , product_name(_alloc)
00039 , pci_device_id(_alloc)
00040 , pci_location(_alloc)
00041 , display(_alloc)
00042 , driver_version(_alloc)
00043 , temperature(0.0)
00044 , fan_speed(0.0)
00045 , gpu_usage(0.0)
00046 , memory_usage(0.0)
00047 {
00048 }
00049
00050 typedef ::std_msgs::Header_<ContainerAllocator> _header_type;
00051 ::std_msgs::Header_<ContainerAllocator> header;
00052
00053 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _product_name_type;
00054 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > product_name;
00055
00056 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _pci_device_id_type;
00057 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > pci_device_id;
00058
00059 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _pci_location_type;
00060 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > pci_location;
00061
00062 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _display_type;
00063 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > display;
00064
00065 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _driver_version_type;
00066 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > driver_version;
00067
00068 typedef float _temperature_type;
00069 float temperature;
00070
00071 typedef float _fan_speed_type;
00072 float fan_speed;
00073
00074 typedef float _gpu_usage_type;
00075 float gpu_usage;
00076
00077 typedef float _memory_usage_type;
00078 float memory_usage;
00079
00080
00081 private:
00082 static const char* __s_getDataType_() { return "pr2_msgs/GPUStatus"; }
00083 public:
00084 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00085
00086 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00087
00088 private:
00089 static const char* __s_getMD5Sum_() { return "4c74e5474b8aade04e56108262099c6e"; }
00090 public:
00091 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00092
00093 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00094
00095 private:
00096 static const char* __s_getMessageDefinition_() { return "Header header\n\
00097 string product_name\n\
00098 string pci_device_id\n\
00099 string pci_location\n\
00100 string display\n\
00101 string driver_version\n\
00102 float32 temperature # Temperature in Celcius\n\
00103 float32 fan_speed # Fan speed in rad/s\n\
00104 float32 gpu_usage # Usage in percent\n\
00105 float32 memory_usage # Usage in percent\n\
00106 ================================================================================\n\
00107 MSG: std_msgs/Header\n\
00108 # Standard metadata for higher-level stamped data types.\n\
00109 # This is generally used to communicate timestamped data \n\
00110 # in a particular coordinate frame.\n\
00111 # \n\
00112 # sequence ID: consecutively increasing ID \n\
00113 uint32 seq\n\
00114 #Two-integer timestamp that is expressed as:\n\
00115 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00116 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00117 # time-handling sugar is provided by the client library\n\
00118 time stamp\n\
00119 #Frame this data is associated with\n\
00120 # 0: no frame\n\
00121 # 1: global frame\n\
00122 string frame_id\n\
00123 \n\
00124 "; }
00125 public:
00126 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00127
00128 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00129
00130 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00131 {
00132 ros::serialization::OStream stream(write_ptr, 1000000000);
00133 ros::serialization::serialize(stream, header);
00134 ros::serialization::serialize(stream, product_name);
00135 ros::serialization::serialize(stream, pci_device_id);
00136 ros::serialization::serialize(stream, pci_location);
00137 ros::serialization::serialize(stream, display);
00138 ros::serialization::serialize(stream, driver_version);
00139 ros::serialization::serialize(stream, temperature);
00140 ros::serialization::serialize(stream, fan_speed);
00141 ros::serialization::serialize(stream, gpu_usage);
00142 ros::serialization::serialize(stream, memory_usage);
00143 return stream.getData();
00144 }
00145
00146 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00147 {
00148 ros::serialization::IStream stream(read_ptr, 1000000000);
00149 ros::serialization::deserialize(stream, header);
00150 ros::serialization::deserialize(stream, product_name);
00151 ros::serialization::deserialize(stream, pci_device_id);
00152 ros::serialization::deserialize(stream, pci_location);
00153 ros::serialization::deserialize(stream, display);
00154 ros::serialization::deserialize(stream, driver_version);
00155 ros::serialization::deserialize(stream, temperature);
00156 ros::serialization::deserialize(stream, fan_speed);
00157 ros::serialization::deserialize(stream, gpu_usage);
00158 ros::serialization::deserialize(stream, memory_usage);
00159 return stream.getData();
00160 }
00161
00162 ROS_DEPRECATED virtual uint32_t serializationLength() const
00163 {
00164 uint32_t size = 0;
00165 size += ros::serialization::serializationLength(header);
00166 size += ros::serialization::serializationLength(product_name);
00167 size += ros::serialization::serializationLength(pci_device_id);
00168 size += ros::serialization::serializationLength(pci_location);
00169 size += ros::serialization::serializationLength(display);
00170 size += ros::serialization::serializationLength(driver_version);
00171 size += ros::serialization::serializationLength(temperature);
00172 size += ros::serialization::serializationLength(fan_speed);
00173 size += ros::serialization::serializationLength(gpu_usage);
00174 size += ros::serialization::serializationLength(memory_usage);
00175 return size;
00176 }
00177
00178 typedef boost::shared_ptr< ::pr2_msgs::GPUStatus_<ContainerAllocator> > Ptr;
00179 typedef boost::shared_ptr< ::pr2_msgs::GPUStatus_<ContainerAllocator> const> ConstPtr;
00180 };
00181 typedef ::pr2_msgs::GPUStatus_<std::allocator<void> > GPUStatus;
00182
00183 typedef boost::shared_ptr< ::pr2_msgs::GPUStatus> GPUStatusPtr;
00184 typedef boost::shared_ptr< ::pr2_msgs::GPUStatus const> GPUStatusConstPtr;
00185
00186
00187 template<typename ContainerAllocator>
00188 std::ostream& operator<<(std::ostream& s, const ::pr2_msgs::GPUStatus_<ContainerAllocator> & v)
00189 {
00190 ros::message_operations::Printer< ::pr2_msgs::GPUStatus_<ContainerAllocator> >::stream(s, "", v);
00191 return s;}
00192
00193 }
00194
00195 namespace ros
00196 {
00197 namespace message_traits
00198 {
00199 template<class ContainerAllocator>
00200 struct MD5Sum< ::pr2_msgs::GPUStatus_<ContainerAllocator> > {
00201 static const char* value()
00202 {
00203 return "4c74e5474b8aade04e56108262099c6e";
00204 }
00205
00206 static const char* value(const ::pr2_msgs::GPUStatus_<ContainerAllocator> &) { return value(); }
00207 static const uint64_t static_value1 = 0x4c74e5474b8aade0ULL;
00208 static const uint64_t static_value2 = 0x4e56108262099c6eULL;
00209 };
00210
00211 template<class ContainerAllocator>
00212 struct DataType< ::pr2_msgs::GPUStatus_<ContainerAllocator> > {
00213 static const char* value()
00214 {
00215 return "pr2_msgs/GPUStatus";
00216 }
00217
00218 static const char* value(const ::pr2_msgs::GPUStatus_<ContainerAllocator> &) { return value(); }
00219 };
00220
00221 template<class ContainerAllocator>
00222 struct Definition< ::pr2_msgs::GPUStatus_<ContainerAllocator> > {
00223 static const char* value()
00224 {
00225 return "Header header\n\
00226 string product_name\n\
00227 string pci_device_id\n\
00228 string pci_location\n\
00229 string display\n\
00230 string driver_version\n\
00231 float32 temperature # Temperature in Celcius\n\
00232 float32 fan_speed # Fan speed in rad/s\n\
00233 float32 gpu_usage # Usage in percent\n\
00234 float32 memory_usage # Usage in percent\n\
00235 ================================================================================\n\
00236 MSG: std_msgs/Header\n\
00237 # Standard metadata for higher-level stamped data types.\n\
00238 # This is generally used to communicate timestamped data \n\
00239 # in a particular coordinate frame.\n\
00240 # \n\
00241 # sequence ID: consecutively increasing ID \n\
00242 uint32 seq\n\
00243 #Two-integer timestamp that is expressed as:\n\
00244 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00245 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00246 # time-handling sugar is provided by the client library\n\
00247 time stamp\n\
00248 #Frame this data is associated with\n\
00249 # 0: no frame\n\
00250 # 1: global frame\n\
00251 string frame_id\n\
00252 \n\
00253 ";
00254 }
00255
00256 static const char* value(const ::pr2_msgs::GPUStatus_<ContainerAllocator> &) { return value(); }
00257 };
00258
00259 template<class ContainerAllocator> struct HasHeader< ::pr2_msgs::GPUStatus_<ContainerAllocator> > : public TrueType {};
00260 template<class ContainerAllocator> struct HasHeader< const ::pr2_msgs::GPUStatus_<ContainerAllocator> > : public TrueType {};
00261 }
00262 }
00263
00264 namespace ros
00265 {
00266 namespace serialization
00267 {
00268
00269 template<class ContainerAllocator> struct Serializer< ::pr2_msgs::GPUStatus_<ContainerAllocator> >
00270 {
00271 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00272 {
00273 stream.next(m.header);
00274 stream.next(m.product_name);
00275 stream.next(m.pci_device_id);
00276 stream.next(m.pci_location);
00277 stream.next(m.display);
00278 stream.next(m.driver_version);
00279 stream.next(m.temperature);
00280 stream.next(m.fan_speed);
00281 stream.next(m.gpu_usage);
00282 stream.next(m.memory_usage);
00283 }
00284
00285 ROS_DECLARE_ALLINONE_SERIALIZER;
00286 };
00287 }
00288 }
00289
00290 namespace ros
00291 {
00292 namespace message_operations
00293 {
00294
00295 template<class ContainerAllocator>
00296 struct Printer< ::pr2_msgs::GPUStatus_<ContainerAllocator> >
00297 {
00298 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::pr2_msgs::GPUStatus_<ContainerAllocator> & v)
00299 {
00300 s << indent << "header: ";
00301 s << std::endl;
00302 Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header);
00303 s << indent << "product_name: ";
00304 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.product_name);
00305 s << indent << "pci_device_id: ";
00306 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.pci_device_id);
00307 s << indent << "pci_location: ";
00308 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.pci_location);
00309 s << indent << "display: ";
00310 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.display);
00311 s << indent << "driver_version: ";
00312 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.driver_version);
00313 s << indent << "temperature: ";
00314 Printer<float>::stream(s, indent + " ", v.temperature);
00315 s << indent << "fan_speed: ";
00316 Printer<float>::stream(s, indent + " ", v.fan_speed);
00317 s << indent << "gpu_usage: ";
00318 Printer<float>::stream(s, indent + " ", v.gpu_usage);
00319 s << indent << "memory_usage: ";
00320 Printer<float>::stream(s, indent + " ", v.memory_usage);
00321 }
00322 };
00323
00324
00325 }
00326 }
00327
00328 #endif // PR2_MSGS_MESSAGE_GPUSTATUS_H
00329