$search
00001 /* Auto-generated by genmsg_cpp for file /home/rosbuild/hudson/workspace/doc-electric-pr2_common/doc_stacks/2013-03-01_16-36-22.045406/pr2_common/pr2_msgs/msg/PowerState.msg */ 00002 #ifndef PR2_MSGS_MESSAGE_POWERSTATE_H 00003 #define PR2_MSGS_MESSAGE_POWERSTATE_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 PowerState_ { 00023 typedef PowerState_<ContainerAllocator> Type; 00024 00025 PowerState_() 00026 : header() 00027 , power_consumption(0.0) 00028 , time_remaining() 00029 , prediction_method() 00030 , relative_capacity(0) 00031 , AC_present(0) 00032 { 00033 } 00034 00035 PowerState_(const ContainerAllocator& _alloc) 00036 : header(_alloc) 00037 , power_consumption(0.0) 00038 , time_remaining() 00039 , prediction_method(_alloc) 00040 , relative_capacity(0) 00041 , AC_present(0) 00042 { 00043 } 00044 00045 typedef ::std_msgs::Header_<ContainerAllocator> _header_type; 00046 ::std_msgs::Header_<ContainerAllocator> header; 00047 00048 typedef double _power_consumption_type; 00049 double power_consumption; 00050 00051 typedef ros::Duration _time_remaining_type; 00052 ros::Duration time_remaining; 00053 00054 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _prediction_method_type; 00055 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > prediction_method; 00056 00057 typedef int8_t _relative_capacity_type; 00058 int8_t relative_capacity; 00059 00060 typedef int8_t _AC_present_type; 00061 int8_t AC_present; 00062 00063 00064 private: 00065 static const char* __s_getDataType_() { return "pr2_msgs/PowerState"; } 00066 public: 00067 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); } 00068 00069 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); } 00070 00071 private: 00072 static const char* __s_getMD5Sum_() { return "e6fa46a387cad0b7a80959a21587a6c9"; } 00073 public: 00074 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); } 00075 00076 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); } 00077 00078 private: 00079 static const char* __s_getMessageDefinition_() { return "# This message communicates the state of the PR2's power system.\n\ 00080 Header header\n\ 00081 float64 power_consumption ## Watts\n\ 00082 duration time_remaining ## estimated time to empty or full\n\ 00083 string prediction_method ## how time_remaining is being calculated\n\ 00084 int8 relative_capacity ## percent of capacity\n\ 00085 int8 AC_present ## number of packs detecting AC power, > 0 means plugged in\n\ 00086 \n\ 00087 ================================================================================\n\ 00088 MSG: std_msgs/Header\n\ 00089 # Standard metadata for higher-level stamped data types.\n\ 00090 # This is generally used to communicate timestamped data \n\ 00091 # in a particular coordinate frame.\n\ 00092 # \n\ 00093 # sequence ID: consecutively increasing ID \n\ 00094 uint32 seq\n\ 00095 #Two-integer timestamp that is expressed as:\n\ 00096 # * stamp.secs: seconds (stamp_secs) since epoch\n\ 00097 # * stamp.nsecs: nanoseconds since stamp_secs\n\ 00098 # time-handling sugar is provided by the client library\n\ 00099 time stamp\n\ 00100 #Frame this data is associated with\n\ 00101 # 0: no frame\n\ 00102 # 1: global frame\n\ 00103 string frame_id\n\ 00104 \n\ 00105 "; } 00106 public: 00107 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); } 00108 00109 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); } 00110 00111 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const 00112 { 00113 ros::serialization::OStream stream(write_ptr, 1000000000); 00114 ros::serialization::serialize(stream, header); 00115 ros::serialization::serialize(stream, power_consumption); 00116 ros::serialization::serialize(stream, time_remaining); 00117 ros::serialization::serialize(stream, prediction_method); 00118 ros::serialization::serialize(stream, relative_capacity); 00119 ros::serialization::serialize(stream, AC_present); 00120 return stream.getData(); 00121 } 00122 00123 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr) 00124 { 00125 ros::serialization::IStream stream(read_ptr, 1000000000); 00126 ros::serialization::deserialize(stream, header); 00127 ros::serialization::deserialize(stream, power_consumption); 00128 ros::serialization::deserialize(stream, time_remaining); 00129 ros::serialization::deserialize(stream, prediction_method); 00130 ros::serialization::deserialize(stream, relative_capacity); 00131 ros::serialization::deserialize(stream, AC_present); 00132 return stream.getData(); 00133 } 00134 00135 ROS_DEPRECATED virtual uint32_t serializationLength() const 00136 { 00137 uint32_t size = 0; 00138 size += ros::serialization::serializationLength(header); 00139 size += ros::serialization::serializationLength(power_consumption); 00140 size += ros::serialization::serializationLength(time_remaining); 00141 size += ros::serialization::serializationLength(prediction_method); 00142 size += ros::serialization::serializationLength(relative_capacity); 00143 size += ros::serialization::serializationLength(AC_present); 00144 return size; 00145 } 00146 00147 typedef boost::shared_ptr< ::pr2_msgs::PowerState_<ContainerAllocator> > Ptr; 00148 typedef boost::shared_ptr< ::pr2_msgs::PowerState_<ContainerAllocator> const> ConstPtr; 00149 boost::shared_ptr<std::map<std::string, std::string> > __connection_header; 00150 }; // struct PowerState 00151 typedef ::pr2_msgs::PowerState_<std::allocator<void> > PowerState; 00152 00153 typedef boost::shared_ptr< ::pr2_msgs::PowerState> PowerStatePtr; 00154 typedef boost::shared_ptr< ::pr2_msgs::PowerState const> PowerStateConstPtr; 00155 00156 00157 template<typename ContainerAllocator> 00158 std::ostream& operator<<(std::ostream& s, const ::pr2_msgs::PowerState_<ContainerAllocator> & v) 00159 { 00160 ros::message_operations::Printer< ::pr2_msgs::PowerState_<ContainerAllocator> >::stream(s, "", v); 00161 return s;} 00162 00163 } // namespace pr2_msgs 00164 00165 namespace ros 00166 { 00167 namespace message_traits 00168 { 00169 template<class ContainerAllocator> struct IsMessage< ::pr2_msgs::PowerState_<ContainerAllocator> > : public TrueType {}; 00170 template<class ContainerAllocator> struct IsMessage< ::pr2_msgs::PowerState_<ContainerAllocator> const> : public TrueType {}; 00171 template<class ContainerAllocator> 00172 struct MD5Sum< ::pr2_msgs::PowerState_<ContainerAllocator> > { 00173 static const char* value() 00174 { 00175 return "e6fa46a387cad0b7a80959a21587a6c9"; 00176 } 00177 00178 static const char* value(const ::pr2_msgs::PowerState_<ContainerAllocator> &) { return value(); } 00179 static const uint64_t static_value1 = 0xe6fa46a387cad0b7ULL; 00180 static const uint64_t static_value2 = 0xa80959a21587a6c9ULL; 00181 }; 00182 00183 template<class ContainerAllocator> 00184 struct DataType< ::pr2_msgs::PowerState_<ContainerAllocator> > { 00185 static const char* value() 00186 { 00187 return "pr2_msgs/PowerState"; 00188 } 00189 00190 static const char* value(const ::pr2_msgs::PowerState_<ContainerAllocator> &) { return value(); } 00191 }; 00192 00193 template<class ContainerAllocator> 00194 struct Definition< ::pr2_msgs::PowerState_<ContainerAllocator> > { 00195 static const char* value() 00196 { 00197 return "# This message communicates the state of the PR2's power system.\n\ 00198 Header header\n\ 00199 float64 power_consumption ## Watts\n\ 00200 duration time_remaining ## estimated time to empty or full\n\ 00201 string prediction_method ## how time_remaining is being calculated\n\ 00202 int8 relative_capacity ## percent of capacity\n\ 00203 int8 AC_present ## number of packs detecting AC power, > 0 means plugged in\n\ 00204 \n\ 00205 ================================================================================\n\ 00206 MSG: std_msgs/Header\n\ 00207 # Standard metadata for higher-level stamped data types.\n\ 00208 # This is generally used to communicate timestamped data \n\ 00209 # in a particular coordinate frame.\n\ 00210 # \n\ 00211 # sequence ID: consecutively increasing ID \n\ 00212 uint32 seq\n\ 00213 #Two-integer timestamp that is expressed as:\n\ 00214 # * stamp.secs: seconds (stamp_secs) since epoch\n\ 00215 # * stamp.nsecs: nanoseconds since stamp_secs\n\ 00216 # time-handling sugar is provided by the client library\n\ 00217 time stamp\n\ 00218 #Frame this data is associated with\n\ 00219 # 0: no frame\n\ 00220 # 1: global frame\n\ 00221 string frame_id\n\ 00222 \n\ 00223 "; 00224 } 00225 00226 static const char* value(const ::pr2_msgs::PowerState_<ContainerAllocator> &) { return value(); } 00227 }; 00228 00229 template<class ContainerAllocator> struct HasHeader< ::pr2_msgs::PowerState_<ContainerAllocator> > : public TrueType {}; 00230 template<class ContainerAllocator> struct HasHeader< const ::pr2_msgs::PowerState_<ContainerAllocator> > : public TrueType {}; 00231 } // namespace message_traits 00232 } // namespace ros 00233 00234 namespace ros 00235 { 00236 namespace serialization 00237 { 00238 00239 template<class ContainerAllocator> struct Serializer< ::pr2_msgs::PowerState_<ContainerAllocator> > 00240 { 00241 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m) 00242 { 00243 stream.next(m.header); 00244 stream.next(m.power_consumption); 00245 stream.next(m.time_remaining); 00246 stream.next(m.prediction_method); 00247 stream.next(m.relative_capacity); 00248 stream.next(m.AC_present); 00249 } 00250 00251 ROS_DECLARE_ALLINONE_SERIALIZER; 00252 }; // struct PowerState_ 00253 } // namespace serialization 00254 } // namespace ros 00255 00256 namespace ros 00257 { 00258 namespace message_operations 00259 { 00260 00261 template<class ContainerAllocator> 00262 struct Printer< ::pr2_msgs::PowerState_<ContainerAllocator> > 00263 { 00264 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::pr2_msgs::PowerState_<ContainerAllocator> & v) 00265 { 00266 s << indent << "header: "; 00267 s << std::endl; 00268 Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header); 00269 s << indent << "power_consumption: "; 00270 Printer<double>::stream(s, indent + " ", v.power_consumption); 00271 s << indent << "time_remaining: "; 00272 Printer<ros::Duration>::stream(s, indent + " ", v.time_remaining); 00273 s << indent << "prediction_method: "; 00274 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.prediction_method); 00275 s << indent << "relative_capacity: "; 00276 Printer<int8_t>::stream(s, indent + " ", v.relative_capacity); 00277 s << indent << "AC_present: "; 00278 Printer<int8_t>::stream(s, indent + " ", v.AC_present); 00279 } 00280 }; 00281 00282 00283 } // namespace message_operations 00284 } // namespace ros 00285 00286 #endif // PR2_MSGS_MESSAGE_POWERSTATE_H 00287