Go to the documentation of this file.
5 #ifndef SENSOR_MSGS_MESSAGE_BATTERYSTATE_H
6 #define SENSOR_MSGS_MESSAGE_BATTERYSTATE_H
22 template <
class ContainerAllocator>
96 typedef std::vector<float, typename std::allocator_traits< ContainerAllocator >::template rebind_alloc< float > >
_cell_voltage_type;
99 typedef std::basic_string<char, std::char_traits<char>,
typename std::allocator_traits< ContainerAllocator >::template rebind_alloc< char > >
_location_type;
102 typedef std::basic_string<char, std::char_traits<char>,
typename std::allocator_traits< ContainerAllocator >::template rebind_alloc< char > >
_serial_number_type;
129 typedef std::shared_ptr< ::sensor_msgs::BatteryState_<ContainerAllocator> >
Ptr;
130 typedef std::shared_ptr< ::sensor_msgs::BatteryState_<ContainerAllocator>
const>
ConstPtr;
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
359 stream.next(
m.design_capacity);
361 stream.next(
m.power_supply_status);
362 stream.next(
m.power_supply_health);
363 stream.next(
m.power_supply_technology);
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)
397 s <<
indent <<
"design_capacity: ";
401 s <<
indent <<
"power_supply_status: ";
403 s <<
indent <<
"power_supply_health: ";
405 s <<
indent <<
"power_supply_technology: ";
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 <<
"]: ";
417 s <<
indent <<
"serial_number: ";
425 #endif // SENSOR_MSGS_MESSAGE_BATTERYSTATE_H
std::shared_ptr< ::sensor_msgs::BatteryState const > BatteryStateConstPtr
_cell_voltage_type cell_voltage
BatteryState_< ContainerAllocator > Type
@ POWER_SUPPLY_HEALTH_DEAD
@ POWER_SUPPLY_STATUS_UNKNOWN
@ POWER_SUPPLY_TECHNOLOGY_LIMN
uint8_t _power_supply_technology_type
uint8_t _power_supply_status_type
_power_supply_status_type power_supply_status
float _design_capacity_type
::std_msgs::Header_< ContainerAllocator > _header_type
GLsizei const GLchar *const * string
static void stream(Stream &s, const std::string &indent, const ::sensor_msgs::BatteryState_< ContainerAllocator > &v)
std::shared_ptr< ::sensor_msgs::BatteryState_< ContainerAllocator > const > ConstPtr
uint8_t _power_supply_health_type
typedef void(APIENTRY *GLDEBUGPROC)(GLenum source
@ POWER_SUPPLY_TECHNOLOGY_NIMH
@ POWER_SUPPLY_HEALTH_UNKNOWN
A fixed-size datatype is one whose size is constant, i.e. it has no variable-length arrays or strings...
_serial_number_type serial_number
@ POWER_SUPPLY_STATUS_FULL
@ POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE
std::basic_string< char, std::char_traits< char >, typename std::allocator_traits< ContainerAllocator >::template rebind_alloc< char > > _serial_number_type
@ POWER_SUPPLY_TECHNOLOGY_LION
@ POWER_SUPPLY_TECHNOLOGY_NICD
std::ostream & operator<<(std::ostream &s, const ::sensor_msgs::BatteryState_< ContainerAllocator > &v)
@ POWER_SUPPLY_STATUS_DISCHARGING
@ POWER_SUPPLY_HEALTH_UNSPEC_FAILURE
unsigned __int64 uint64_t
std::basic_string< char, std::char_traits< char >, typename std::allocator_traits< ContainerAllocator >::template rebind_alloc< char > > _location_type
_power_supply_technology_type power_supply_technology
@ POWER_SUPPLY_HEALTH_OVERHEAT
@ POWER_SUPPLY_STATUS_CHARGING
std::shared_ptr< ::sensor_msgs::BatteryState_< ContainerAllocator > > Ptr
_design_capacity_type design_capacity
def indent(str, line_prefix=' ')
@ POWER_SUPPLY_HEALTH_COLD
static const char * value(const ::sensor_msgs::BatteryState_< ContainerAllocator > &)
::sensor_msgs::BatteryState_< std::allocator< void > > BatteryState
Specialize to provide the definition for a message.
static const char * value(const ::sensor_msgs::BatteryState_< ContainerAllocator > &)
Specialize to provide the md5sum for a message.
@ POWER_SUPPLY_HEALTH_GOOD
_power_supply_health_type power_supply_health
@ POWER_SUPPLY_HEALTH_OVERVOLTAGE
Templated serialization class. Default implementation provides backwards compatibility with old messa...
static void allInOne(Stream &stream, T m)
static const char * value()
@ POWER_SUPPLY_TECHNOLOGY_LIFE
@ POWER_SUPPLY_STATUS_NOT_CHARGING
#define ROS_DECLARE_ALLINONE_SERIALIZER
Declare your serializer to use an allInOne member instead of requiring 3 different serialization func...
@ POWER_SUPPLY_TECHNOLOGY_UNKNOWN
static void stream(Stream &s, const std::string &indent, const M &value)
Specialize to provide the datatype for a message.
std::shared_ptr< ::sensor_msgs::BatteryState > BatteryStatePtr
static const char * value()
@ POWER_SUPPLY_HEALTH_WATCHDOG_TIMER_EXPIRE
Stream base-class, provides common functionality for IStream and OStream.
Tools for manipulating sensor_msgs.
@ POWER_SUPPLY_TECHNOLOGY_LIPO
static const char * value()
static const char * value(const ::sensor_msgs::BatteryState_< ContainerAllocator > &)
BatteryState_(const ContainerAllocator &_alloc)
_percentage_type percentage
std::vector< float, typename std::allocator_traits< ContainerAllocator >::template rebind_alloc< float > > _cell_voltage_type
librealsense2
Author(s): LibRealSense ROS Team
autogenerated on Fri Aug 2 2024 08:30:01