5 #ifndef SENSOR_MSGS_MESSAGE_BATTERYSTATE_H 6 #define SENSOR_MSGS_MESSAGE_BATTERYSTATE_H 22 template <
class ContainerAllocator>
96 typedef std::vector<float, typename ContainerAllocator::template rebind<float>::other >
_cell_voltage_type;
99 typedef std::basic_string<char, std::char_traits<char>,
typename ContainerAllocator::template rebind<char>::other >
_location_type;
102 typedef std::basic_string<char, std::char_traits<char>,
typename ContainerAllocator::template rebind<char>::other >
_serial_number_type;
134 typedef ::sensor_msgs::BatteryState_<std::allocator<void> >
BatteryState;
185 template<
typename ContainerAllocator>
186 std::ostream& operator<<(std::ostream& s, const ::sensor_msgs::BatteryState_<ContainerAllocator> &
v)
196 namespace message_traits
209 template <
class ContainerAllocator>
214 template <
class ContainerAllocator>
219 template <
class ContainerAllocator>
224 template <
class ContainerAllocator>
229 template <
class ContainerAllocator>
234 template <
class ContainerAllocator>
240 template<
class ContainerAllocator>
245 return "476f837fa6771f6e16e3bf4ef96f8770";
248 static const char*
value(const ::sensor_msgs::BatteryState_<ContainerAllocator>&) {
return value(); }
249 static const uint64_t static_value1 = 0x476f837fa6771f6eULL;
250 static const uint64_t static_value2 = 0x16e3bf4ef96f8770ULL;
253 template<
class ContainerAllocator>
258 return "sensor_msgs/BatteryState";
261 static const char*
value(const ::sensor_msgs::BatteryState_<ContainerAllocator>&) {
return value(); }
264 template<
class ContainerAllocator>
270 # Constants are chosen to match the enums in the linux kernel\n\ 271 # defined in include/linux/power_supply.h as of version 3.7\n\ 272 # The one difference is for style reasons the constants are\n\ 273 # all uppercase not mixed case.\n\ 275 # Power supply status constants\n\ 276 uint8 POWER_SUPPLY_STATUS_UNKNOWN = 0\n\ 277 uint8 POWER_SUPPLY_STATUS_CHARGING = 1\n\ 278 uint8 POWER_SUPPLY_STATUS_DISCHARGING = 2\n\ 279 uint8 POWER_SUPPLY_STATUS_NOT_CHARGING = 3\n\ 280 uint8 POWER_SUPPLY_STATUS_FULL = 4\n\ 282 # Power supply health constants\n\ 283 uint8 POWER_SUPPLY_HEALTH_UNKNOWN = 0\n\ 284 uint8 POWER_SUPPLY_HEALTH_GOOD = 1\n\ 285 uint8 POWER_SUPPLY_HEALTH_OVERHEAT = 2\n\ 286 uint8 POWER_SUPPLY_HEALTH_DEAD = 3\n\ 287 uint8 POWER_SUPPLY_HEALTH_OVERVOLTAGE = 4\n\ 288 uint8 POWER_SUPPLY_HEALTH_UNSPEC_FAILURE = 5\n\ 289 uint8 POWER_SUPPLY_HEALTH_COLD = 6\n\ 290 uint8 POWER_SUPPLY_HEALTH_WATCHDOG_TIMER_EXPIRE = 7\n\ 291 uint8 POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE = 8\n\ 293 # Power supply technology (chemistry) constants\n\ 294 uint8 POWER_SUPPLY_TECHNOLOGY_UNKNOWN = 0\n\ 295 uint8 POWER_SUPPLY_TECHNOLOGY_NIMH = 1\n\ 296 uint8 POWER_SUPPLY_TECHNOLOGY_LION = 2\n\ 297 uint8 POWER_SUPPLY_TECHNOLOGY_LIPO = 3\n\ 298 uint8 POWER_SUPPLY_TECHNOLOGY_LIFE = 4\n\ 299 uint8 POWER_SUPPLY_TECHNOLOGY_NICD = 5\n\ 300 uint8 POWER_SUPPLY_TECHNOLOGY_LIMN = 6\n\ 303 float32 voltage # Voltage in Volts (Mandatory)\n\ 304 float32 current # Negative when discharging (A) (If unmeasured NaN)\n\ 305 float32 charge # Current charge in Ah (If unmeasured NaN)\n\ 306 float32 capacity # Capacity in Ah (last full capacity) (If unmeasured NaN)\n\ 307 float32 design_capacity # Capacity in Ah (design capacity) (If unmeasured NaN)\n\ 308 float32 percentage # Charge percentage on 0 to 1 range (If unmeasured NaN)\n\ 309 uint8 power_supply_status # The charging status as reported. Values defined above\n\ 310 uint8 power_supply_health # The battery health metric. Values defined above\n\ 311 uint8 power_supply_technology # The battery chemistry. Values defined above\n\ 312 bool present # True if the battery is present\n\ 314 float32[] cell_voltage # An array of individual cell voltages for each cell in the pack\n\ 315 # If individual voltages unknown but number of cells known set each to NaN\n\ 316 string location # The location into which the battery is inserted. (slot number or plug)\n\ 317 string serial_number # The best approximation of the battery serial number\n\ 319 ================================================================================\n\ 320 MSG: std_msgs/Header\n\ 321 # Standard metadata for higher-level stamped data types.\n\ 322 # This is generally used to communicate timestamped data \n\ 323 # in a particular coordinate frame.\n\ 325 # sequence ID: consecutively increasing ID \n\ 327 #Two-integer timestamp that is expressed as:\n\ 328 # * stamp.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs')\n\ 329 # * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs')\n\ 330 # time-handling sugar is provided by the client library\n\ 332 #Frame this data is associated with\n\ 339 static const char*
value(const ::sensor_msgs::BatteryState_<ContainerAllocator>&) {
return value(); }
347 namespace serialization
354 stream.next(m.header);
355 stream.next(m.voltage);
356 stream.next(m.current);
357 stream.next(m.charge);
358 stream.next(m.capacity);
359 stream.next(m.design_capacity);
360 stream.next(m.percentage);
361 stream.next(m.power_supply_status);
362 stream.next(m.power_supply_health);
363 stream.next(m.power_supply_technology);
364 stream.next(m.present);
365 stream.next(m.cell_voltage);
366 stream.next(m.location);
367 stream.next(m.serial_number);
378 namespace message_operations
381 template<
class ContainerAllocator>
384 template<
typename Stream>
static void stream(Stream&
s,
const std::string&
indent, const ::sensor_msgs::BatteryState_<ContainerAllocator>&
v)
386 s << indent <<
"header: ";
389 s << indent <<
"voltage: ";
391 s << indent <<
"current: ";
393 s << indent <<
"charge: ";
395 s << indent <<
"capacity: ";
397 s << indent <<
"design_capacity: ";
399 s << indent <<
"percentage: ";
401 s << indent <<
"power_supply_status: ";
403 s << indent <<
"power_supply_health: ";
405 s << indent <<
"power_supply_technology: ";
407 s << indent <<
"present: ";
409 s << indent <<
"cell_voltage[]" << std::endl;
410 for (
size_t i = 0;
i < v.cell_voltage.size(); ++
i)
412 s << indent <<
" cell_voltage[" <<
i <<
"]: ";
415 s << indent <<
"location: ";
417 s << indent <<
"serial_number: ";
425 #endif // SENSOR_MSGS_MESSAGE_BATTERYSTATE_H static void stream(Stream &s, const std::string &indent, const ::sensor_msgs::BatteryState_< ContainerAllocator > &v)
static void allInOne(Stream &stream, T m)
uint8_t _power_supply_health_type
static const char * value()
typedef void(APIENTRY *GLDEBUGPROC)(GLenum source
Base type for compile-type true/false tests. Compatible with Boost.MPL. classes inheriting from this ...
_cell_voltage_type cell_voltage
_serial_number_type serial_number
Specialize to provide the md5sum for a message.
_power_supply_technology_type power_supply_technology
def indent(str, line_prefix=' ')
Base type for compile-type true/false tests. Compatible with Boost.MPL. classes inheriting from this ...
Specialize to provide the datatype for a message.
boost::shared_ptr< ::sensor_msgs::BatteryState_< ContainerAllocator > > Ptr
std::basic_string< char, std::char_traits< char >, typename ContainerAllocator::template rebind< char >::other > _serial_number_type
A fixed-size datatype is one whose size is constant, i.e. it has no variable-length arrays or strings...
Stream base-class, provides common functionality for IStream and OStream.
::std_msgs::Header_< ContainerAllocator > _header_type
Tools for manipulating sensor_msgs.
_percentage_type percentage
#define ROS_DECLARE_ALLINONE_SERIALIZER
Declare your serializer to use an allInOne member instead of requiring 3 different serialization func...
static const char * value(const ::sensor_msgs::BatteryState_< ContainerAllocator > &)
unsigned __int64 uint64_t
static const char * value()
Specialize to provide the definition for a message.
_design_capacity_type design_capacity
static const char * value(const ::sensor_msgs::BatteryState_< ContainerAllocator > &)
boost::shared_ptr< ::sensor_msgs::BatteryState const > BatteryStateConstPtr
static const char * value(const ::sensor_msgs::BatteryState_< ContainerAllocator > &)
BatteryState_< ContainerAllocator > Type
std::basic_string< char, std::char_traits< char >, typename ContainerAllocator::template rebind< char >::other > _location_type
boost::shared_ptr< ::sensor_msgs::BatteryState_< ContainerAllocator > const > ConstPtr
uint8_t _power_supply_technology_type
BatteryState_(const ContainerAllocator &_alloc)
uint8_t _power_supply_status_type
float _design_capacity_type
_power_supply_health_type power_supply_health
Templated serialization class. Default implementation provides backwards compatibility with old messa...
std::vector< float, typename ContainerAllocator::template rebind< float >::other > _cell_voltage_type
_power_supply_status_type power_supply_status
::sensor_msgs::BatteryState_< std::allocator< void > > BatteryState
boost::shared_ptr< ::sensor_msgs::BatteryState > BatteryStatePtr
static const char * value()