BatteryServer.h
Go to the documentation of this file.
00001 /* Auto-generated by genmsg_cpp for file /home/rosbuild/hudson/workspace/doc-fuerte-pr2_common/doc_stacks/2014-01-06_11-32-47.864635/pr2_common/pr2_msgs/msg/BatteryServer.msg */
00002 #ifndef PR2_MSGS_MESSAGE_BATTERYSERVER_H
00003 #define PR2_MSGS_MESSAGE_BATTERYSERVER_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 #include "std_msgs/Header.h"
00018 #include "pr2_msgs/BatteryState.h"
00019 
00020 namespace pr2_msgs
00021 {
00022 template <class ContainerAllocator>
00023 struct BatteryServer_ {
00024   typedef BatteryServer_<ContainerAllocator> Type;
00025 
00026   BatteryServer_()
00027   : header()
00028   , id(0)
00029   , lastTimeSystem(0)
00030   , timeLeft(0)
00031   , averageCharge(0)
00032   , message()
00033   , lastTimeController(0)
00034   , present(0)
00035   , charging(0)
00036   , discharging(0)
00037   , reserved(0)
00038   , powerPresent(0)
00039   , powerNG(0)
00040   , inhibited(0)
00041   , battery()
00042   {
00043   }
00044 
00045   BatteryServer_(const ContainerAllocator& _alloc)
00046   : header(_alloc)
00047   , id(0)
00048   , lastTimeSystem(0)
00049   , timeLeft(0)
00050   , averageCharge(0)
00051   , message(_alloc)
00052   , lastTimeController(0)
00053   , present(0)
00054   , charging(0)
00055   , discharging(0)
00056   , reserved(0)
00057   , powerPresent(0)
00058   , powerNG(0)
00059   , inhibited(0)
00060   , battery(_alloc)
00061   {
00062   }
00063 
00064   typedef  ::std_msgs::Header_<ContainerAllocator>  _header_type;
00065    ::std_msgs::Header_<ContainerAllocator>  header;
00066 
00067   typedef int32_t _id_type;
00068   int32_t id;
00069 
00070   typedef int32_t _lastTimeSystem_type;
00071   int32_t lastTimeSystem;
00072 
00073   typedef uint16_t _timeLeft_type;
00074   uint16_t timeLeft;
00075 
00076   typedef uint16_t _averageCharge_type;
00077   uint16_t averageCharge;
00078 
00079   typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other >  _message_type;
00080   std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other >  message;
00081 
00082   typedef int32_t _lastTimeController_type;
00083   int32_t lastTimeController;
00084 
00085   typedef uint16_t _present_type;
00086   uint16_t present;
00087 
00088   typedef uint16_t _charging_type;
00089   uint16_t charging;
00090 
00091   typedef uint16_t _discharging_type;
00092   uint16_t discharging;
00093 
00094   typedef uint16_t _reserved_type;
00095   uint16_t reserved;
00096 
00097   typedef uint16_t _powerPresent_type;
00098   uint16_t powerPresent;
00099 
00100   typedef uint16_t _powerNG_type;
00101   uint16_t powerNG;
00102 
00103   typedef uint16_t _inhibited_type;
00104   uint16_t inhibited;
00105 
00106   typedef std::vector< ::pr2_msgs::BatteryState_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::pr2_msgs::BatteryState_<ContainerAllocator> >::other >  _battery_type;
00107   std::vector< ::pr2_msgs::BatteryState_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::pr2_msgs::BatteryState_<ContainerAllocator> >::other >  battery;
00108 
00109   enum { MAX_BAT_COUNT = 4 };
00110   enum { MAX_BAT_REG = 48 };
00111 
00112   typedef boost::shared_ptr< ::pr2_msgs::BatteryServer_<ContainerAllocator> > Ptr;
00113   typedef boost::shared_ptr< ::pr2_msgs::BatteryServer_<ContainerAllocator>  const> ConstPtr;
00114   boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00115 }; // struct BatteryServer
00116 typedef  ::pr2_msgs::BatteryServer_<std::allocator<void> > BatteryServer;
00117 
00118 typedef boost::shared_ptr< ::pr2_msgs::BatteryServer> BatteryServerPtr;
00119 typedef boost::shared_ptr< ::pr2_msgs::BatteryServer const> BatteryServerConstPtr;
00120 
00121 
00122 template<typename ContainerAllocator>
00123 std::ostream& operator<<(std::ostream& s, const  ::pr2_msgs::BatteryServer_<ContainerAllocator> & v)
00124 {
00125   ros::message_operations::Printer< ::pr2_msgs::BatteryServer_<ContainerAllocator> >::stream(s, "", v);
00126   return s;}
00127 
00128 } // namespace pr2_msgs
00129 
00130 namespace ros
00131 {
00132 namespace message_traits
00133 {
00134 template<class ContainerAllocator> struct IsMessage< ::pr2_msgs::BatteryServer_<ContainerAllocator> > : public TrueType {};
00135 template<class ContainerAllocator> struct IsMessage< ::pr2_msgs::BatteryServer_<ContainerAllocator>  const> : public TrueType {};
00136 template<class ContainerAllocator>
00137 struct MD5Sum< ::pr2_msgs::BatteryServer_<ContainerAllocator> > {
00138   static const char* value() 
00139   {
00140     return "4f6d6e54c9581beb1df7ea408c0727be";
00141   }
00142 
00143   static const char* value(const  ::pr2_msgs::BatteryServer_<ContainerAllocator> &) { return value(); } 
00144   static const uint64_t static_value1 = 0x4f6d6e54c9581bebULL;
00145   static const uint64_t static_value2 = 0x1df7ea408c0727beULL;
00146 };
00147 
00148 template<class ContainerAllocator>
00149 struct DataType< ::pr2_msgs::BatteryServer_<ContainerAllocator> > {
00150   static const char* value() 
00151   {
00152     return "pr2_msgs/BatteryServer";
00153   }
00154 
00155   static const char* value(const  ::pr2_msgs::BatteryServer_<ContainerAllocator> &) { return value(); } 
00156 };
00157 
00158 template<class ContainerAllocator>
00159 struct Definition< ::pr2_msgs::BatteryServer_<ContainerAllocator> > {
00160   static const char* value() 
00161   {
00162     return "# DEPRECATED. Use pr2_msgs/BatteryServer2 instead.\n\
00163 Header header\n\
00164 uint32 MAX_BAT_COUNT=4\n\
00165 uint32 MAX_BAT_REG=48\n\
00166 int32 id  # unique ID for each battery server\n\
00167 # Battery System Stats\n\
00168 int32 lastTimeSystem #epoch time\n\
00169 uint16 timeLeft      # in minutes\n\
00170 uint16 averageCharge # in percent\n\
00171 string message\n\
00172 # Battery Controller Flags\n\
00173 int32 lastTimeController #epoch time\n\
00174 uint16 present\n\
00175 uint16 charging\n\
00176 uint16 discharging\n\
00177 uint16 reserved\n\
00178 uint16 powerPresent\n\
00179 uint16 powerNG\n\
00180 uint16 inhibited\n\
00181 # for each battery\n\
00182 pr2_msgs/BatteryState[] battery\n\
00183 \n\
00184 ================================================================================\n\
00185 MSG: std_msgs/Header\n\
00186 # Standard metadata for higher-level stamped data types.\n\
00187 # This is generally used to communicate timestamped data \n\
00188 # in a particular coordinate frame.\n\
00189 # \n\
00190 # sequence ID: consecutively increasing ID \n\
00191 uint32 seq\n\
00192 #Two-integer timestamp that is expressed as:\n\
00193 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00194 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00195 # time-handling sugar is provided by the client library\n\
00196 time stamp\n\
00197 #Frame this data is associated with\n\
00198 # 0: no frame\n\
00199 # 1: global frame\n\
00200 string frame_id\n\
00201 \n\
00202 ================================================================================\n\
00203 MSG: pr2_msgs/BatteryState\n\
00204 # DEPRECATED.  Use pr2_msgs/BatteryState2 instead.\n\
00205 # Each batteries registers\n\
00206 int32 lastTimeBattery #epoch time\n\
00207 uint16[48] batReg\n\
00208 uint16[48] batRegFlag\n\
00209 int32[48] batRegTime\n\
00210 \n\
00211 ";
00212   }
00213 
00214   static const char* value(const  ::pr2_msgs::BatteryServer_<ContainerAllocator> &) { return value(); } 
00215 };
00216 
00217 template<class ContainerAllocator> struct HasHeader< ::pr2_msgs::BatteryServer_<ContainerAllocator> > : public TrueType {};
00218 template<class ContainerAllocator> struct HasHeader< const ::pr2_msgs::BatteryServer_<ContainerAllocator> > : public TrueType {};
00219 } // namespace message_traits
00220 } // namespace ros
00221 
00222 namespace ros
00223 {
00224 namespace serialization
00225 {
00226 
00227 template<class ContainerAllocator> struct Serializer< ::pr2_msgs::BatteryServer_<ContainerAllocator> >
00228 {
00229   template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00230   {
00231     stream.next(m.header);
00232     stream.next(m.id);
00233     stream.next(m.lastTimeSystem);
00234     stream.next(m.timeLeft);
00235     stream.next(m.averageCharge);
00236     stream.next(m.message);
00237     stream.next(m.lastTimeController);
00238     stream.next(m.present);
00239     stream.next(m.charging);
00240     stream.next(m.discharging);
00241     stream.next(m.reserved);
00242     stream.next(m.powerPresent);
00243     stream.next(m.powerNG);
00244     stream.next(m.inhibited);
00245     stream.next(m.battery);
00246   }
00247 
00248   ROS_DECLARE_ALLINONE_SERIALIZER;
00249 }; // struct BatteryServer_
00250 } // namespace serialization
00251 } // namespace ros
00252 
00253 namespace ros
00254 {
00255 namespace message_operations
00256 {
00257 
00258 template<class ContainerAllocator>
00259 struct Printer< ::pr2_msgs::BatteryServer_<ContainerAllocator> >
00260 {
00261   template<typename Stream> static void stream(Stream& s, const std::string& indent, const  ::pr2_msgs::BatteryServer_<ContainerAllocator> & v) 
00262   {
00263     s << indent << "header: ";
00264 s << std::endl;
00265     Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + "  ", v.header);
00266     s << indent << "id: ";
00267     Printer<int32_t>::stream(s, indent + "  ", v.id);
00268     s << indent << "lastTimeSystem: ";
00269     Printer<int32_t>::stream(s, indent + "  ", v.lastTimeSystem);
00270     s << indent << "timeLeft: ";
00271     Printer<uint16_t>::stream(s, indent + "  ", v.timeLeft);
00272     s << indent << "averageCharge: ";
00273     Printer<uint16_t>::stream(s, indent + "  ", v.averageCharge);
00274     s << indent << "message: ";
00275     Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + "  ", v.message);
00276     s << indent << "lastTimeController: ";
00277     Printer<int32_t>::stream(s, indent + "  ", v.lastTimeController);
00278     s << indent << "present: ";
00279     Printer<uint16_t>::stream(s, indent + "  ", v.present);
00280     s << indent << "charging: ";
00281     Printer<uint16_t>::stream(s, indent + "  ", v.charging);
00282     s << indent << "discharging: ";
00283     Printer<uint16_t>::stream(s, indent + "  ", v.discharging);
00284     s << indent << "reserved: ";
00285     Printer<uint16_t>::stream(s, indent + "  ", v.reserved);
00286     s << indent << "powerPresent: ";
00287     Printer<uint16_t>::stream(s, indent + "  ", v.powerPresent);
00288     s << indent << "powerNG: ";
00289     Printer<uint16_t>::stream(s, indent + "  ", v.powerNG);
00290     s << indent << "inhibited: ";
00291     Printer<uint16_t>::stream(s, indent + "  ", v.inhibited);
00292     s << indent << "battery[]" << std::endl;
00293     for (size_t i = 0; i < v.battery.size(); ++i)
00294     {
00295       s << indent << "  battery[" << i << "]: ";
00296       s << std::endl;
00297       s << indent;
00298       Printer< ::pr2_msgs::BatteryState_<ContainerAllocator> >::stream(s, indent + "    ", v.battery[i]);
00299     }
00300   }
00301 };
00302 
00303 
00304 } // namespace message_operations
00305 } // namespace ros
00306 
00307 #endif // PR2_MSGS_MESSAGE_BATTERYSERVER_H
00308 


pr2_msgs
Author(s): Eric Berger and many others
autogenerated on Mon Jan 6 2014 11:34:07