BatteryState2.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/BatteryState2.msg */
00002 #ifndef PR2_MSGS_MESSAGE_BATTERYSTATE2_H
00003 #define PR2_MSGS_MESSAGE_BATTERYSTATE2_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 pr2_msgs
00019 {
00020 template <class ContainerAllocator>
00021 struct BatteryState2_ {
00022   typedef BatteryState2_<ContainerAllocator> Type;
00023 
00024   BatteryState2_()
00025   : present(false)
00026   , charging(false)
00027   , discharging(false)
00028   , power_present(false)
00029   , power_no_good(false)
00030   , inhibited(false)
00031   , last_battery_update()
00032   , battery_register()
00033   , battery_update_flag()
00034   , battery_register_update()
00035   {
00036     battery_register.assign(0);
00037     battery_update_flag.assign(false);
00038   }
00039 
00040   BatteryState2_(const ContainerAllocator& _alloc)
00041   : present(false)
00042   , charging(false)
00043   , discharging(false)
00044   , power_present(false)
00045   , power_no_good(false)
00046   , inhibited(false)
00047   , last_battery_update()
00048   , battery_register()
00049   , battery_update_flag()
00050   , battery_register_update()
00051   {
00052     battery_register.assign(0);
00053     battery_update_flag.assign(false);
00054   }
00055 
00056   typedef uint8_t _present_type;
00057   uint8_t present;
00058 
00059   typedef uint8_t _charging_type;
00060   uint8_t charging;
00061 
00062   typedef uint8_t _discharging_type;
00063   uint8_t discharging;
00064 
00065   typedef uint8_t _power_present_type;
00066   uint8_t power_present;
00067 
00068   typedef uint8_t _power_no_good_type;
00069   uint8_t power_no_good;
00070 
00071   typedef uint8_t _inhibited_type;
00072   uint8_t inhibited;
00073 
00074   typedef ros::Time _last_battery_update_type;
00075   ros::Time last_battery_update;
00076 
00077   typedef boost::array<int16_t, 48>  _battery_register_type;
00078   boost::array<int16_t, 48>  battery_register;
00079 
00080   typedef boost::array<uint8_t, 48>  _battery_update_flag_type;
00081   boost::array<uint8_t, 48>  battery_update_flag;
00082 
00083   typedef boost::array<ros::Time, 48>  _battery_register_update_type;
00084   boost::array<ros::Time, 48>  battery_register_update;
00085 
00086 
00087   typedef boost::shared_ptr< ::pr2_msgs::BatteryState2_<ContainerAllocator> > Ptr;
00088   typedef boost::shared_ptr< ::pr2_msgs::BatteryState2_<ContainerAllocator>  const> ConstPtr;
00089   boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00090 }; // struct BatteryState2
00091 typedef  ::pr2_msgs::BatteryState2_<std::allocator<void> > BatteryState2;
00092 
00093 typedef boost::shared_ptr< ::pr2_msgs::BatteryState2> BatteryState2Ptr;
00094 typedef boost::shared_ptr< ::pr2_msgs::BatteryState2 const> BatteryState2ConstPtr;
00095 
00096 
00097 template<typename ContainerAllocator>
00098 std::ostream& operator<<(std::ostream& s, const  ::pr2_msgs::BatteryState2_<ContainerAllocator> & v)
00099 {
00100   ros::message_operations::Printer< ::pr2_msgs::BatteryState2_<ContainerAllocator> >::stream(s, "", v);
00101   return s;}
00102 
00103 } // namespace pr2_msgs
00104 
00105 namespace ros
00106 {
00107 namespace message_traits
00108 {
00109 template<class ContainerAllocator> struct IsMessage< ::pr2_msgs::BatteryState2_<ContainerAllocator> > : public TrueType {};
00110 template<class ContainerAllocator> struct IsMessage< ::pr2_msgs::BatteryState2_<ContainerAllocator>  const> : public TrueType {};
00111 template<class ContainerAllocator>
00112 struct MD5Sum< ::pr2_msgs::BatteryState2_<ContainerAllocator> > {
00113   static const char* value() 
00114   {
00115     return "91b4acb000aa990ac3006834f9a99669";
00116   }
00117 
00118   static const char* value(const  ::pr2_msgs::BatteryState2_<ContainerAllocator> &) { return value(); } 
00119   static const uint64_t static_value1 = 0x91b4acb000aa990aULL;
00120   static const uint64_t static_value2 = 0xc3006834f9a99669ULL;
00121 };
00122 
00123 template<class ContainerAllocator>
00124 struct DataType< ::pr2_msgs::BatteryState2_<ContainerAllocator> > {
00125   static const char* value() 
00126   {
00127     return "pr2_msgs/BatteryState2";
00128   }
00129 
00130   static const char* value(const  ::pr2_msgs::BatteryState2_<ContainerAllocator> &) { return value(); } 
00131 };
00132 
00133 template<class ContainerAllocator>
00134 struct Definition< ::pr2_msgs::BatteryState2_<ContainerAllocator> > {
00135   static const char* value() 
00136   {
00137     return "# This message communicates the state of a single battery.\n\
00138 # Battery Controller Flags, one per battery\n\
00139 bool present       # is this pack present\n\
00140 bool charging      # is this pack charging\n\
00141 bool discharging   # is this pack discharging\n\
00142 bool power_present # is there an input voltage\n\
00143 bool power_no_good # is there a fault (No Good)\n\
00144 bool inhibited     # is this pack disabled for some reason\n\
00145 # These registers are per battery\n\
00146 time      last_battery_update     # last time any battery update occurred\n\
00147 int16[48] battery_register        # value of this register in the battery\n\
00148 bool[48]  battery_update_flag     # Has this register ever been updated\n\
00149 time[48]  battery_register_update # last time this specific register was updated\n\
00150 \n\
00151 ";
00152   }
00153 
00154   static const char* value(const  ::pr2_msgs::BatteryState2_<ContainerAllocator> &) { return value(); } 
00155 };
00156 
00157 template<class ContainerAllocator> struct IsFixedSize< ::pr2_msgs::BatteryState2_<ContainerAllocator> > : public TrueType {};
00158 } // namespace message_traits
00159 } // namespace ros
00160 
00161 namespace ros
00162 {
00163 namespace serialization
00164 {
00165 
00166 template<class ContainerAllocator> struct Serializer< ::pr2_msgs::BatteryState2_<ContainerAllocator> >
00167 {
00168   template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00169   {
00170     stream.next(m.present);
00171     stream.next(m.charging);
00172     stream.next(m.discharging);
00173     stream.next(m.power_present);
00174     stream.next(m.power_no_good);
00175     stream.next(m.inhibited);
00176     stream.next(m.last_battery_update);
00177     stream.next(m.battery_register);
00178     stream.next(m.battery_update_flag);
00179     stream.next(m.battery_register_update);
00180   }
00181 
00182   ROS_DECLARE_ALLINONE_SERIALIZER;
00183 }; // struct BatteryState2_
00184 } // namespace serialization
00185 } // namespace ros
00186 
00187 namespace ros
00188 {
00189 namespace message_operations
00190 {
00191 
00192 template<class ContainerAllocator>
00193 struct Printer< ::pr2_msgs::BatteryState2_<ContainerAllocator> >
00194 {
00195   template<typename Stream> static void stream(Stream& s, const std::string& indent, const  ::pr2_msgs::BatteryState2_<ContainerAllocator> & v) 
00196   {
00197     s << indent << "present: ";
00198     Printer<uint8_t>::stream(s, indent + "  ", v.present);
00199     s << indent << "charging: ";
00200     Printer<uint8_t>::stream(s, indent + "  ", v.charging);
00201     s << indent << "discharging: ";
00202     Printer<uint8_t>::stream(s, indent + "  ", v.discharging);
00203     s << indent << "power_present: ";
00204     Printer<uint8_t>::stream(s, indent + "  ", v.power_present);
00205     s << indent << "power_no_good: ";
00206     Printer<uint8_t>::stream(s, indent + "  ", v.power_no_good);
00207     s << indent << "inhibited: ";
00208     Printer<uint8_t>::stream(s, indent + "  ", v.inhibited);
00209     s << indent << "last_battery_update: ";
00210     Printer<ros::Time>::stream(s, indent + "  ", v.last_battery_update);
00211     s << indent << "battery_register[]" << std::endl;
00212     for (size_t i = 0; i < v.battery_register.size(); ++i)
00213     {
00214       s << indent << "  battery_register[" << i << "]: ";
00215       Printer<int16_t>::stream(s, indent + "  ", v.battery_register[i]);
00216     }
00217     s << indent << "battery_update_flag[]" << std::endl;
00218     for (size_t i = 0; i < v.battery_update_flag.size(); ++i)
00219     {
00220       s << indent << "  battery_update_flag[" << i << "]: ";
00221       Printer<uint8_t>::stream(s, indent + "  ", v.battery_update_flag[i]);
00222     }
00223     s << indent << "battery_register_update[]" << std::endl;
00224     for (size_t i = 0; i < v.battery_register_update.size(); ++i)
00225     {
00226       s << indent << "  battery_register_update[" << i << "]: ";
00227       Printer<ros::Time>::stream(s, indent + "  ", v.battery_register_update[i]);
00228     }
00229   }
00230 };
00231 
00232 
00233 } // namespace message_operations
00234 } // namespace ros
00235 
00236 #endif // PR2_MSGS_MESSAGE_BATTERYSTATE2_H
00237 


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