00001
00002 #ifndef CLEARPATH_BASE_MESSAGE_POWERSOURCE_H
00003 #define CLEARPATH_BASE_MESSAGE_POWERSOURCE_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 clearpath_base
00015 {
00016 template <class ContainerAllocator>
00017 struct PowerSource_ : public ros::Message
00018 {
00019 typedef PowerSource_<ContainerAllocator> Type;
00020
00021 PowerSource_()
00022 : charge(0.0)
00023 , capacity(0)
00024 , present(false)
00025 , in_use(false)
00026 , description(0)
00027 {
00028 }
00029
00030 PowerSource_(const ContainerAllocator& _alloc)
00031 : charge(0.0)
00032 , capacity(0)
00033 , present(false)
00034 , in_use(false)
00035 , description(0)
00036 {
00037 }
00038
00039 typedef float _charge_type;
00040 float charge;
00041
00042 typedef int16_t _capacity_type;
00043 int16_t capacity;
00044
00045 typedef uint8_t _present_type;
00046 uint8_t present;
00047
00048 typedef uint8_t _in_use_type;
00049 uint8_t in_use;
00050
00051 typedef uint8_t _description_type;
00052 uint8_t description;
00053
00054
00055 private:
00056 static const char* __s_getDataType_() { return "clearpath_base/PowerSource"; }
00057 public:
00058 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00059
00060 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00061
00062 private:
00063 static const char* __s_getMD5Sum_() { return "adbe384d7d69a337a7f2b6bf1d0139cb"; }
00064 public:
00065 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00066
00067 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00068
00069 private:
00070 static const char* __s_getMessageDefinition_() { return "float32 charge\n\
00071 int16 capacity\n\
00072 bool present\n\
00073 bool in_use\n\
00074 uint8 description\n\
00075 \n\
00076 "; }
00077 public:
00078 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00079
00080 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00081
00082 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00083 {
00084 ros::serialization::OStream stream(write_ptr, 1000000000);
00085 ros::serialization::serialize(stream, charge);
00086 ros::serialization::serialize(stream, capacity);
00087 ros::serialization::serialize(stream, present);
00088 ros::serialization::serialize(stream, in_use);
00089 ros::serialization::serialize(stream, description);
00090 return stream.getData();
00091 }
00092
00093 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00094 {
00095 ros::serialization::IStream stream(read_ptr, 1000000000);
00096 ros::serialization::deserialize(stream, charge);
00097 ros::serialization::deserialize(stream, capacity);
00098 ros::serialization::deserialize(stream, present);
00099 ros::serialization::deserialize(stream, in_use);
00100 ros::serialization::deserialize(stream, description);
00101 return stream.getData();
00102 }
00103
00104 ROS_DEPRECATED virtual uint32_t serializationLength() const
00105 {
00106 uint32_t size = 0;
00107 size += ros::serialization::serializationLength(charge);
00108 size += ros::serialization::serializationLength(capacity);
00109 size += ros::serialization::serializationLength(present);
00110 size += ros::serialization::serializationLength(in_use);
00111 size += ros::serialization::serializationLength(description);
00112 return size;
00113 }
00114
00115 typedef boost::shared_ptr< ::clearpath_base::PowerSource_<ContainerAllocator> > Ptr;
00116 typedef boost::shared_ptr< ::clearpath_base::PowerSource_<ContainerAllocator> const> ConstPtr;
00117 };
00118 typedef ::clearpath_base::PowerSource_<std::allocator<void> > PowerSource;
00119
00120 typedef boost::shared_ptr< ::clearpath_base::PowerSource> PowerSourcePtr;
00121 typedef boost::shared_ptr< ::clearpath_base::PowerSource const> PowerSourceConstPtr;
00122
00123
00124 template<typename ContainerAllocator>
00125 std::ostream& operator<<(std::ostream& s, const ::clearpath_base::PowerSource_<ContainerAllocator> & v)
00126 {
00127 ros::message_operations::Printer< ::clearpath_base::PowerSource_<ContainerAllocator> >::stream(s, "", v);
00128 return s;}
00129
00130 }
00131
00132 namespace ros
00133 {
00134 namespace message_traits
00135 {
00136 template<class ContainerAllocator>
00137 struct MD5Sum< ::clearpath_base::PowerSource_<ContainerAllocator> > {
00138 static const char* value()
00139 {
00140 return "adbe384d7d69a337a7f2b6bf1d0139cb";
00141 }
00142
00143 static const char* value(const ::clearpath_base::PowerSource_<ContainerAllocator> &) { return value(); }
00144 static const uint64_t static_value1 = 0xadbe384d7d69a337ULL;
00145 static const uint64_t static_value2 = 0xa7f2b6bf1d0139cbULL;
00146 };
00147
00148 template<class ContainerAllocator>
00149 struct DataType< ::clearpath_base::PowerSource_<ContainerAllocator> > {
00150 static const char* value()
00151 {
00152 return "clearpath_base/PowerSource";
00153 }
00154
00155 static const char* value(const ::clearpath_base::PowerSource_<ContainerAllocator> &) { return value(); }
00156 };
00157
00158 template<class ContainerAllocator>
00159 struct Definition< ::clearpath_base::PowerSource_<ContainerAllocator> > {
00160 static const char* value()
00161 {
00162 return "float32 charge\n\
00163 int16 capacity\n\
00164 bool present\n\
00165 bool in_use\n\
00166 uint8 description\n\
00167 \n\
00168 ";
00169 }
00170
00171 static const char* value(const ::clearpath_base::PowerSource_<ContainerAllocator> &) { return value(); }
00172 };
00173
00174 template<class ContainerAllocator> struct IsFixedSize< ::clearpath_base::PowerSource_<ContainerAllocator> > : public TrueType {};
00175 }
00176 }
00177
00178 namespace ros
00179 {
00180 namespace serialization
00181 {
00182
00183 template<class ContainerAllocator> struct Serializer< ::clearpath_base::PowerSource_<ContainerAllocator> >
00184 {
00185 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00186 {
00187 stream.next(m.charge);
00188 stream.next(m.capacity);
00189 stream.next(m.present);
00190 stream.next(m.in_use);
00191 stream.next(m.description);
00192 }
00193
00194 ROS_DECLARE_ALLINONE_SERIALIZER;
00195 };
00196 }
00197 }
00198
00199 namespace ros
00200 {
00201 namespace message_operations
00202 {
00203
00204 template<class ContainerAllocator>
00205 struct Printer< ::clearpath_base::PowerSource_<ContainerAllocator> >
00206 {
00207 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::clearpath_base::PowerSource_<ContainerAllocator> & v)
00208 {
00209 s << indent << "charge: ";
00210 Printer<float>::stream(s, indent + " ", v.charge);
00211 s << indent << "capacity: ";
00212 Printer<int16_t>::stream(s, indent + " ", v.capacity);
00213 s << indent << "present: ";
00214 Printer<uint8_t>::stream(s, indent + " ", v.present);
00215 s << indent << "in_use: ";
00216 Printer<uint8_t>::stream(s, indent + " ", v.in_use);
00217 s << indent << "description: ";
00218 Printer<uint8_t>::stream(s, indent + " ", v.description);
00219 }
00220 };
00221
00222
00223 }
00224 }
00225
00226 #endif // CLEARPATH_BASE_MESSAGE_POWERSOURCE_H
00227