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