BatteryState.h
Go to the documentation of this file.
1 // Generated by gencpp from file sensor_msgs/BatteryState.msg
2 // DO NOT EDIT!
3 
4 
5 #ifndef SENSOR_MSGS_MESSAGE_BATTERYSTATE_H
6 #define SENSOR_MSGS_MESSAGE_BATTERYSTATE_H
7 
8 
9 #include <string>
10 #include <vector>
11 #include <map>
12 
13 #include <ros/types.h>
14 #include <ros/serialization.h>
16 #include <ros/message_operations.h>
17 
18 #include <std_msgs/Header.h>
19 
20 namespace sensor_msgs
21 {
22 template <class ContainerAllocator>
24 {
26 
28  : header()
29  , voltage(0.0)
30  , current(0.0)
31  , charge(0.0)
32  , capacity(0.0)
33  , design_capacity(0.0)
34  , percentage(0.0)
38  , present(false)
39  , cell_voltage()
40  , location()
41  , serial_number() {
42  }
43  BatteryState_(const ContainerAllocator& _alloc)
44  : header(_alloc)
45  , voltage(0.0)
46  , current(0.0)
47  , charge(0.0)
48  , capacity(0.0)
49  , design_capacity(0.0)
50  , percentage(0.0)
54  , present(false)
55  , cell_voltage(_alloc)
56  , location(_alloc)
57  , serial_number(_alloc) {
58  (void)_alloc;
59  }
60 
61 
62 
63  typedef ::std_msgs::Header_<ContainerAllocator> _header_type;
64  _header_type header;
65 
66  typedef float _voltage_type;
67  _voltage_type voltage;
68 
69  typedef float _current_type;
70  _current_type current;
71 
72  typedef float _charge_type;
73  _charge_type charge;
74 
75  typedef float _capacity_type;
76  _capacity_type capacity;
77 
78  typedef float _design_capacity_type;
79  _design_capacity_type design_capacity;
80 
81  typedef float _percentage_type;
82  _percentage_type percentage;
83 
85  _power_supply_status_type power_supply_status;
86 
88  _power_supply_health_type power_supply_health;
89 
91  _power_supply_technology_type power_supply_technology;
92 
94  _present_type present;
95 
96  typedef std::vector<float, typename ContainerAllocator::template rebind<float>::other > _cell_voltage_type;
97  _cell_voltage_type cell_voltage;
98 
99  typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _location_type;
100  _location_type location;
101 
102  typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _serial_number_type;
103  _serial_number_type serial_number;
104 
105 
127 
128 
131 
132 }; // struct BatteryState_
133 
134 typedef ::sensor_msgs::BatteryState_<std::allocator<void> > BatteryState;
135 
138 
139 // constants requiring out of line definition
140 
141 
142 
143 
144 
145 
146 
147 
148 
149 
150 
151 
152 
153 
154 
155 
156 
157 
158 
159 
160 
161 
162 
163 
164 
165 
166 
167 
168 
169 
170 
171 
172 
173 
174 
175 
176 
177 
178 
179 
180 
181 
182 
183 
184 
185 template<typename ContainerAllocator>
186 std::ostream& operator<<(std::ostream& s, const ::sensor_msgs::BatteryState_<ContainerAllocator> & v)
187 {
189 return s;
190 }
191 
192 } // namespace sensor_msgs
193 
194 namespace rs2rosinternal
195 {
196 namespace message_traits
197 {
198 
199 
200 
201 // BOOLTRAITS {'IsFixedSize': False, 'IsMessage': True, 'HasHeader': True}
202 // {'std_msgs': ['/opt/ros/kinetic/share/std_msgs/cmake/../msg'], 'geometry_msgs': ['/opt/ros/kinetic/share/geometry_msgs/cmake/../msg'], 'sensor_msgs': ['/tmp/binarydeb/ros-kinetic-sensor-msgs-1.12.5/msg']}
203 
204 // !!!!!!!!!!! ['__class__', '__delattr__', '__dict__', '__doc__', '__eq__', '__format__', '__getattribute__', '__hash__', '__init__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_parsed_fields', 'constants', 'fields', 'full_name', 'has_header', 'header_present', 'names', 'package', 'parsed_fields', 'short_name', 'text', 'types']
205 
206 
207 
208 
209 template <class ContainerAllocator>
210 struct IsFixedSize< ::sensor_msgs::BatteryState_<ContainerAllocator> >
211  : FalseType
212  { };
213 
214 template <class ContainerAllocator>
215 struct IsFixedSize< ::sensor_msgs::BatteryState_<ContainerAllocator> const>
216  : FalseType
217  { };
218 
219 template <class ContainerAllocator>
220 struct IsMessage< ::sensor_msgs::BatteryState_<ContainerAllocator> >
221  : TrueType
222  { };
223 
224 template <class ContainerAllocator>
225 struct IsMessage< ::sensor_msgs::BatteryState_<ContainerAllocator> const>
226  : TrueType
227  { };
228 
229 template <class ContainerAllocator>
230 struct HasHeader< ::sensor_msgs::BatteryState_<ContainerAllocator> >
231  : TrueType
232  { };
233 
234 template <class ContainerAllocator>
235 struct HasHeader< ::sensor_msgs::BatteryState_<ContainerAllocator> const>
236  : TrueType
237  { };
238 
239 
240 template<class ContainerAllocator>
241 struct MD5Sum< ::sensor_msgs::BatteryState_<ContainerAllocator> >
242 {
243  static const char* value()
244  {
245  return "476f837fa6771f6e16e3bf4ef96f8770";
246  }
247 
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;
251 };
252 
253 template<class ContainerAllocator>
254 struct DataType< ::sensor_msgs::BatteryState_<ContainerAllocator> >
255 {
256  static const char* value()
257  {
258  return "sensor_msgs/BatteryState";
259  }
260 
261  static const char* value(const ::sensor_msgs::BatteryState_<ContainerAllocator>&) { return value(); }
262 };
263 
264 template<class ContainerAllocator>
265 struct Definition< ::sensor_msgs::BatteryState_<ContainerAllocator> >
266 {
267  static const char* value()
268  {
269  return "\n\
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\
274 \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\
281 \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\
292 \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\
301 \n\
302 Header header\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\
313 \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\
318 \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\
324 # \n\
325 # sequence ID: consecutively increasing ID \n\
326 uint32 seq\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\
331 time stamp\n\
332 #Frame this data is associated with\n\
333 # 0: no frame\n\
334 # 1: global frame\n\
335 string frame_id\n\
336 ";
337  }
338 
339  static const char* value(const ::sensor_msgs::BatteryState_<ContainerAllocator>&) { return value(); }
340 };
341 
342 } // namespace message_traits
343 } // namespace rs2rosinternal
344 
345 namespace rs2rosinternal
346 {
347 namespace serialization
348 {
349 
350  template<class ContainerAllocator> struct Serializer< ::sensor_msgs::BatteryState_<ContainerAllocator> >
351  {
352  template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
353  {
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);
368  }
369 
371  }; // struct BatteryState_
372 
373 } // namespace serialization
374 } // namespace rs2rosinternal
375 
376 namespace rs2rosinternal
377 {
378 namespace message_operations
379 {
380 
381 template<class ContainerAllocator>
382 struct Printer< ::sensor_msgs::BatteryState_<ContainerAllocator> >
383 {
384  template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::sensor_msgs::BatteryState_<ContainerAllocator>& v)
385  {
386  s << indent << "header: ";
387  s << std::endl;
388  Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header);
389  s << indent << "voltage: ";
390  Printer<float>::stream(s, indent + " ", v.voltage);
391  s << indent << "current: ";
392  Printer<float>::stream(s, indent + " ", v.current);
393  s << indent << "charge: ";
394  Printer<float>::stream(s, indent + " ", v.charge);
395  s << indent << "capacity: ";
396  Printer<float>::stream(s, indent + " ", v.capacity);
397  s << indent << "design_capacity: ";
398  Printer<float>::stream(s, indent + " ", v.design_capacity);
399  s << indent << "percentage: ";
400  Printer<float>::stream(s, indent + " ", v.percentage);
401  s << indent << "power_supply_status: ";
402  Printer<uint8_t>::stream(s, indent + " ", v.power_supply_status);
403  s << indent << "power_supply_health: ";
404  Printer<uint8_t>::stream(s, indent + " ", v.power_supply_health);
405  s << indent << "power_supply_technology: ";
406  Printer<uint8_t>::stream(s, indent + " ", v.power_supply_technology);
407  s << indent << "present: ";
408  Printer<uint8_t>::stream(s, indent + " ", v.present);
409  s << indent << "cell_voltage[]" << std::endl;
410  for (size_t i = 0; i < v.cell_voltage.size(); ++i)
411  {
412  s << indent << " cell_voltage[" << i << "]: ";
413  Printer<float>::stream(s, indent + " ", v.cell_voltage[i]);
414  }
415  s << indent << "location: ";
416  Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.location);
417  s << indent << "serial_number: ";
418  Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.serial_number);
419  }
420 };
421 
422 } // namespace message_operations
423 } // namespace rs2rosinternal
424 
425 #endif // SENSOR_MSGS_MESSAGE_BATTERYSTATE_H
static void stream(Stream &s, const std::string &indent, const ::sensor_msgs::BatteryState_< ContainerAllocator > &v)
Definition: BatteryState.h:384
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
Definition: BatteryState.h:97
GLdouble s
_serial_number_type serial_number
Definition: BatteryState.h:103
Specialize to provide the md5sum for a message.
_power_supply_technology_type power_supply_technology
Definition: BatteryState.h:91
std::mutex m
GLint location
def indent(str, line_prefix=' ')
Definition: log.py:88
Base type for compile-type true/false tests. Compatible with Boost.MPL. classes inheriting from this ...
Specialize to provide the datatype for a message.
HasHeader informs whether or not there is a header that gets serialized as the first thing in the mes...
unsigned char uint8_t
Definition: stdint.h:78
boost::shared_ptr< ::sensor_msgs::BatteryState_< ContainerAllocator > > Ptr
Definition: BatteryState.h:129
std::basic_string< char, std::char_traits< char >, typename ContainerAllocator::template rebind< char >::other > _serial_number_type
Definition: BatteryState.h:102
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
Definition: BatteryState.h:63
Tools for manipulating sensor_msgs.
Definition: BatteryState.h:20
_percentage_type percentage
Definition: BatteryState.h:82
#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 > &)
Definition: BatteryState.h:339
unsigned __int64 uint64_t
Definition: stdint.h:90
Specialize to provide the definition for a message.
_design_capacity_type design_capacity
Definition: BatteryState.h:79
static const char * value(const ::sensor_msgs::BatteryState_< ContainerAllocator > &)
Definition: BatteryState.h:248
boost::shared_ptr< ::sensor_msgs::BatteryState const > BatteryStateConstPtr
Definition: BatteryState.h:137
static const char * value(const ::sensor_msgs::BatteryState_< ContainerAllocator > &)
Definition: BatteryState.h:261
BatteryState_< ContainerAllocator > Type
Definition: BatteryState.h:25
std::basic_string< char, std::char_traits< char >, typename ContainerAllocator::template rebind< char >::other > _location_type
Definition: BatteryState.h:99
boost::shared_ptr< ::sensor_msgs::BatteryState_< ContainerAllocator > const > ConstPtr
Definition: BatteryState.h:130
BatteryState_(const ContainerAllocator &_alloc)
Definition: BatteryState.h:43
int i
_power_supply_health_type power_supply_health
Definition: BatteryState.h:88
Templated serialization class. Default implementation provides backwards compatibility with old messa...
std::vector< float, typename ContainerAllocator::template rebind< float >::other > _cell_voltage_type
Definition: BatteryState.h:96
_power_supply_status_type power_supply_status
Definition: BatteryState.h:85
::sensor_msgs::BatteryState_< std::allocator< void > > BatteryState
Definition: BatteryState.h:134
GLdouble v
boost::shared_ptr< ::sensor_msgs::BatteryState > BatteryStatePtr
Definition: BatteryState.h:136


librealsense2
Author(s): LibRealSense ROS Team
autogenerated on Thu Dec 22 2022 03:41:42