00001
00002 #ifndef CLEARPATH_BASE_MESSAGE_SYSTEMSTATUS_H
00003 #define CLEARPATH_BASE_MESSAGE_SYSTEMSTATUS_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 clearpath_base
00016 {
00017 template <class ContainerAllocator>
00018 struct SystemStatus_ : public ros::Message
00019 {
00020 typedef SystemStatus_<ContainerAllocator> Type;
00021
00022 SystemStatus_()
00023 : header()
00024 , uptime(0)
00025 , voltages()
00026 , currents()
00027 , temperatures()
00028 {
00029 }
00030
00031 SystemStatus_(const ContainerAllocator& _alloc)
00032 : header(_alloc)
00033 , uptime(0)
00034 , voltages(_alloc)
00035 , currents(_alloc)
00036 , temperatures(_alloc)
00037 {
00038 }
00039
00040 typedef ::std_msgs::Header_<ContainerAllocator> _header_type;
00041 ::std_msgs::Header_<ContainerAllocator> header;
00042
00043 typedef uint32_t _uptime_type;
00044 uint32_t uptime;
00045
00046 typedef std::vector<double, typename ContainerAllocator::template rebind<double>::other > _voltages_type;
00047 std::vector<double, typename ContainerAllocator::template rebind<double>::other > voltages;
00048
00049 typedef std::vector<double, typename ContainerAllocator::template rebind<double>::other > _currents_type;
00050 std::vector<double, typename ContainerAllocator::template rebind<double>::other > currents;
00051
00052 typedef std::vector<double, typename ContainerAllocator::template rebind<double>::other > _temperatures_type;
00053 std::vector<double, typename ContainerAllocator::template rebind<double>::other > temperatures;
00054
00055
00056 ROS_DEPRECATED uint32_t get_voltages_size() const { return (uint32_t)voltages.size(); }
00057 ROS_DEPRECATED void set_voltages_size(uint32_t size) { voltages.resize((size_t)size); }
00058 ROS_DEPRECATED void get_voltages_vec(std::vector<double, typename ContainerAllocator::template rebind<double>::other > & vec) const { vec = this->voltages; }
00059 ROS_DEPRECATED void set_voltages_vec(const std::vector<double, typename ContainerAllocator::template rebind<double>::other > & vec) { this->voltages = vec; }
00060 ROS_DEPRECATED uint32_t get_currents_size() const { return (uint32_t)currents.size(); }
00061 ROS_DEPRECATED void set_currents_size(uint32_t size) { currents.resize((size_t)size); }
00062 ROS_DEPRECATED void get_currents_vec(std::vector<double, typename ContainerAllocator::template rebind<double>::other > & vec) const { vec = this->currents; }
00063 ROS_DEPRECATED void set_currents_vec(const std::vector<double, typename ContainerAllocator::template rebind<double>::other > & vec) { this->currents = vec; }
00064 ROS_DEPRECATED uint32_t get_temperatures_size() const { return (uint32_t)temperatures.size(); }
00065 ROS_DEPRECATED void set_temperatures_size(uint32_t size) { temperatures.resize((size_t)size); }
00066 ROS_DEPRECATED void get_temperatures_vec(std::vector<double, typename ContainerAllocator::template rebind<double>::other > & vec) const { vec = this->temperatures; }
00067 ROS_DEPRECATED void set_temperatures_vec(const std::vector<double, typename ContainerAllocator::template rebind<double>::other > & vec) { this->temperatures = vec; }
00068 private:
00069 static const char* __s_getDataType_() { return "clearpath_base/SystemStatus"; }
00070 public:
00071 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00072
00073 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00074
00075 private:
00076 static const char* __s_getMD5Sum_() { return "b24850c808eb727058fff35ba598006f"; }
00077 public:
00078 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00079
00080 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00081
00082 private:
00083 static const char* __s_getMessageDefinition_() { return "Header header\n\
00084 uint32 uptime\n\
00085 float64[] voltages\n\
00086 float64[] currents\n\
00087 float64[] temperatures\n\
00088 \n\
00089 ================================================================================\n\
00090 MSG: std_msgs/Header\n\
00091 # Standard metadata for higher-level stamped data types.\n\
00092 # This is generally used to communicate timestamped data \n\
00093 # in a particular coordinate frame.\n\
00094 # \n\
00095 # sequence ID: consecutively increasing ID \n\
00096 uint32 seq\n\
00097 #Two-integer timestamp that is expressed as:\n\
00098 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00099 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00100 # time-handling sugar is provided by the client library\n\
00101 time stamp\n\
00102 #Frame this data is associated with\n\
00103 # 0: no frame\n\
00104 # 1: global frame\n\
00105 string frame_id\n\
00106 \n\
00107 "; }
00108 public:
00109 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00110
00111 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00112
00113 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00114 {
00115 ros::serialization::OStream stream(write_ptr, 1000000000);
00116 ros::serialization::serialize(stream, header);
00117 ros::serialization::serialize(stream, uptime);
00118 ros::serialization::serialize(stream, voltages);
00119 ros::serialization::serialize(stream, currents);
00120 ros::serialization::serialize(stream, temperatures);
00121 return stream.getData();
00122 }
00123
00124 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00125 {
00126 ros::serialization::IStream stream(read_ptr, 1000000000);
00127 ros::serialization::deserialize(stream, header);
00128 ros::serialization::deserialize(stream, uptime);
00129 ros::serialization::deserialize(stream, voltages);
00130 ros::serialization::deserialize(stream, currents);
00131 ros::serialization::deserialize(stream, temperatures);
00132 return stream.getData();
00133 }
00134
00135 ROS_DEPRECATED virtual uint32_t serializationLength() const
00136 {
00137 uint32_t size = 0;
00138 size += ros::serialization::serializationLength(header);
00139 size += ros::serialization::serializationLength(uptime);
00140 size += ros::serialization::serializationLength(voltages);
00141 size += ros::serialization::serializationLength(currents);
00142 size += ros::serialization::serializationLength(temperatures);
00143 return size;
00144 }
00145
00146 typedef boost::shared_ptr< ::clearpath_base::SystemStatus_<ContainerAllocator> > Ptr;
00147 typedef boost::shared_ptr< ::clearpath_base::SystemStatus_<ContainerAllocator> const> ConstPtr;
00148 };
00149 typedef ::clearpath_base::SystemStatus_<std::allocator<void> > SystemStatus;
00150
00151 typedef boost::shared_ptr< ::clearpath_base::SystemStatus> SystemStatusPtr;
00152 typedef boost::shared_ptr< ::clearpath_base::SystemStatus const> SystemStatusConstPtr;
00153
00154
00155 template<typename ContainerAllocator>
00156 std::ostream& operator<<(std::ostream& s, const ::clearpath_base::SystemStatus_<ContainerAllocator> & v)
00157 {
00158 ros::message_operations::Printer< ::clearpath_base::SystemStatus_<ContainerAllocator> >::stream(s, "", v);
00159 return s;}
00160
00161 }
00162
00163 namespace ros
00164 {
00165 namespace message_traits
00166 {
00167 template<class ContainerAllocator>
00168 struct MD5Sum< ::clearpath_base::SystemStatus_<ContainerAllocator> > {
00169 static const char* value()
00170 {
00171 return "b24850c808eb727058fff35ba598006f";
00172 }
00173
00174 static const char* value(const ::clearpath_base::SystemStatus_<ContainerAllocator> &) { return value(); }
00175 static const uint64_t static_value1 = 0xb24850c808eb7270ULL;
00176 static const uint64_t static_value2 = 0x58fff35ba598006fULL;
00177 };
00178
00179 template<class ContainerAllocator>
00180 struct DataType< ::clearpath_base::SystemStatus_<ContainerAllocator> > {
00181 static const char* value()
00182 {
00183 return "clearpath_base/SystemStatus";
00184 }
00185
00186 static const char* value(const ::clearpath_base::SystemStatus_<ContainerAllocator> &) { return value(); }
00187 };
00188
00189 template<class ContainerAllocator>
00190 struct Definition< ::clearpath_base::SystemStatus_<ContainerAllocator> > {
00191 static const char* value()
00192 {
00193 return "Header header\n\
00194 uint32 uptime\n\
00195 float64[] voltages\n\
00196 float64[] currents\n\
00197 float64[] temperatures\n\
00198 \n\
00199 ================================================================================\n\
00200 MSG: std_msgs/Header\n\
00201 # Standard metadata for higher-level stamped data types.\n\
00202 # This is generally used to communicate timestamped data \n\
00203 # in a particular coordinate frame.\n\
00204 # \n\
00205 # sequence ID: consecutively increasing ID \n\
00206 uint32 seq\n\
00207 #Two-integer timestamp that is expressed as:\n\
00208 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00209 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00210 # time-handling sugar is provided by the client library\n\
00211 time stamp\n\
00212 #Frame this data is associated with\n\
00213 # 0: no frame\n\
00214 # 1: global frame\n\
00215 string frame_id\n\
00216 \n\
00217 ";
00218 }
00219
00220 static const char* value(const ::clearpath_base::SystemStatus_<ContainerAllocator> &) { return value(); }
00221 };
00222
00223 template<class ContainerAllocator> struct HasHeader< ::clearpath_base::SystemStatus_<ContainerAllocator> > : public TrueType {};
00224 template<class ContainerAllocator> struct HasHeader< const ::clearpath_base::SystemStatus_<ContainerAllocator> > : public TrueType {};
00225 }
00226 }
00227
00228 namespace ros
00229 {
00230 namespace serialization
00231 {
00232
00233 template<class ContainerAllocator> struct Serializer< ::clearpath_base::SystemStatus_<ContainerAllocator> >
00234 {
00235 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00236 {
00237 stream.next(m.header);
00238 stream.next(m.uptime);
00239 stream.next(m.voltages);
00240 stream.next(m.currents);
00241 stream.next(m.temperatures);
00242 }
00243
00244 ROS_DECLARE_ALLINONE_SERIALIZER;
00245 };
00246 }
00247 }
00248
00249 namespace ros
00250 {
00251 namespace message_operations
00252 {
00253
00254 template<class ContainerAllocator>
00255 struct Printer< ::clearpath_base::SystemStatus_<ContainerAllocator> >
00256 {
00257 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::clearpath_base::SystemStatus_<ContainerAllocator> & v)
00258 {
00259 s << indent << "header: ";
00260 s << std::endl;
00261 Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header);
00262 s << indent << "uptime: ";
00263 Printer<uint32_t>::stream(s, indent + " ", v.uptime);
00264 s << indent << "voltages[]" << std::endl;
00265 for (size_t i = 0; i < v.voltages.size(); ++i)
00266 {
00267 s << indent << " voltages[" << i << "]: ";
00268 Printer<double>::stream(s, indent + " ", v.voltages[i]);
00269 }
00270 s << indent << "currents[]" << std::endl;
00271 for (size_t i = 0; i < v.currents.size(); ++i)
00272 {
00273 s << indent << " currents[" << i << "]: ";
00274 Printer<double>::stream(s, indent + " ", v.currents[i]);
00275 }
00276 s << indent << "temperatures[]" << std::endl;
00277 for (size_t i = 0; i < v.temperatures.size(); ++i)
00278 {
00279 s << indent << " temperatures[" << i << "]: ";
00280 Printer<double>::stream(s, indent + " ", v.temperatures[i]);
00281 }
00282 }
00283 };
00284
00285
00286 }
00287 }
00288
00289 #endif // CLEARPATH_BASE_MESSAGE_SYSTEMSTATUS_H
00290