$search
00001 /* Auto-generated by genmsg_cpp for file /home/rosbuild/hudson/workspace/doc-electric-pr2_common/doc_stacks/2013-03-01_16-36-22.045406/pr2_common/pr2_msgs/msg/PowerBoardState.msg */ 00002 #ifndef PR2_MSGS_MESSAGE_POWERBOARDSTATE_H 00003 #define PR2_MSGS_MESSAGE_POWERBOARDSTATE_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 00019 namespace pr2_msgs 00020 { 00021 template <class ContainerAllocator> 00022 struct PowerBoardState_ { 00023 typedef PowerBoardState_<ContainerAllocator> Type; 00024 00025 PowerBoardState_() 00026 : header() 00027 , name() 00028 , serial_num(0) 00029 , input_voltage(0.0) 00030 , master_state(0) 00031 , circuit_state() 00032 , circuit_voltage() 00033 , run_stop(false) 00034 , wireless_stop(false) 00035 { 00036 circuit_state.assign(0); 00037 circuit_voltage.assign(0.0); 00038 } 00039 00040 PowerBoardState_(const ContainerAllocator& _alloc) 00041 : header(_alloc) 00042 , name(_alloc) 00043 , serial_num(0) 00044 , input_voltage(0.0) 00045 , master_state(0) 00046 , circuit_state() 00047 , circuit_voltage() 00048 , run_stop(false) 00049 , wireless_stop(false) 00050 { 00051 circuit_state.assign(0); 00052 circuit_voltage.assign(0.0); 00053 } 00054 00055 typedef ::std_msgs::Header_<ContainerAllocator> _header_type; 00056 ::std_msgs::Header_<ContainerAllocator> header; 00057 00058 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _name_type; 00059 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > name; 00060 00061 typedef uint32_t _serial_num_type; 00062 uint32_t serial_num; 00063 00064 typedef double _input_voltage_type; 00065 double input_voltage; 00066 00067 typedef int8_t _master_state_type; 00068 int8_t master_state; 00069 00070 typedef boost::array<int8_t, 3> _circuit_state_type; 00071 boost::array<int8_t, 3> circuit_state; 00072 00073 typedef boost::array<double, 3> _circuit_voltage_type; 00074 boost::array<double, 3> circuit_voltage; 00075 00076 typedef uint8_t _run_stop_type; 00077 uint8_t run_stop; 00078 00079 typedef uint8_t _wireless_stop_type; 00080 uint8_t wireless_stop; 00081 00082 enum { STATE_NOPOWER = 0 }; 00083 enum { STATE_STANDBY = 1 }; 00084 enum { STATE_PUMPING = 2 }; 00085 enum { STATE_ON = 3 }; 00086 enum { STATE_ENABLED = 3 }; 00087 enum { STATE_DISABLED = 4 }; 00088 enum { MASTER_NOPOWER = 0 }; 00089 enum { MASTER_STANDBY = 1 }; 00090 enum { MASTER_ON = 2 }; 00091 enum { MASTER_OFF = 3 }; 00092 enum { MASTER_SHUTDOWN = 4 }; 00093 00094 ROS_DEPRECATED uint32_t get_circuit_state_size() const { return (uint32_t)circuit_state.size(); } 00095 ROS_DEPRECATED uint32_t get_circuit_voltage_size() const { return (uint32_t)circuit_voltage.size(); } 00096 private: 00097 static const char* __s_getDataType_() { return "pr2_msgs/PowerBoardState"; } 00098 public: 00099 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); } 00100 00101 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); } 00102 00103 private: 00104 static const char* __s_getMD5Sum_() { return "08899b671e6a1a449e7ce0000da8ae7b"; } 00105 public: 00106 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); } 00107 00108 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); } 00109 00110 private: 00111 static const char* __s_getMessageDefinition_() { return "# This message communicates the state of the PR2's power board.\n\ 00112 int8 STATE_NOPOWER=0\n\ 00113 int8 STATE_STANDBY=1\n\ 00114 int8 STATE_PUMPING=2\n\ 00115 int8 STATE_ON=3\n\ 00116 int8 STATE_ENABLED=3 # Preferred over STATE_ON, keeping STATE_ON for backcompat\n\ 00117 int8 STATE_DISABLED=4\n\ 00118 \n\ 00119 int8 MASTER_NOPOWER=0\n\ 00120 int8 MASTER_STANDBY=1\n\ 00121 int8 MASTER_ON=2\n\ 00122 int8 MASTER_OFF=3\n\ 00123 int8 MASTER_SHUTDOWN=4\n\ 00124 \n\ 00125 Header header\n\ 00126 string name # Name with serial number\n\ 00127 uint32 serial_num # Serial number for this board's message\n\ 00128 float64 input_voltage # Input voltage to power board\n\ 00129 \n\ 00130 # Master States:\n\ 00131 # MASTER_NOPOWER, MASTER_STANDBY, MASTER_ON, MASTER_OFF, MASTER_SHUTDOWN \n\ 00132 int8 master_state # The master state machine's state in the powerboard\n\ 00133 \n\ 00134 # Circuit States:\n\ 00135 # STATE_NOPOWER, STATE_STANDBY, STATE_PUMPING, STATE_ON, STATE_DISABLED\n\ 00136 int8[3] circuit_state # One of the above states\n\ 00137 float64[3] circuit_voltage # Output voltage of each circuit\n\ 00138 \n\ 00139 # True if robot should be enabled\n\ 00140 bool run_stop #Note - if the wireless run-stop is hit, this will be unobservable\n\ 00141 bool wireless_stop \n\ 00142 \n\ 00143 ================================================================================\n\ 00144 MSG: std_msgs/Header\n\ 00145 # Standard metadata for higher-level stamped data types.\n\ 00146 # This is generally used to communicate timestamped data \n\ 00147 # in a particular coordinate frame.\n\ 00148 # \n\ 00149 # sequence ID: consecutively increasing ID \n\ 00150 uint32 seq\n\ 00151 #Two-integer timestamp that is expressed as:\n\ 00152 # * stamp.secs: seconds (stamp_secs) since epoch\n\ 00153 # * stamp.nsecs: nanoseconds since stamp_secs\n\ 00154 # time-handling sugar is provided by the client library\n\ 00155 time stamp\n\ 00156 #Frame this data is associated with\n\ 00157 # 0: no frame\n\ 00158 # 1: global frame\n\ 00159 string frame_id\n\ 00160 \n\ 00161 "; } 00162 public: 00163 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); } 00164 00165 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); } 00166 00167 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const 00168 { 00169 ros::serialization::OStream stream(write_ptr, 1000000000); 00170 ros::serialization::serialize(stream, header); 00171 ros::serialization::serialize(stream, name); 00172 ros::serialization::serialize(stream, serial_num); 00173 ros::serialization::serialize(stream, input_voltage); 00174 ros::serialization::serialize(stream, master_state); 00175 ros::serialization::serialize(stream, circuit_state); 00176 ros::serialization::serialize(stream, circuit_voltage); 00177 ros::serialization::serialize(stream, run_stop); 00178 ros::serialization::serialize(stream, wireless_stop); 00179 return stream.getData(); 00180 } 00181 00182 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr) 00183 { 00184 ros::serialization::IStream stream(read_ptr, 1000000000); 00185 ros::serialization::deserialize(stream, header); 00186 ros::serialization::deserialize(stream, name); 00187 ros::serialization::deserialize(stream, serial_num); 00188 ros::serialization::deserialize(stream, input_voltage); 00189 ros::serialization::deserialize(stream, master_state); 00190 ros::serialization::deserialize(stream, circuit_state); 00191 ros::serialization::deserialize(stream, circuit_voltage); 00192 ros::serialization::deserialize(stream, run_stop); 00193 ros::serialization::deserialize(stream, wireless_stop); 00194 return stream.getData(); 00195 } 00196 00197 ROS_DEPRECATED virtual uint32_t serializationLength() const 00198 { 00199 uint32_t size = 0; 00200 size += ros::serialization::serializationLength(header); 00201 size += ros::serialization::serializationLength(name); 00202 size += ros::serialization::serializationLength(serial_num); 00203 size += ros::serialization::serializationLength(input_voltage); 00204 size += ros::serialization::serializationLength(master_state); 00205 size += ros::serialization::serializationLength(circuit_state); 00206 size += ros::serialization::serializationLength(circuit_voltage); 00207 size += ros::serialization::serializationLength(run_stop); 00208 size += ros::serialization::serializationLength(wireless_stop); 00209 return size; 00210 } 00211 00212 typedef boost::shared_ptr< ::pr2_msgs::PowerBoardState_<ContainerAllocator> > Ptr; 00213 typedef boost::shared_ptr< ::pr2_msgs::PowerBoardState_<ContainerAllocator> const> ConstPtr; 00214 boost::shared_ptr<std::map<std::string, std::string> > __connection_header; 00215 }; // struct PowerBoardState 00216 typedef ::pr2_msgs::PowerBoardState_<std::allocator<void> > PowerBoardState; 00217 00218 typedef boost::shared_ptr< ::pr2_msgs::PowerBoardState> PowerBoardStatePtr; 00219 typedef boost::shared_ptr< ::pr2_msgs::PowerBoardState const> PowerBoardStateConstPtr; 00220 00221 00222 template<typename ContainerAllocator> 00223 std::ostream& operator<<(std::ostream& s, const ::pr2_msgs::PowerBoardState_<ContainerAllocator> & v) 00224 { 00225 ros::message_operations::Printer< ::pr2_msgs::PowerBoardState_<ContainerAllocator> >::stream(s, "", v); 00226 return s;} 00227 00228 } // namespace pr2_msgs 00229 00230 namespace ros 00231 { 00232 namespace message_traits 00233 { 00234 template<class ContainerAllocator> struct IsMessage< ::pr2_msgs::PowerBoardState_<ContainerAllocator> > : public TrueType {}; 00235 template<class ContainerAllocator> struct IsMessage< ::pr2_msgs::PowerBoardState_<ContainerAllocator> const> : public TrueType {}; 00236 template<class ContainerAllocator> 00237 struct MD5Sum< ::pr2_msgs::PowerBoardState_<ContainerAllocator> > { 00238 static const char* value() 00239 { 00240 return "08899b671e6a1a449e7ce0000da8ae7b"; 00241 } 00242 00243 static const char* value(const ::pr2_msgs::PowerBoardState_<ContainerAllocator> &) { return value(); } 00244 static const uint64_t static_value1 = 0x08899b671e6a1a44ULL; 00245 static const uint64_t static_value2 = 0x9e7ce0000da8ae7bULL; 00246 }; 00247 00248 template<class ContainerAllocator> 00249 struct DataType< ::pr2_msgs::PowerBoardState_<ContainerAllocator> > { 00250 static const char* value() 00251 { 00252 return "pr2_msgs/PowerBoardState"; 00253 } 00254 00255 static const char* value(const ::pr2_msgs::PowerBoardState_<ContainerAllocator> &) { return value(); } 00256 }; 00257 00258 template<class ContainerAllocator> 00259 struct Definition< ::pr2_msgs::PowerBoardState_<ContainerAllocator> > { 00260 static const char* value() 00261 { 00262 return "# This message communicates the state of the PR2's power board.\n\ 00263 int8 STATE_NOPOWER=0\n\ 00264 int8 STATE_STANDBY=1\n\ 00265 int8 STATE_PUMPING=2\n\ 00266 int8 STATE_ON=3\n\ 00267 int8 STATE_ENABLED=3 # Preferred over STATE_ON, keeping STATE_ON for backcompat\n\ 00268 int8 STATE_DISABLED=4\n\ 00269 \n\ 00270 int8 MASTER_NOPOWER=0\n\ 00271 int8 MASTER_STANDBY=1\n\ 00272 int8 MASTER_ON=2\n\ 00273 int8 MASTER_OFF=3\n\ 00274 int8 MASTER_SHUTDOWN=4\n\ 00275 \n\ 00276 Header header\n\ 00277 string name # Name with serial number\n\ 00278 uint32 serial_num # Serial number for this board's message\n\ 00279 float64 input_voltage # Input voltage to power board\n\ 00280 \n\ 00281 # Master States:\n\ 00282 # MASTER_NOPOWER, MASTER_STANDBY, MASTER_ON, MASTER_OFF, MASTER_SHUTDOWN \n\ 00283 int8 master_state # The master state machine's state in the powerboard\n\ 00284 \n\ 00285 # Circuit States:\n\ 00286 # STATE_NOPOWER, STATE_STANDBY, STATE_PUMPING, STATE_ON, STATE_DISABLED\n\ 00287 int8[3] circuit_state # One of the above states\n\ 00288 float64[3] circuit_voltage # Output voltage of each circuit\n\ 00289 \n\ 00290 # True if robot should be enabled\n\ 00291 bool run_stop #Note - if the wireless run-stop is hit, this will be unobservable\n\ 00292 bool wireless_stop \n\ 00293 \n\ 00294 ================================================================================\n\ 00295 MSG: std_msgs/Header\n\ 00296 # Standard metadata for higher-level stamped data types.\n\ 00297 # This is generally used to communicate timestamped data \n\ 00298 # in a particular coordinate frame.\n\ 00299 # \n\ 00300 # sequence ID: consecutively increasing ID \n\ 00301 uint32 seq\n\ 00302 #Two-integer timestamp that is expressed as:\n\ 00303 # * stamp.secs: seconds (stamp_secs) since epoch\n\ 00304 # * stamp.nsecs: nanoseconds since stamp_secs\n\ 00305 # time-handling sugar is provided by the client library\n\ 00306 time stamp\n\ 00307 #Frame this data is associated with\n\ 00308 # 0: no frame\n\ 00309 # 1: global frame\n\ 00310 string frame_id\n\ 00311 \n\ 00312 "; 00313 } 00314 00315 static const char* value(const ::pr2_msgs::PowerBoardState_<ContainerAllocator> &) { return value(); } 00316 }; 00317 00318 template<class ContainerAllocator> struct HasHeader< ::pr2_msgs::PowerBoardState_<ContainerAllocator> > : public TrueType {}; 00319 template<class ContainerAllocator> struct HasHeader< const ::pr2_msgs::PowerBoardState_<ContainerAllocator> > : public TrueType {}; 00320 } // namespace message_traits 00321 } // namespace ros 00322 00323 namespace ros 00324 { 00325 namespace serialization 00326 { 00327 00328 template<class ContainerAllocator> struct Serializer< ::pr2_msgs::PowerBoardState_<ContainerAllocator> > 00329 { 00330 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m) 00331 { 00332 stream.next(m.header); 00333 stream.next(m.name); 00334 stream.next(m.serial_num); 00335 stream.next(m.input_voltage); 00336 stream.next(m.master_state); 00337 stream.next(m.circuit_state); 00338 stream.next(m.circuit_voltage); 00339 stream.next(m.run_stop); 00340 stream.next(m.wireless_stop); 00341 } 00342 00343 ROS_DECLARE_ALLINONE_SERIALIZER; 00344 }; // struct PowerBoardState_ 00345 } // namespace serialization 00346 } // namespace ros 00347 00348 namespace ros 00349 { 00350 namespace message_operations 00351 { 00352 00353 template<class ContainerAllocator> 00354 struct Printer< ::pr2_msgs::PowerBoardState_<ContainerAllocator> > 00355 { 00356 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::pr2_msgs::PowerBoardState_<ContainerAllocator> & v) 00357 { 00358 s << indent << "header: "; 00359 s << std::endl; 00360 Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header); 00361 s << indent << "name: "; 00362 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.name); 00363 s << indent << "serial_num: "; 00364 Printer<uint32_t>::stream(s, indent + " ", v.serial_num); 00365 s << indent << "input_voltage: "; 00366 Printer<double>::stream(s, indent + " ", v.input_voltage); 00367 s << indent << "master_state: "; 00368 Printer<int8_t>::stream(s, indent + " ", v.master_state); 00369 s << indent << "circuit_state[]" << std::endl; 00370 for (size_t i = 0; i < v.circuit_state.size(); ++i) 00371 { 00372 s << indent << " circuit_state[" << i << "]: "; 00373 Printer<int8_t>::stream(s, indent + " ", v.circuit_state[i]); 00374 } 00375 s << indent << "circuit_voltage[]" << std::endl; 00376 for (size_t i = 0; i < v.circuit_voltage.size(); ++i) 00377 { 00378 s << indent << " circuit_voltage[" << i << "]: "; 00379 Printer<double>::stream(s, indent + " ", v.circuit_voltage[i]); 00380 } 00381 s << indent << "run_stop: "; 00382 Printer<uint8_t>::stream(s, indent + " ", v.run_stop); 00383 s << indent << "wireless_stop: "; 00384 Printer<uint8_t>::stream(s, indent + " ", v.wireless_stop); 00385 } 00386 }; 00387 00388 00389 } // namespace message_operations 00390 } // namespace ros 00391 00392 #endif // PR2_MSGS_MESSAGE_POWERBOARDSTATE_H 00393