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