$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/BatteryState.msg */ 00002 #ifndef PR2_MSGS_MESSAGE_BATTERYSTATE_H 00003 #define PR2_MSGS_MESSAGE_BATTERYSTATE_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 00018 namespace pr2_msgs 00019 { 00020 template <class ContainerAllocator> 00021 struct BatteryState_ { 00022 typedef BatteryState_<ContainerAllocator> Type; 00023 00024 BatteryState_() 00025 : lastTimeBattery(0) 00026 , batReg() 00027 , batRegFlag() 00028 , batRegTime() 00029 { 00030 batReg.assign(0); 00031 batRegFlag.assign(0); 00032 batRegTime.assign(0); 00033 } 00034 00035 BatteryState_(const ContainerAllocator& _alloc) 00036 : lastTimeBattery(0) 00037 , batReg() 00038 , batRegFlag() 00039 , batRegTime() 00040 { 00041 batReg.assign(0); 00042 batRegFlag.assign(0); 00043 batRegTime.assign(0); 00044 } 00045 00046 typedef int32_t _lastTimeBattery_type; 00047 int32_t lastTimeBattery; 00048 00049 typedef boost::array<uint16_t, 48> _batReg_type; 00050 boost::array<uint16_t, 48> batReg; 00051 00052 typedef boost::array<uint16_t, 48> _batRegFlag_type; 00053 boost::array<uint16_t, 48> batRegFlag; 00054 00055 typedef boost::array<int32_t, 48> _batRegTime_type; 00056 boost::array<int32_t, 48> batRegTime; 00057 00058 00059 ROS_DEPRECATED uint32_t get_batReg_size() const { return (uint32_t)batReg.size(); } 00060 ROS_DEPRECATED uint32_t get_batRegFlag_size() const { return (uint32_t)batRegFlag.size(); } 00061 ROS_DEPRECATED uint32_t get_batRegTime_size() const { return (uint32_t)batRegTime.size(); } 00062 private: 00063 static const char* __s_getDataType_() { return "pr2_msgs/BatteryState"; } 00064 public: 00065 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); } 00066 00067 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); } 00068 00069 private: 00070 static const char* __s_getMD5Sum_() { return "00e9f996c2fc26700fd25abcd8422db0"; } 00071 public: 00072 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); } 00073 00074 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); } 00075 00076 private: 00077 static const char* __s_getMessageDefinition_() { return "# DEPRECATED. Use pr2_msgs/BatteryState2 instead.\n\ 00078 # Each batteries registers\n\ 00079 int32 lastTimeBattery #epoch time\n\ 00080 uint16[48] batReg\n\ 00081 uint16[48] batRegFlag\n\ 00082 int32[48] batRegTime\n\ 00083 \n\ 00084 "; } 00085 public: 00086 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); } 00087 00088 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); } 00089 00090 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const 00091 { 00092 ros::serialization::OStream stream(write_ptr, 1000000000); 00093 ros::serialization::serialize(stream, lastTimeBattery); 00094 ros::serialization::serialize(stream, batReg); 00095 ros::serialization::serialize(stream, batRegFlag); 00096 ros::serialization::serialize(stream, batRegTime); 00097 return stream.getData(); 00098 } 00099 00100 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr) 00101 { 00102 ros::serialization::IStream stream(read_ptr, 1000000000); 00103 ros::serialization::deserialize(stream, lastTimeBattery); 00104 ros::serialization::deserialize(stream, batReg); 00105 ros::serialization::deserialize(stream, batRegFlag); 00106 ros::serialization::deserialize(stream, batRegTime); 00107 return stream.getData(); 00108 } 00109 00110 ROS_DEPRECATED virtual uint32_t serializationLength() const 00111 { 00112 uint32_t size = 0; 00113 size += ros::serialization::serializationLength(lastTimeBattery); 00114 size += ros::serialization::serializationLength(batReg); 00115 size += ros::serialization::serializationLength(batRegFlag); 00116 size += ros::serialization::serializationLength(batRegTime); 00117 return size; 00118 } 00119 00120 typedef boost::shared_ptr< ::pr2_msgs::BatteryState_<ContainerAllocator> > Ptr; 00121 typedef boost::shared_ptr< ::pr2_msgs::BatteryState_<ContainerAllocator> const> ConstPtr; 00122 boost::shared_ptr<std::map<std::string, std::string> > __connection_header; 00123 }; // struct BatteryState 00124 typedef ::pr2_msgs::BatteryState_<std::allocator<void> > BatteryState; 00125 00126 typedef boost::shared_ptr< ::pr2_msgs::BatteryState> BatteryStatePtr; 00127 typedef boost::shared_ptr< ::pr2_msgs::BatteryState const> BatteryStateConstPtr; 00128 00129 00130 template<typename ContainerAllocator> 00131 std::ostream& operator<<(std::ostream& s, const ::pr2_msgs::BatteryState_<ContainerAllocator> & v) 00132 { 00133 ros::message_operations::Printer< ::pr2_msgs::BatteryState_<ContainerAllocator> >::stream(s, "", v); 00134 return s;} 00135 00136 } // namespace pr2_msgs 00137 00138 namespace ros 00139 { 00140 namespace message_traits 00141 { 00142 template<class ContainerAllocator> struct IsMessage< ::pr2_msgs::BatteryState_<ContainerAllocator> > : public TrueType {}; 00143 template<class ContainerAllocator> struct IsMessage< ::pr2_msgs::BatteryState_<ContainerAllocator> const> : public TrueType {}; 00144 template<class ContainerAllocator> 00145 struct MD5Sum< ::pr2_msgs::BatteryState_<ContainerAllocator> > { 00146 static const char* value() 00147 { 00148 return "00e9f996c2fc26700fd25abcd8422db0"; 00149 } 00150 00151 static const char* value(const ::pr2_msgs::BatteryState_<ContainerAllocator> &) { return value(); } 00152 static const uint64_t static_value1 = 0x00e9f996c2fc2670ULL; 00153 static const uint64_t static_value2 = 0x0fd25abcd8422db0ULL; 00154 }; 00155 00156 template<class ContainerAllocator> 00157 struct DataType< ::pr2_msgs::BatteryState_<ContainerAllocator> > { 00158 static const char* value() 00159 { 00160 return "pr2_msgs/BatteryState"; 00161 } 00162 00163 static const char* value(const ::pr2_msgs::BatteryState_<ContainerAllocator> &) { return value(); } 00164 }; 00165 00166 template<class ContainerAllocator> 00167 struct Definition< ::pr2_msgs::BatteryState_<ContainerAllocator> > { 00168 static const char* value() 00169 { 00170 return "# DEPRECATED. Use pr2_msgs/BatteryState2 instead.\n\ 00171 # Each batteries registers\n\ 00172 int32 lastTimeBattery #epoch time\n\ 00173 uint16[48] batReg\n\ 00174 uint16[48] batRegFlag\n\ 00175 int32[48] batRegTime\n\ 00176 \n\ 00177 "; 00178 } 00179 00180 static const char* value(const ::pr2_msgs::BatteryState_<ContainerAllocator> &) { return value(); } 00181 }; 00182 00183 template<class ContainerAllocator> struct IsFixedSize< ::pr2_msgs::BatteryState_<ContainerAllocator> > : public TrueType {}; 00184 } // namespace message_traits 00185 } // namespace ros 00186 00187 namespace ros 00188 { 00189 namespace serialization 00190 { 00191 00192 template<class ContainerAllocator> struct Serializer< ::pr2_msgs::BatteryState_<ContainerAllocator> > 00193 { 00194 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m) 00195 { 00196 stream.next(m.lastTimeBattery); 00197 stream.next(m.batReg); 00198 stream.next(m.batRegFlag); 00199 stream.next(m.batRegTime); 00200 } 00201 00202 ROS_DECLARE_ALLINONE_SERIALIZER; 00203 }; // struct BatteryState_ 00204 } // namespace serialization 00205 } // namespace ros 00206 00207 namespace ros 00208 { 00209 namespace message_operations 00210 { 00211 00212 template<class ContainerAllocator> 00213 struct Printer< ::pr2_msgs::BatteryState_<ContainerAllocator> > 00214 { 00215 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::pr2_msgs::BatteryState_<ContainerAllocator> & v) 00216 { 00217 s << indent << "lastTimeBattery: "; 00218 Printer<int32_t>::stream(s, indent + " ", v.lastTimeBattery); 00219 s << indent << "batReg[]" << std::endl; 00220 for (size_t i = 0; i < v.batReg.size(); ++i) 00221 { 00222 s << indent << " batReg[" << i << "]: "; 00223 Printer<uint16_t>::stream(s, indent + " ", v.batReg[i]); 00224 } 00225 s << indent << "batRegFlag[]" << std::endl; 00226 for (size_t i = 0; i < v.batRegFlag.size(); ++i) 00227 { 00228 s << indent << " batRegFlag[" << i << "]: "; 00229 Printer<uint16_t>::stream(s, indent + " ", v.batRegFlag[i]); 00230 } 00231 s << indent << "batRegTime[]" << std::endl; 00232 for (size_t i = 0; i < v.batRegTime.size(); ++i) 00233 { 00234 s << indent << " batRegTime[" << i << "]: "; 00235 Printer<int32_t>::stream(s, indent + " ", v.batRegTime[i]); 00236 } 00237 } 00238 }; 00239 00240 00241 } // namespace message_operations 00242 } // namespace ros 00243 00244 #endif // PR2_MSGS_MESSAGE_BATTERYSTATE_H 00245