00001
00002 #ifndef ERRATIC_PLAYER_MESSAGE_BATTERYSTATE_H
00003 #define ERRATIC_PLAYER_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 #include "std_msgs/Header.h"
00014
00015 namespace erratic_player
00016 {
00017 template <class ContainerAllocator>
00018 struct BatteryState_ : public ros::Message
00019 {
00020 typedef BatteryState_<ContainerAllocator> Type;
00021
00022 BatteryState_()
00023 : header()
00024 , charge(0.0)
00025 , capacity(0.0)
00026 {
00027 }
00028
00029 BatteryState_(const ContainerAllocator& _alloc)
00030 : header(_alloc)
00031 , charge(0.0)
00032 , capacity(0.0)
00033 {
00034 }
00035
00036 typedef ::std_msgs::Header_<ContainerAllocator> _header_type;
00037 ::std_msgs::Header_<ContainerAllocator> header;
00038
00039 typedef float _charge_type;
00040 float charge;
00041
00042 typedef float _capacity_type;
00043 float capacity;
00044
00045
00046 private:
00047 static const char* __s_getDataType_() { return "erratic_player/BatteryState"; }
00048 public:
00049 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00050
00051 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00052
00053 private:
00054 static const char* __s_getMD5Sum_() { return "df2a7089f2b6c7d531f3fa587a65bbf2"; }
00055 public:
00056 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00057
00058 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00059
00060 private:
00061 static const char* __s_getMessageDefinition_() { return "Header header\n\
00062 float32 charge\n\
00063 float32 capacity\n\
00064 \n\
00065 ================================================================================\n\
00066 MSG: std_msgs/Header\n\
00067 # Standard metadata for higher-level stamped data types.\n\
00068 # This is generally used to communicate timestamped data \n\
00069 # in a particular coordinate frame.\n\
00070 # \n\
00071 # sequence ID: consecutively increasing ID \n\
00072 uint32 seq\n\
00073 #Two-integer timestamp that is expressed as:\n\
00074 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00075 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00076 # time-handling sugar is provided by the client library\n\
00077 time stamp\n\
00078 #Frame this data is associated with\n\
00079 # 0: no frame\n\
00080 # 1: global frame\n\
00081 string frame_id\n\
00082 \n\
00083 "; }
00084 public:
00085 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00086
00087 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00088
00089 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00090 {
00091 ros::serialization::OStream stream(write_ptr, 1000000000);
00092 ros::serialization::serialize(stream, header);
00093 ros::serialization::serialize(stream, charge);
00094 ros::serialization::serialize(stream, capacity);
00095 return stream.getData();
00096 }
00097
00098 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00099 {
00100 ros::serialization::IStream stream(read_ptr, 1000000000);
00101 ros::serialization::deserialize(stream, header);
00102 ros::serialization::deserialize(stream, charge);
00103 ros::serialization::deserialize(stream, capacity);
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(header);
00111 size += ros::serialization::serializationLength(charge);
00112 size += ros::serialization::serializationLength(capacity);
00113 return size;
00114 }
00115
00116 typedef boost::shared_ptr< ::erratic_player::BatteryState_<ContainerAllocator> > Ptr;
00117 typedef boost::shared_ptr< ::erratic_player::BatteryState_<ContainerAllocator> const> ConstPtr;
00118 };
00119 typedef ::erratic_player::BatteryState_<std::allocator<void> > BatteryState;
00120
00121 typedef boost::shared_ptr< ::erratic_player::BatteryState> BatteryStatePtr;
00122 typedef boost::shared_ptr< ::erratic_player::BatteryState const> BatteryStateConstPtr;
00123
00124
00125 template<typename ContainerAllocator>
00126 std::ostream& operator<<(std::ostream& s, const ::erratic_player::BatteryState_<ContainerAllocator> & v)
00127 {
00128 ros::message_operations::Printer< ::erratic_player::BatteryState_<ContainerAllocator> >::stream(s, "", v);
00129 return s;}
00130
00131 }
00132
00133 namespace ros
00134 {
00135 namespace message_traits
00136 {
00137 template<class ContainerAllocator>
00138 struct MD5Sum< ::erratic_player::BatteryState_<ContainerAllocator> > {
00139 static const char* value()
00140 {
00141 return "df2a7089f2b6c7d531f3fa587a65bbf2";
00142 }
00143
00144 static const char* value(const ::erratic_player::BatteryState_<ContainerAllocator> &) { return value(); }
00145 static const uint64_t static_value1 = 0xdf2a7089f2b6c7d5ULL;
00146 static const uint64_t static_value2 = 0x31f3fa587a65bbf2ULL;
00147 };
00148
00149 template<class ContainerAllocator>
00150 struct DataType< ::erratic_player::BatteryState_<ContainerAllocator> > {
00151 static const char* value()
00152 {
00153 return "erratic_player/BatteryState";
00154 }
00155
00156 static const char* value(const ::erratic_player::BatteryState_<ContainerAllocator> &) { return value(); }
00157 };
00158
00159 template<class ContainerAllocator>
00160 struct Definition< ::erratic_player::BatteryState_<ContainerAllocator> > {
00161 static const char* value()
00162 {
00163 return "Header header\n\
00164 float32 charge\n\
00165 float32 capacity\n\
00166 \n\
00167 ================================================================================\n\
00168 MSG: std_msgs/Header\n\
00169 # Standard metadata for higher-level stamped data types.\n\
00170 # This is generally used to communicate timestamped data \n\
00171 # in a particular coordinate frame.\n\
00172 # \n\
00173 # sequence ID: consecutively increasing ID \n\
00174 uint32 seq\n\
00175 #Two-integer timestamp that is expressed as:\n\
00176 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00177 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00178 # time-handling sugar is provided by the client library\n\
00179 time stamp\n\
00180 #Frame this data is associated with\n\
00181 # 0: no frame\n\
00182 # 1: global frame\n\
00183 string frame_id\n\
00184 \n\
00185 ";
00186 }
00187
00188 static const char* value(const ::erratic_player::BatteryState_<ContainerAllocator> &) { return value(); }
00189 };
00190
00191 template<class ContainerAllocator> struct HasHeader< ::erratic_player::BatteryState_<ContainerAllocator> > : public TrueType {};
00192 template<class ContainerAllocator> struct HasHeader< const ::erratic_player::BatteryState_<ContainerAllocator> > : public TrueType {};
00193 }
00194 }
00195
00196 namespace ros
00197 {
00198 namespace serialization
00199 {
00200
00201 template<class ContainerAllocator> struct Serializer< ::erratic_player::BatteryState_<ContainerAllocator> >
00202 {
00203 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00204 {
00205 stream.next(m.header);
00206 stream.next(m.charge);
00207 stream.next(m.capacity);
00208 }
00209
00210 ROS_DECLARE_ALLINONE_SERIALIZER;
00211 };
00212 }
00213 }
00214
00215 namespace ros
00216 {
00217 namespace message_operations
00218 {
00219
00220 template<class ContainerAllocator>
00221 struct Printer< ::erratic_player::BatteryState_<ContainerAllocator> >
00222 {
00223 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::erratic_player::BatteryState_<ContainerAllocator> & v)
00224 {
00225 s << indent << "header: ";
00226 s << std::endl;
00227 Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header);
00228 s << indent << "charge: ";
00229 Printer<float>::stream(s, indent + " ", v.charge);
00230 s << indent << "capacity: ";
00231 Printer<float>::stream(s, indent + " ", v.capacity);
00232 }
00233 };
00234
00235
00236 }
00237 }
00238
00239 #endif // ERRATIC_PLAYER_MESSAGE_BATTERYSTATE_H
00240