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