Go to the documentation of this file.
6 #ifndef SENSOR_MSGS_MESSAGE_BATTERYSTATE_H
7 #define SENSOR_MSGS_MESSAGE_BATTERYSTATE_H
14 #include <ros/types.h>
15 #include <ros/serialization.h>
16 #include <ros/builtin_message_traits.h>
17 #include <ros/message_operations.h>
23 template <
class ContainerAllocator>
97 typedef std::vector<float, typename ContainerAllocator::template rebind<float>::other >
_cell_voltage_type;
100 typedef std::basic_string<char, std::char_traits<char>,
typename ContainerAllocator::template rebind<char>::other >
_location_type;
103 typedef std::basic_string<char, std::char_traits<char>,
typename ContainerAllocator::template rebind<char>::other >
_serial_number_type;
130 typedef std::shared_ptr< ::sensor_msgs::BatteryState_<ContainerAllocator> >
Ptr;
131 typedef std::shared_ptr< ::sensor_msgs::BatteryState_<ContainerAllocator>
const>
ConstPtr;
135 typedef ::sensor_msgs::BatteryState_<std::allocator<void> >
BatteryState;
186 template<
typename ContainerAllocator>
187 std::ostream&
operator<<(std::ostream& s, const ::sensor_msgs::BatteryState_<ContainerAllocator> & v)
197 namespace message_traits
210 template <
class ContainerAllocator>
215 template <
class ContainerAllocator>
220 template <
class ContainerAllocator>
225 template <
class ContainerAllocator>
230 template <
class ContainerAllocator>
235 template <
class ContainerAllocator>
241 template<
class ContainerAllocator>
246 return "476f837fa6771f6e16e3bf4ef96f8770";
249 static const char*
value(const ::sensor_msgs::BatteryState_<ContainerAllocator>&) {
return value(); }
250 static const uint64_t static_value1 = 0x476f837fa6771f6eULL;
251 static const uint64_t static_value2 = 0x16e3bf4ef96f8770ULL;
254 template<
class ContainerAllocator>
259 return "sensor_msgs/BatteryState";
262 static const char*
value(const ::sensor_msgs::BatteryState_<ContainerAllocator>&) {
return value(); }
265 template<
class ContainerAllocator>
271 # Constants are chosen to match the enums in the linux kernel\n\
272 # defined in include/linux/power_supply.h as of version 3.7\n\
273 # The one difference is for style reasons the constants are\n\
274 # all uppercase not mixed case.\n\
276 # Power supply status constants\n\
277 uint8 POWER_SUPPLY_STATUS_UNKNOWN = 0\n\
278 uint8 POWER_SUPPLY_STATUS_CHARGING = 1\n\
279 uint8 POWER_SUPPLY_STATUS_DISCHARGING = 2\n\
280 uint8 POWER_SUPPLY_STATUS_NOT_CHARGING = 3\n\
281 uint8 POWER_SUPPLY_STATUS_FULL = 4\n\
283 # Power supply health constants\n\
284 uint8 POWER_SUPPLY_HEALTH_UNKNOWN = 0\n\
285 uint8 POWER_SUPPLY_HEALTH_GOOD = 1\n\
286 uint8 POWER_SUPPLY_HEALTH_OVERHEAT = 2\n\
287 uint8 POWER_SUPPLY_HEALTH_DEAD = 3\n\
288 uint8 POWER_SUPPLY_HEALTH_OVERVOLTAGE = 4\n\
289 uint8 POWER_SUPPLY_HEALTH_UNSPEC_FAILURE = 5\n\
290 uint8 POWER_SUPPLY_HEALTH_COLD = 6\n\
291 uint8 POWER_SUPPLY_HEALTH_WATCHDOG_TIMER_EXPIRE = 7\n\
292 uint8 POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE = 8\n\
294 # Power supply technology (chemistry) constants\n\
295 uint8 POWER_SUPPLY_TECHNOLOGY_UNKNOWN = 0\n\
296 uint8 POWER_SUPPLY_TECHNOLOGY_NIMH = 1\n\
297 uint8 POWER_SUPPLY_TECHNOLOGY_LION = 2\n\
298 uint8 POWER_SUPPLY_TECHNOLOGY_LIPO = 3\n\
299 uint8 POWER_SUPPLY_TECHNOLOGY_LIFE = 4\n\
300 uint8 POWER_SUPPLY_TECHNOLOGY_NICD = 5\n\
301 uint8 POWER_SUPPLY_TECHNOLOGY_LIMN = 6\n\
304 float32 voltage # Voltage in Volts (Mandatory)\n\
305 float32 current # Negative when discharging (A) (If unmeasured NaN)\n\
306 float32 charge # Current charge in Ah (If unmeasured NaN)\n\
307 float32 capacity # Capacity in Ah (last full capacity) (If unmeasured NaN)\n\
308 float32 design_capacity # Capacity in Ah (design capacity) (If unmeasured NaN)\n\
309 float32 percentage # Charge percentage on 0 to 1 range (If unmeasured NaN)\n\
310 uint8 power_supply_status # The charging status as reported. Values defined above\n\
311 uint8 power_supply_health # The battery health metric. Values defined above\n\
312 uint8 power_supply_technology # The battery chemistry. Values defined above\n\
313 bool present # True if the battery is present\n\
315 float32[] cell_voltage # An array of individual cell voltages for each cell in the pack\n\
316 # If individual voltages unknown but number of cells known set each to NaN\n\
317 string location # The location into which the battery is inserted. (slot number or plug)\n\
318 string serial_number # The best approximation of the battery serial number\n\
320 ================================================================================\n\
321 MSG: std_msgs/Header\n\
322 # Standard metadata for higher-level stamped data types.\n\
323 # This is generally used to communicate timestamped data \n\
324 # in a particular coordinate frame.\n\
326 # sequence ID: consecutively increasing ID \n\
328 #Two-integer timestamp that is expressed as:\n\
329 # * stamp.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs')\n\
330 # * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs')\n\
331 # time-handling sugar is provided by the client library\n\
333 #Frame this data is associated with\n\
340 static const char*
value(const ::sensor_msgs::BatteryState_<ContainerAllocator>&) {
return value(); }
348 namespace serialization
353 template<
typename Stream,
typename T>
inline static void allInOne(
Stream& stream, T m)
355 stream.next(m.header);
356 stream.next(m.voltage);
357 stream.next(m.current);
358 stream.next(m.charge);
359 stream.next(m.capacity);
360 stream.next(m.design_capacity);
361 stream.next(m.percentage);
362 stream.next(m.power_supply_status);
363 stream.next(m.power_supply_health);
364 stream.next(m.power_supply_technology);
365 stream.next(m.present);
366 stream.next(m.cell_voltage);
367 stream.next(m.location);
368 stream.next(m.serial_number);
379 namespace message_operations
382 template<
class ContainerAllocator>
385 template<
typename Stream>
static void stream(Stream& s,
const std::string&
indent, const ::sensor_msgs::BatteryState_<ContainerAllocator>& v)
398 s <<
indent <<
"design_capacity: ";
402 s <<
indent <<
"power_supply_status: ";
404 s <<
indent <<
"power_supply_health: ";
406 s <<
indent <<
"power_supply_technology: ";
410 s <<
indent <<
"cell_voltage[]" << std::endl;
411 for (
size_t i = 0; i < v.cell_voltage.size(); ++i)
413 s <<
indent <<
" cell_voltage[" << i <<
"]: ";
418 s <<
indent <<
"serial_number: ";
426 #endif // SENSOR_MSGS_MESSAGE_BATTERYSTATE_H
Base type for compile-type true/false tests. Compatible with Boost.MPL. classes inheriting from this ...
@ POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE
std::shared_ptr< ::sensor_msgs::BatteryState const > BatteryStateConstPtr
_cell_voltage_type cell_voltage
BatteryState_< ContainerAllocator > Type
Templated serialization class. Default implementation provides backwards compatibility with old messa...
@ POWER_SUPPLY_HEALTH_UNKNOWN
@ POWER_SUPPLY_TECHNOLOGY_LIMN
uint8_t _power_supply_technology_type
uint8_t _power_supply_status_type
std::basic_string< char, std::char_traits< char >, typename ContainerAllocator::template rebind< char >::other > _serial_number_type
_power_supply_status_type power_supply_status
float _design_capacity_type
::std_msgs::Header_< ContainerAllocator > _header_type
std::shared_ptr< ::sensor_msgs::BatteryState_< ContainerAllocator > const > ConstPtr
uint8_t _power_supply_health_type
static void stream(Stream &s, const std::string &indent, const M &value)
A fixed-size datatype is one whose size is constant, i.e. it has no variable-length arrays or strings...
@ POWER_SUPPLY_STATUS_UNKNOWN
_serial_number_type serial_number
#define ROS_DECLARE_ALLINONE_SERIALIZER
Declare your serializer to use an allInOne member instead of requiring 3 different serialization func...
@ POWER_SUPPLY_TECHNOLOGY_NIMH
@ POWER_SUPPLY_HEALTH_DEAD
static void allInOne(Stream &stream, T m)
Specialize to provide the datatype for a message.
static const char * value()
Specialize to provide the definition for a message.
static const char * value()
@ POWER_SUPPLY_HEALTH_UNSPEC_FAILURE
std::ostream & operator<<(std::ostream &s, const ::sensor_msgs::BatteryState_< ContainerAllocator > &v)
@ POWER_SUPPLY_STATUS_DISCHARGING
static const char * value(const ::sensor_msgs::BatteryState_< ContainerAllocator > &)
@ POWER_SUPPLY_HEALTH_OVERHEAT
@ POWER_SUPPLY_TECHNOLOGY_NICD
std::basic_string< char, std::char_traits< char >, typename ContainerAllocator::template rebind< char >::other > _location_type
static const char * value()
@ POWER_SUPPLY_TECHNOLOGY_LIPO
_power_supply_technology_type power_supply_technology
@ POWER_SUPPLY_HEALTH_OVERVOLTAGE
@ POWER_SUPPLY_HEALTH_GOOD
static void stream(Stream &s, const std::string &indent, const ::sensor_msgs::BatteryState_< ContainerAllocator > &v)
std::shared_ptr< ::sensor_msgs::BatteryState_< ContainerAllocator > > Ptr
_design_capacity_type design_capacity
@ POWER_SUPPLY_HEALTH_WATCHDOG_TIMER_EXPIRE
@ POWER_SUPPLY_STATUS_CHARGING
@ POWER_SUPPLY_TECHNOLOGY_LIFE
::sensor_msgs::BatteryState_< std::allocator< void > > BatteryState
std::vector< float, typename ContainerAllocator::template rebind< float >::other > _cell_voltage_type
Base type for compile-type true/false tests. Compatible with Boost.MPL. classes inheriting from this ...
Specialize to provide the md5sum for a message.
@ POWER_SUPPLY_TECHNOLOGY_UNKNOWN
_power_supply_health_type power_supply_health
@ POWER_SUPPLY_HEALTH_COLD
static const char * value(const ::sensor_msgs::BatteryState_< ContainerAllocator > &)
Stream base-class, provides common functionality for IStream and OStream.
@ POWER_SUPPLY_STATUS_NOT_CHARGING
std::shared_ptr< ::sensor_msgs::BatteryState > BatteryStatePtr
static const char * value(const ::sensor_msgs::BatteryState_< ContainerAllocator > &)
@ POWER_SUPPLY_TECHNOLOGY_LION
Tools for manipulating sensor_msgs.
@ POWER_SUPPLY_STATUS_FULL
BatteryState_(const ContainerAllocator &_alloc)
_percentage_type percentage
sick_scan_xd
Author(s): Michael Lehning
, Jochen Sprickerhof , Martin Günther
autogenerated on Fri Oct 25 2024 02:47:07