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